Prevent delay when power is already on

Fix #10410
This commit is contained in:
Scott Lahteine 2018-04-17 04:34:31 -05:00
parent 5a064d0e94
commit 3c826e5d05

View file

@ -87,6 +87,7 @@ void Power::check() {
void Power::power_on() { void Power::power_on() {
lastPowerOn = millis(); lastPowerOn = millis();
if (!powersupply_on) {
PSU_PIN_ON(); PSU_PIN_ON();
#if HAS_TRINAMIC #if HAS_TRINAMIC
@ -94,9 +95,10 @@ void Power::power_on() {
restore_stepper_drivers(); restore_stepper_drivers();
#endif #endif
} }
}
void Power::power_off() { void Power::power_off() {
PSU_PIN_OFF(); if (powersupply_on) PSU_PIN_OFF();
} }
#endif // AUTO_POWER_CONTROL #endif // AUTO_POWER_CONTROL