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.
Dependents: LV7_LCDtest LV7_Grupa5_Tim003_Zadatak1 lv7_Grupa5_Tim008_zad1 LV7_PAI_Grupa5_tim10_Zadatak1 ... more
Revision 20:8db6aa25f55e, committed 2017-01-19
- 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);
}
