Browse Source

Apply AUTO_POWER_CONTROL later in setup() (#21193)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
vanilla_fb_2.0.x
Evgeny Z 4 years ago
committed by Scott Lahteine
parent
commit
124fb331cc
  1. 20
      Marlin/src/MarlinCore.cpp

20
Marlin/src/MarlinCore.cpp

@ -915,12 +915,6 @@ void setup() {
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
#endif
#if ENABLED(PSU_CONTROL)
SETUP_LOG("PSU_CONTROL");
powersupply_on = ENABLED(PSU_DEFAULT_OFF);
if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON();
#endif
#if EITHER(DISABLE_DEBUG, DISABLE_JTAG)
// Disable any hardware debug to free up pins for IO
#if ENABLED(DISABLE_DEBUG) && defined(JTAGSWD_DISABLE)
@ -951,10 +945,6 @@ void setup() {
OUT_WRITE(MAX6675_SS2_PIN, HIGH); // Disable
#endif
#if HAS_L64XX
SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers
#endif
#if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD)
OUT_WRITE(SMART_EFFECTOR_MOD_PIN, LOW); // Put Smart Effector into NORMAL mode
#endif
@ -963,10 +953,20 @@ void setup() {
SETUP_RUN(runout.setup());
#endif
#if ENABLED(PSU_CONTROL)
SETUP_LOG("PSU_CONTROL");
powersupply_on = ENABLED(PSU_DEFAULT_OFF);
if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON();
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
SETUP_RUN(recovery.setup());
#endif
#if HAS_L64XX
SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers
#endif
#if HAS_TMC220x
SETUP_RUN(tmc_serial_begin());
#endif

Loading…
Cancel
Save