diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 140423f25c76..0db9d21574fe 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -373,7 +373,7 @@ void startOrResumeJob() { IF_DISABLED(SD_ABORT_NO_COOLDOWN, thermalManager.disable_all_heaters()); - TERN(HAS_CUTTER, cutter.kill(), thermalManager.zero_fan_speeds()); // Full cutter shutdown including ISR control + TERN(HAS_CUTTER, cutter.kill_cutter(), thermalManager.zero_fan_speeds()); // Full cutter shutdown including ISR control wait_for_heatup = false; @@ -895,8 +895,6 @@ void idle(const bool no_stepper_sleep/*=false*/) { void kill(FSTR_P const lcd_error/*=nullptr*/, FSTR_P const lcd_component/*=nullptr*/, const bool steppers_off/*=false*/) { thermalManager.disable_all_heaters(); - TERN_(HAS_CUTTER, cutter.kill()); // Full cutter shutdown including ISR control - // Echo the LCD message to serial for extra context if (lcd_error) { SERIAL_ECHO_START(); SERIAL_ECHOLN(lcd_error); } @@ -916,6 +914,7 @@ void kill(FSTR_P const lcd_error/*=nullptr*/, FSTR_P const lcd_component/*=nullp #endif minkill(steppers_off); + TERN_(HAS_CUTTER, cutter.kill_cutter()); // Full cutter shutdown including ISR control } void minkill(const bool steppers_off/*=false*/) { @@ -931,11 +930,11 @@ void minkill(const bool steppers_off/*=false*/) { // Reiterate heaters off thermalManager.disable_all_heaters(); - TERN_(HAS_CUTTER, cutter.kill()); // Reiterate cutter shutdown - // Power off all steppers (for M112) or just the E steppers steppers_off ? stepper.disable_all_steppers() : stepper.disable_e_steppers(); + TERN_(HAS_CUTTER, cutter.kill_cutter()); // Cutter shutdown + TERN_(PSU_CONTROL, powerManager.power_off()); TERN_(HAS_SUICIDE, suicide()); diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index 956e0b8ab9e0..bf5ca17e6ec6 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -231,14 +231,26 @@ class SpindleLaser { #if PIN_EXISTS(SPINDLE_LASER_ENA) WRITE(SPINDLE_LASER_ENA_PIN, enable ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE); #endif - enable_state = enable; + if (enable_state != enable) { + power_delay(enable); + enable_state = enable; + } } static void disable() { isReadyForUI = false; set_enabled(false); } // Wait for spindle/laser to startup or shutdown static void power_delay(const bool on) { - safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY); + #if ENABLED(SPINDLE_FEATURE) + if (active_tool_type == TYPE_SPINDLE) { + safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY); + } + #endif + #if ENABLED(LASER_FEATURE) + if (active_tool_type == TYPE_LASER) { + safe_delay(on ? LASER_POWERUP_DELAY : LASER_POWERDOWN_DELAY); + } + #endif } #if ENABLED(SPINDLE_CHANGE_DIR) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 217405eae645..6d9848326c16 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2361,7 +2361,7 @@ void Temperature::task() { if (cooler.check_flow_too_low()) { TERN_(HAS_DISPLAY, if (cutter.enabled()) ui.flow_fault()); cutter.disable(); - cutter.cutter_mode = CUTTER_MODE_ERROR; // Immediately kill stepper inline power output + cutter.cutter_mode = CUTTER_MODE_ERROR; // Immediately kill inline power output of cutter } #endif #endif diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index e937c36a4e13..58a84051103c 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -1264,7 +1264,6 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { cutter.inline_power(cutter.power); #endif cutter.set_enabled(false); - TERN_(SPINDLE_FEATURE, safe_delay(1000)); #endif #if ENABLED(COOLANT_MIST) @@ -1474,9 +1473,6 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { } #endif cutter.set_enabled(true); - if (TERN0(SPINDLE_FEATURE, cutter.active_tool_type = TYPE_SPINDLE)) { - safe_delay(1000); - } } #endif