okyeron / OMX-27

161 stars 38 forks source link

screensaver now reads pot upon initialization to set color #57

Closed jr0dsgarage closed 9 months ago

jr0dsgarage commented 9 months ago

It annoyed me that the screensaver would always revert to red after a restart.

I originally planned on having the last color used be saved into the EEPROM, but cannot figure that feature out yet, so this is the next best thing.

Now, when the screensaver is activated, it reads the value of the pot first and sets the color accordingly. This ends up giving the screensaver some dynacism, because the pot value might be different each time the screensaver is activated, depending on the usage of the unit in the interim.

The code to change the screensaver color based off the pot value is used in multiple places, and was therefore abstracted into its own private function call.

jr0dsgarage commented 9 months ago

closing to try again, this time with fewer mistakes 🤞