From 3c826e5d05bd0443692a9b74558757111d623671 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 17 Apr 2018 04:34:31 -0500 Subject: [PATCH] Prevent delay when power is already on Fix #10410 --- Marlin/src/feature/power.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 72b2504cc..41bb88181 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -87,16 +87,18 @@ void Power::check() { void Power::power_on() { lastPowerOn = millis(); - PSU_PIN_ON(); + if (!powersupply_on) { + PSU_PIN_ON(); - #if HAS_TRINAMIC - delay(100); // Wait for power to settle - restore_stepper_drivers(); - #endif + #if HAS_TRINAMIC + delay(100); // Wait for power to settle + restore_stepper_drivers(); + #endif + } } void Power::power_off() { - PSU_PIN_OFF(); + if (powersupply_on) PSU_PIN_OFF(); } #endif // AUTO_POWER_CONTROL