1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

Fix PSU pin initialization

This commit is contained in:
Scott Lahteine 2019-02-20 05:33:32 -06:00
parent 369d756b74
commit 31c473eadb

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
}