SleepMode

Signed-off-by: Martin Kolací <martin.kolaci@lmc.eu>
This commit is contained in:
Martin Kolací
2020-12-28 13:10:49 +01:00
parent 6cc3c5dcf4
commit 25f31c7811
14 changed files with 170 additions and 40 deletions

View File

@@ -32,6 +32,11 @@ void CommInterface::mainLoop() {
}
}
// Drop ChargingOn when status was not updated for more than 10 seconds
if(liveData->params.currentTime - liveData->params.lastChargingOnTime > 10 && liveData->params.chargingOn) {
liveData->params.chargingOn = false;
}
// Can send next command from queue to OBD
if (liveData->canSendNextAtCommand) {
liveData->canSendNextAtCommand = false;