because the ESP32 implementation will be different from NRF52
to make this possible I needed to decouple knowlege about bluetooth from
our mesh service. Instead mesh service now uses the Obserable pattern
to let any interested consumer get notified of important mesh changes
(currently that is only bluetooth, but really we should do the same
thing for decoupling the GUI 'app' from the mesh service)
@girtsf would you mind reviewing my Observer changes? I haven't written
C++ code in a long time ;-)
Also - now that he fixed that, we can leave PMU interrupts on across sleep
Hopefully the following line will properly credit him in the magic github
universe...
Co-authored-by: spattinson <spattinson@users.noreply.github.com>
* Break out debug screen to a separate class and make it thread-safe.
* Break out power state to a separate class.
* Show battery voltage, charging & USB status on debug screen.
* Show GPS lock / no lock
* Fix an off-by-one that I introduced earlier in `drawRows`.
Work towards separating out how Screen interacts with other stuff.
* `Screen` should now be thread-safe. All commands to it are put in a
queue and handled in `doTask` from the `loop()` task.
* Break dependency from `BluetoothUtil` to `Screen` by changing the
pairing request into a callback.
* All accesses to screen now happen through the class.
* Fix `drawRows` so that the text scrolls along with frame animations.
* Remove example code that wasn't used.
Root cause seems to be the axp192 interrupt, which on some boards fires
during sleep. I'm not sure why, but we don't need this yet, so leaving
masked during sleep.