From 5d0deba938eaaa47c2fc27fdb296499698006f87 Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Sun, 19 Apr 2020 23:37:05 -0500
Subject: [PATCH] Longer default power-up delay

See MarlinFirmware/Configurations#78
---
 Marlin/Configuration.h               | 2 +-
 Marlin/src/feature/power.cpp         | 8 +++-----
 Marlin/src/gcode/control/M80_M81.cpp | 9 ++++-----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 0b3d580530..2804d8ffef 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -326,7 +326,7 @@
   #define PSU_ACTIVE_HIGH false     // Set 'false' for ATX, 'true' for X-Box
 
   //#define PSU_DEFAULT_OFF         // Keep power off until enabled directly with M80
-  //#define PSU_POWERUP_DELAY 100   // (ms) Delay for the PSU to warm up to full power
+  //#define PSU_POWERUP_DELAY 250   // (ms) Delay for the PSU to warm up to full power
 
   //#define AUTO_POWER_CONTROL      // Enable automatic control of the PS_ON pin
   #if ENABLED(AUTO_POWER_CONTROL)
diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp
index 510747d208..746ce6aa3d 100644
--- a/Marlin/src/feature/power.cpp
+++ b/Marlin/src/feature/power.cpp
@@ -107,11 +107,9 @@ void Power::power_on() {
   lastPowerOn = millis();
   if (!powersupply_on) {
     PSU_PIN_ON();
-
-    #if HAS_TRINAMIC_CONFIG
-      delay(PSU_POWERUP_DELAY); // Wait for power to settle
-      restore_stepper_drivers();
-    #endif
+    delay(PSU_POWERUP_DELAY);
+    restore_stepper_drivers();
+    TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY));
   }
 }
 
diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp
index e8d9aa2fdf..a5ff7d05d9 100644
--- a/Marlin/src/gcode/control/M80_M81.cpp
+++ b/Marlin/src/gcode/control/M80_M81.cpp
@@ -72,16 +72,15 @@
     #endif
 
     #if DISABLED(AUTO_POWER_CONTROL)
-      delay(PSU_POWERUP_DELAY); // Wait for power to settle
+      delay(PSU_POWERUP_DELAY);
       restore_stepper_drivers();
+      TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY));
     #endif
 
-    #if HAS_LCD_MENU
-      ui.reset_status();
-    #endif
+    TERN_(HAS_LCD_MENU, ui.reset_status());
   }
 
-#endif // ENABLED(PSU_CONTROL)
+#endif // PSU_CONTROL
 
 /**
  * M81: Turn off Power, including Power Supply, if there is one.