ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
2.02k stars 640 forks source link

change setContrast to fix type missmatch #186

Closed Rotzbua closed 6 years ago

squix78 commented 6 years ago

Thank you for this PR. So I guess you also came to the conclusion that overloading the image and font methods with the old data type for the sake of backwards compatibility was not a good idea?

Rotzbua commented 6 years ago

This pr fixed a potential problem with different compiler settings. This line of code char precharge = 241 is only correct if type char is from 0 to 255 but compiler are also use -127 to 128.