T-Deck/T-Watch: enhancements/fixes (#2786)

* T-Deck: enhancements/fixes

* trunk fmt

* T-Watch board update

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Manuel
2023-09-10 13:54:25 +02:00
committed by GitHub
parent 44a77a10e1
commit d6d51bc3f4
6 changed files with 23 additions and 13 deletions

View File

@@ -158,6 +158,9 @@ static void darkEnter()
{
setBluetoothEnable(true);
screen->setOn(false);
#ifdef KB_POWERON
digitalWrite(KB_POWERON, LOW);
#endif
}
static void serialEnter()
@@ -185,6 +188,9 @@ static void powerEnter()
} else {
screen->setOn(true);
setBluetoothEnable(true);
#ifdef KB_POWERON
digitalWrite(KB_POWERON, HIGH);
#endif
// within enter() the function getState() returns the state we came from
if (strcmp(powerFSM.getState()->name, "BOOT") != 0 && strcmp(powerFSM.getState()->name, "POWER") != 0 &&
strcmp(powerFSM.getState()->name, "DARK") != 0) {
@@ -215,6 +221,9 @@ static void onEnter()
LOG_DEBUG("Enter state: ON\n");
screen->setOn(true);
setBluetoothEnable(true);
#ifdef KB_POWERON
digitalWrite(KB_POWERON, HIGH);
#endif
}
static void onIdle()