Browse Source

Longer default power-up delay

See MarlinFirmware/Configurations#78
vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
5d0deba938
  1. 2
      Marlin/Configuration.h
  2. 6
      Marlin/src/feature/power.cpp
  3. 9
      Marlin/src/gcode/control/M80_M81.cpp

2
Marlin/Configuration.h

@ -326,7 +326,7 @@
#define PSU_ACTIVE_HIGH false // Set 'false' for ATX, 'true' for X-Box #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_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 //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
#if ENABLED(AUTO_POWER_CONTROL) #if ENABLED(AUTO_POWER_CONTROL)

6
Marlin/src/feature/power.cpp

@ -107,11 +107,9 @@ void Power::power_on() {
lastPowerOn = millis(); lastPowerOn = millis();
if (!powersupply_on) { if (!powersupply_on) {
PSU_PIN_ON(); PSU_PIN_ON();
delay(PSU_POWERUP_DELAY);
#if HAS_TRINAMIC_CONFIG
delay(PSU_POWERUP_DELAY); // Wait for power to settle
restore_stepper_drivers(); restore_stepper_drivers();
#endif TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY));
} }
} }

9
Marlin/src/gcode/control/M80_M81.cpp

@ -72,16 +72,15 @@
#endif #endif
#if DISABLED(AUTO_POWER_CONTROL) #if DISABLED(AUTO_POWER_CONTROL)
delay(PSU_POWERUP_DELAY); // Wait for power to settle delay(PSU_POWERUP_DELAY);
restore_stepper_drivers(); restore_stepper_drivers();
TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY));
#endif #endif
#if HAS_LCD_MENU TERN_(HAS_LCD_MENU, ui.reset_status());
ui.reset_status();
#endif
} }
#endif // ENABLED(PSU_CONTROL) #endif // PSU_CONTROL
/** /**
* M81: Turn off Power, including Power Supply, if there is one. * M81: Turn off Power, including Power Supply, if there is one.

Loading…
Cancel
Save