From 0a0e3edea25947fecb546f60cec0cb9d367f2da5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 8 Nov 2020 18:36:52 -0600 Subject: [PATCH] Better name --- Marlin/Configuration.h | 2 +- Marlin/src/feature/power.cpp | 4 ++-- Marlin/src/inc/Conditionals_post.h | 4 ++-- Marlin/src/inc/SanityCheck.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 118ef2916e..b1928b661c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -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 diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index a7a8ef9636..8d05d14698 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -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 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 5f04bdf28f..a8e619fb3b 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -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 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 44a78aa201..9eba15c7f4 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -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