rm-hull / luma.oled

Python module to drive a SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106 OLED
https://luma-oled.readthedocs.io
MIT License
805 stars 161 forks source link

Wrong command on ssd1351 #229

Closed irlandezu23 closed 5 years ago

irlandezu23 commented 5 years ago

I tried to use your library to write text to a 96x96 OLED display. The problem was the text color on the display was different than what I had specified in the code, also the text was mirrored. I think the bug is in file "device.py". At line 359 you included a bit mask(0x02) called "order" for BGR option. The bit mask should have been 0x04. The other problem is at line 368 where the bit mask is used. There is a logic or between the bit mask and the argument value (0x74 | order). The value 0x74 should have been 0x72. Please consult the DS to completely understand what I am talking about. Basically, you misplaced two bits in that command.

rm-hull commented 5 years ago

Yes, looking at the datasheet, I think you are right. Thanks for taking the time to investigate and report it.

I will push out a new release for this shortly.

rm-hull commented 5 years ago

192 and #201 both seem relevant here

rm-hull commented 5 years ago

v3.0.0 released with a fix for this issue. See https://pypi.org/project/luma.oled/3.0.0/