Browse Source

Longer default power-up delay

See MarlinFirmware/Configurations#78
Scott Lahteine 4 years ago
parent
commit
5d0deba938
3 changed files with 8 additions and 11 deletions
  1. 1
    1
      Marlin/Configuration.h
  2. 3
    5
      Marlin/src/feature/power.cpp
  3. 4
    5
      Marlin/src/gcode/control/M80_M81.cpp

+ 1
- 1
Marlin/Configuration.h View File

@@ -326,7 +326,7 @@
326 326
   #define PSU_ACTIVE_HIGH false     // Set 'false' for ATX, 'true' for X-Box
327 327
 
328 328
   //#define PSU_DEFAULT_OFF         // Keep power off until enabled directly with M80
329
-  //#define PSU_POWERUP_DELAY 100   // (ms) Delay for the PSU to warm up to full power
329
+  //#define PSU_POWERUP_DELAY 250   // (ms) Delay for the PSU to warm up to full power
330 330
 
331 331
   //#define AUTO_POWER_CONTROL      // Enable automatic control of the PS_ON pin
332 332
   #if ENABLED(AUTO_POWER_CONTROL)

+ 3
- 5
Marlin/src/feature/power.cpp View File

@@ -107,11 +107,9 @@ void Power::power_on() {
107 107
   lastPowerOn = millis();
108 108
   if (!powersupply_on) {
109 109
     PSU_PIN_ON();
110
-
111
-    #if HAS_TRINAMIC_CONFIG
112
-      delay(PSU_POWERUP_DELAY); // Wait for power to settle
113
-      restore_stepper_drivers();
114
-    #endif
110
+    delay(PSU_POWERUP_DELAY);
111
+    restore_stepper_drivers();
112
+    TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY));
115 113
   }
116 114
 }
117 115
 

+ 4
- 5
Marlin/src/gcode/control/M80_M81.cpp View File

@@ -72,16 +72,15 @@
72 72
     #endif
73 73
 
74 74
     #if DISABLED(AUTO_POWER_CONTROL)
75
-      delay(PSU_POWERUP_DELAY); // Wait for power to settle
75
+      delay(PSU_POWERUP_DELAY);
76 76
       restore_stepper_drivers();
77
+      TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY));
77 78
     #endif
78 79
 
79
-    #if HAS_LCD_MENU
80
-      ui.reset_status();
81
-    #endif
80
+    TERN_(HAS_LCD_MENU, ui.reset_status());
82 81
   }
83 82
 
84
-#endif // ENABLED(PSU_CONTROL)
83
+#endif // PSU_CONTROL
85 84
 
86 85
 /**
87 86
  * M81: Turn off Power, including Power Supply, if there is one.

Loading…
Cancel
Save