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
807 stars 161 forks source link

Fix SSD1322 NHD initialization and encode each pixel as 4bit+4bit identical nibbles #354

Closed georgeharker closed 1 year ago

georgeharker commented 1 year ago

Each pixel should be encoded as two adjacent nibbles (2 nibbles per pixel with identical values) corresponding with the 2 SEG + 1 COM design of the NHD based panel, which uses the two SEG per pixel to drive the charge (hence needing two adjacent pixel values in GDRAM to drive them.

Closes #353, #199

georgeharker commented 1 year ago

Ah. Clearly there’s some tests I need to update

rm-hull commented 1 year ago

Code changes look reasonable, but the regression test data needs regenerating

thijstriemstra commented 1 year ago

the regression test data needs regenerating

@georgeharker this is the code that @rm-hull is referring to: https://github.com/georgeharker/luma.oled/blob/master/tests/test_ssd1322_nhd.py#L103

georgeharker commented 1 year ago

the regression test data needs regenerating

@georgeharker this is the code that @rm-hull is referring to: https://github.com/georgeharker/luma.oled/blob/master/tests/test_ssd1322_nhd.py#L103

My read after looking thru the tests was that I needed to uncomment the regen line, run the regen and comment it back out and submit the test data. The PR now has the regenerated test data. But perhaps I missed something. It didn’t look like the test code itself needed changing as it passed after a regen of the data.

George

thijstriemstra commented 1 year ago

👍🏻