Better name
This commit is contained in:
parent
44fce549cc
commit
0a0e3edea2
4 changed files with 7 additions and 7 deletions
|
|
@ -347,7 +347,7 @@
|
|||
//#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU if any extruder is over this temperature
|
||||
//#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU if the chamber is over this temperature
|
||||
#define POWER_TIMEOUT 30 // (s) Turn off power if the machine is idle for this duration
|
||||
//#define POWER_OFF_TIMEOUT 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time.
|
||||
//#define POWER_OFF_DELAY 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ void Power::power_off() {
|
|||
}
|
||||
|
||||
void Power::power_off_soon() {
|
||||
#if POWER_OFF_TIMEOUT
|
||||
lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_TIMEOUT);
|
||||
#if POWER_OFF_DELAY
|
||||
lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY);
|
||||
#else
|
||||
power_off();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -420,8 +420,8 @@
|
|||
#ifndef PSU_POWERUP_DELAY
|
||||
#define PSU_POWERUP_DELAY 250
|
||||
#endif
|
||||
#ifndef POWER_OFF_TIMEOUT
|
||||
#define POWER_OFF_TIMEOUT 0
|
||||
#ifndef POWER_OFF_DELAY
|
||||
#define POWER_OFF_DELAY 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2999,8 +2999,8 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
|||
#error "PSU_CONTROL requires PSU_ACTIVE_STATE to be defined as 'HIGH' or 'LOW'."
|
||||
#elif !PIN_EXISTS(PS_ON)
|
||||
#error "PSU_CONTROL requires PS_ON_PIN."
|
||||
#elif POWER_OFF_TIMEOUT < 0
|
||||
#error "POWER_OFF_TIMEOUT must be a positive value."
|
||||
#elif POWER_OFF_DELAY < 0
|
||||
#error "POWER_OFF_DELAY must be a positive value."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue