fix #371 allow button while using API. also don't let tbeams sleep if they have USB power

This commit is contained in:
geeksville
2020-09-21 12:41:39 -07:00
parent 3c0429deee
commit 3352fae64c
6 changed files with 42 additions and 8 deletions

View File

@@ -213,9 +213,9 @@ void setup()
// Currently only the tbeam has a PMU
power = new Power();
power->setup();
power->setStatusHandler(powerStatus);
powerStatus->observe(&power->newStatus);
power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration
#ifdef NRF52_SERIES
nrf52Setup();