Fix PSU pin initialization

This commit is contained in:
Scott Lahteine committed 2019-09-02 05:38:24 -05:00
1 parent 7aedf18fd9
commit 951ed3fd64
1 file changed
+3 -9
+3 -9
View File
@@ -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
}