tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
622 stars 196 forks source link

pixel: fix Monochrome setPixel #716

Closed aykevl closed 3 weeks ago

aykevl commented 3 weeks ago

Set/setPixel and Get weren't using the same indices. I've taken the ones used in Get and applied them to setPixel too. This fixes testImageNoise for the monochrome image.

I don't know which of the two behaviors was correct, but the one in Get certainly is simpler and more efficient. @deadprogram do you have a specification of the format somewhere?

deadprogram commented 3 weeks ago

This is great, thank you very much for fixing this @aykevl

Tested on badger2040 display, works as expected. Now merging.