Craig Evans / N5110

Dependents:   LV7_LCDtest LV7_Grupa5_Tim003_Zadatak1 lv7_Grupa5_Tim008_zad1 LV7_PAI_Grupa5_tim10_Zadatak1 ... more

Files at this revision

API Documentation at this revision

Comitter:
eencae
Date:
Thu Jan 19 19:42:34 2017 +0000
Parent:
19:ba8addc061ea
Child:
21:4cbdc20fea9f
Commit message:
Added f to literals for brightness check to change them to float literals and get rid of compiler warning.

Changed in this revision

N5110.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/N5110.cpp	Thu Apr 23 18:57:52 2015 +0000
+++ b/N5110.cpp	Thu Jan 19 19:42:34 2017 +0000
@@ -90,10 +90,10 @@
 void N5110::setBrightness(float brightness)
 {
     // check whether brightness is within range
-    if (brightness < 0.0)
-        brightness = 0.0;
-    if (brightness > 1.0)
-        brightness = 1.0;
+    if (brightness < 0.0f)
+        brightness = 0.0f;
+    if (brightness > 1.0f)
+        brightness = 1.0f;
     // set PWM duty cycle
     led->write(brightness);
 }