prevent deepsleep if teleperiod <> 100 or 300

because teleperiod is send directly after start, deepsleep will wait for the second teleperiod in cases where it is defined e.g. to 60. #14860
This commit is contained in:
stefanbode 2022-02-15 20:26:49 +01:00 committed by GitHub
parent 4566aaee05
commit ecd4ec76f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ bool Xdrv29(uint8_t function)
DeepSleepEverySecond(); DeepSleepEverySecond();
break; break;
case FUNC_AFTER_TELEPERIOD: case FUNC_AFTER_TELEPERIOD:
if (DeepSleepEnabled() && !deepsleep_flag) { if (DeepSleepEnabled() && !deepsleep_flag && (Settings->tele_period == 10 || Settings->tele_period == 300 || millis() > 20000 )) {
deepsleep_flag = DEEPSLEEP_START_COUNTDOWN; // Start deepsleep in 4 seconds deepsleep_flag = DEEPSLEEP_START_COUNTDOWN; // Start deepsleep in 4 seconds
} }
break; break;