Add POWER_OFF_DELAY option (#19987)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -126,4 +126,12 @@ void Power::power_off() {
|
||||
}
|
||||
}
|
||||
|
||||
void Power::power_off_soon() {
|
||||
#if POWER_OFF_DELAY
|
||||
lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY);
|
||||
#else
|
||||
power_off();
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // AUTO_POWER_CONTROL
|
||||
|
||||
Reference in New Issue
Block a user