diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 56b795c1bf..ec39023cfb 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -601,13 +601,7 @@ uint8_t target_extruder; #endif #if HAS_POWER_SWITCH - bool powersupply_on = ( - #if ENABLED(PS_DEFAULT_OFF) - false - #else - true - #endif - ); + bool powersupply_on; #if ENABLED(AUTO_POWER_CONTROL) #define PSU_ON() powerManager.power_on() #define PSU_OFF() powerManager.power_off() @@ -943,9 +937,9 @@ void setup_powerhold() { #endif #if HAS_POWER_SWITCH #if ENABLED(PS_DEFAULT_OFF) - PSU_OFF(); + powersupply_on = true; PSU_OFF(); #else - PSU_ON(); + powersupply_on = false; PSU_ON(); #endif #endif }