🩹 Fix M80, 1s delay (#23455)

This commit is contained in:
John Lagonikas
2022-01-05 13:57:32 +02:00
committed by GitHub
parent c55b66bece
commit 1fe07bf365
2 changed files with 8 additions and 4 deletions

View File

@@ -153,6 +153,7 @@ void Power::power_off() {
}
void Power::checkAutoPowerOff() {
if (TERN1(POWER_OFF_TIMER, !power_off_time) && TERN1(POWER_OFF_WAIT_FOR_COOLDOWN, !power_off_on_cooldown)) return;
if (TERN0(POWER_OFF_WAIT_FOR_COOLDOWN, power_off_on_cooldown && is_cooling_needed())) return;
if (TERN0(POWER_OFF_TIMER, power_off_time && PENDING(millis(), power_off_time))) return;
power_off();