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

@@ -40,6 +40,8 @@ void SerialConsole::onConnectionChanged(bool connected)
if (connected) { // To prevent user confusion, turn off bluetooth while using the serial port api
powerFSM.trigger(EVENT_SERIAL_CONNECTED);
} else {
// FIXME, we get no notice of serial going away, we should instead automatically generate this event if we haven't
// received a packet in a while
powerFSM.trigger(EVENT_SERIAL_DISCONNECTED);
}
}