Context
PR #21 implements button handling with background threads, but the architecture has room for improvement.
Problem
- Threads are spawned inside object constructors
- Button events are checked in TWO places
- Implicit synchronization with io_lock
- No explicit latching mechanism
Solution
Refactor to explicit state-machine pattern with global button flag and mutex.
Related
PR #21: Button/Display implementation
Context
PR #21 implements button handling with background threads, but the architecture has room for improvement.
Problem
Solution
Refactor to explicit state-machine pattern with global button flag and mutex.
Related
PR #21: Button/Display implementation