adafruit / Adafruit_CircuitPython_HT16K33

Adafruit CircuitPython driver for the HT16K33, a LED matrix driver IC.
MIT License
41 stars 29 forks source link

Auto write causing flicker in some cases. #29

Closed caternuson closed 5 years ago

caternuson commented 5 years ago

See here: https://forums.adafruit.com/viewtopic.php?f=60&t=146815

Auto write is probably calling show() too often. Need to trace through and scrub code and make sure it only gets called as needed.

makermelissa commented 5 years ago

I noticed one trouble spot is that it gets called in the fill() function, which is called in the middle of _number(). Perhaps save the current state of auto_fill, set it to false, do all the function calls for _number() call show() and then restore it to the saved state.

caternuson commented 5 years ago

Good points. The auto-write was added later, so it was kind of shoe horned in. It's a bit of a mess and I only self assigned this issue since it's my mess. But if you want to PR something, please do.

makermelissa commented 5 years ago

Sounds good, I'll go ahead and do that. I got really familiar with it when writing the latest addition to Adafruit_CircuitPython_FeatherWing.

caternuson commented 5 years ago

Fixed with #30