dektronics / printalyzer-timer

F-Stop enlarging timer and print exposure meter
24 stars 6 forks source link

Fix startup process so the blackout switch takes effect before any illumination is initialized #55

Open dkonigsberg opened 6 months ago

dkonigsberg commented 6 months ago

This is a seemingly simple issue, but there's enough cross-dependency between all of the relevant components to make it not so simple.

Basically, we need to know the initial state of the blackout switch as early in the startup process as possible, and then feed that state into the code that initializes all of the illumination features of the device.

However, this needs to be done independently from the normal blackout callback handling in the illumination controller, because that operation has a number of side-effects that may depend on components that haven't yet been initialized.

Another idea is to simply make everything initialize in an "off" state, then fully initialize the keypad and blackout handling code, then enable light-emitting features.

Regardless, the main challenge could be the fact that we'd like to show the startup splashscreen earlier rather than later in the startup process flow.