Modified N5110 Library
Fork of N5110 by
Diff: N5110.cpp
- Revision:
- 20:b921d8c99714
- Parent:
- 19:ba8addc061ea
diff -r ba8addc061ea -r b921d8c99714 N5110.cpp --- a/N5110.cpp Thu Apr 23 18:57:52 2015 +0000 +++ b/N5110.cpp Wed May 04 19:36:52 2016 +0000 @@ -90,9 +90,9 @@ void N5110::setBrightness(float brightness) { // check whether brightness is within range - if (brightness < 0.0) + if (brightness < 0) brightness = 0.0; - if (brightness > 1.0) + if (brightness > 1) brightness = 1.0; // set PWM duty cycle led->write(brightness); @@ -291,7 +291,7 @@ // elements are normalised from 0.0 to 1.0, so multiply // by 47 to convert to pixel range, and subtract from 47 // since top-left is 0,0 in the display geometry - setPixel(i,47 - int(array[i]*47.0)); + setPixel(i,47 - int(array[i]*47)); } refresh();