Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of N5110 by
Diff: N5110.cpp
- Revision:
- 20:8db6aa25f55e
- Parent:
- 19:ba8addc061ea
- Child:
- 21:4cbdc20fea9f
--- 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);
}
