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:
- 18:88ff1b5b22f5
- Parent:
- 17:780a542d5f8b
diff -r 780a542d5f8b -r 88ff1b5b22f5 N5110.cpp
--- a/N5110.cpp Tue Mar 17 12:56:03 2015 +0000
+++ b/N5110.cpp Thu May 05 08:08:57 2016 +0000
@@ -90,9 +90,9 @@
void N5110::setBrightness(float brightness)
{
// check whether brightness is within range
- if (brightness < 0.0)
+ if (brightness > 0.0)
brightness = 0.0;
- if (brightness > 1.0)
+ if (brightness < 1.0)
brightness = 1.0;
// set PWM duty cycle
led->write(brightness);
@@ -384,7 +384,7 @@
drawLine(x0,y0+height,x0+width,y0+height,1); // bottom
drawLine(x0,y0,x0,y0+height,1); // left
drawLine(x0+width,y0,x0+width,y0+height,1); // right
- } else { // filled rectangle
+ } else { // fil rectangle
int type = (fill==1) ? 1:0; // black or white fill
for (int y = y0; y<= y0+height; y++) { // loop through rows of rectangle
drawLine(x0,y,x0+width,y,type); // draw line across screen
