Changing brightness in the gif app can hard crash the board. No exception or traceback shows on the console port, it just stops.
Seems related to the size of the currently playing gif. A small file like test.gif is fine even when switching brightness a lot. A bigger file like mario_level.gif crashes often, sometimes right away, sometimes after a few changes.
Tried so far, none of it fixed it:
Writing settings with gc.collect() before the write.
Debouncing so rapid brightness changes only trigger one write instead of one per click.
Skipping frame decoding for the tick where the settings file is written, to avoid overlapping flash reads and writes.
Might be related to writing flash while the display is actively refreshing, see adafruit/circuitpython#4461.
Changing brightness in the gif app can hard crash the board. No exception or traceback shows on the console port, it just stops.
Seems related to the size of the currently playing gif. A small file like test.gif is fine even when switching brightness a lot. A bigger file like mario_level.gif crashes often, sometimes right away, sometimes after a few changes.
Tried so far, none of it fixed it:
Writing settings with gc.collect() before the write.
Debouncing so rapid brightness changes only trigger one write instead of one per click.
Skipping frame decoding for the tick where the settings file is written, to avoid overlapping flash reads and writes.
Might be related to writing flash while the display is actively refreshing, see adafruit/circuitpython#4461.