Disable steppers on M112 (#15065)
And change verbiage to not refer to "Emergency Stop."
This commit is contained in:
parent
318356b6bc
commit
b7796bcce6
|
@ -745,7 +745,7 @@ void idle(
|
||||||
* Kill all activity and lock the machine.
|
* Kill all activity and lock the machine.
|
||||||
* After this the machine will need to be reset.
|
* After this the machine will need to be reset.
|
||||||
*/
|
*/
|
||||||
void kill(PGM_P const lcd_msg/*=nullptr*/) {
|
void kill(PGM_P const lcd_msg/*=nullptr*/, const bool steppers_off/*=false*/) {
|
||||||
thermalManager.disable_all_heaters();
|
thermalManager.disable_all_heaters();
|
||||||
|
|
||||||
SERIAL_ERROR_MSG(MSG_ERR_KILLED);
|
SERIAL_ERROR_MSG(MSG_ERR_KILLED);
|
||||||
|
@ -760,10 +760,10 @@ void kill(PGM_P const lcd_msg/*=nullptr*/) {
|
||||||
host_action_kill();
|
host_action_kill();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
minkill();
|
minkill(steppers_off);
|
||||||
}
|
}
|
||||||
|
|
||||||
void minkill() {
|
void minkill(const bool steppers_off/*=false*/) {
|
||||||
|
|
||||||
// Wait a short time (allows messages to get out before shutting down.
|
// Wait a short time (allows messages to get out before shutting down.
|
||||||
for (int i = 1000; i--;) DELAY_US(600);
|
for (int i = 1000; i--;) DELAY_US(600);
|
||||||
|
@ -773,7 +773,11 @@ void minkill() {
|
||||||
// Wait to ensure all interrupts stopped
|
// Wait to ensure all interrupts stopped
|
||||||
for (int i = 1000; i--;) DELAY_US(250);
|
for (int i = 1000; i--;) DELAY_US(250);
|
||||||
|
|
||||||
thermalManager.disable_all_heaters(); // turn off heaters again
|
// Reiterate heaters off
|
||||||
|
thermalManager.disable_all_heaters();
|
||||||
|
|
||||||
|
// Power off all steppers (for M112) or just the E steppers
|
||||||
|
steppers_off ? disable_all_steppers() : disable_e_steppers();
|
||||||
|
|
||||||
#if HAS_POWER_SWITCH
|
#if HAS_POWER_SWITCH
|
||||||
PSU_OFF();
|
PSU_OFF();
|
||||||
|
|
|
@ -322,8 +322,8 @@ void disable_e_stepper(const uint8_t e);
|
||||||
void disable_e_steppers();
|
void disable_e_steppers();
|
||||||
void disable_all_steppers();
|
void disable_all_steppers();
|
||||||
|
|
||||||
void kill(PGM_P const lcd_msg=nullptr);
|
void kill(PGM_P const lcd_msg=nullptr, const bool steppers_off=false);
|
||||||
void minkill();
|
void minkill(const bool steppers_off=false);
|
||||||
|
|
||||||
void quickstop_stepper();
|
void quickstop_stepper();
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ void GcodeSuite::M108() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M112: Emergency Stop
|
* M112: Full Shutdown
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M112() {
|
void GcodeSuite::M112() {
|
||||||
kill();
|
kill(PSTR("M112 Shutdown"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
/**
|
/**
|
||||||
* M81: Turn off Power, including Power Supply, if there is one.
|
* M81: Turn off Power, including Power Supply, if there is one.
|
||||||
*
|
*
|
||||||
* This code should ALWAYS be available for EMERGENCY SHUTDOWN!
|
* This code should ALWAYS be available for FULL SHUTDOWN!
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M81() {
|
void GcodeSuite::M81() {
|
||||||
thermalManager.disable_all_heaters();
|
thermalManager.disable_all_heaters();
|
||||||
|
|
|
@ -407,7 +407,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||||
|
|
||||||
#if DISABLED(EMERGENCY_PARSER)
|
#if DISABLED(EMERGENCY_PARSER)
|
||||||
case 108: M108(); break; // M108: Cancel Waiting
|
case 108: M108(); break; // M108: Cancel Waiting
|
||||||
case 112: M112(); break; // M112: Emergency Stop
|
case 112: M112(); break; // M112: Full Shutdown
|
||||||
case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
|
case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
|
||||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||||
case 876: M876(); break; // M876: Handle Host prompt responses
|
case 876: M876(); break; // M876: Handle Host prompt responses
|
||||||
|
|
|
@ -132,7 +132,7 @@
|
||||||
* If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
|
* If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
|
||||||
* M110 - Set the current line number. (Used by host printing)
|
* M110 - Set the current line number. (Used by host printing)
|
||||||
* M111 - Set debug flags: "M111 S<flagbits>". See flag bits defined in enum.h.
|
* M111 - Set debug flags: "M111 S<flagbits>". See flag bits defined in enum.h.
|
||||||
* M112 - Emergency stop.
|
* M112 - Full Shutdown.
|
||||||
* M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
|
* M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
|
||||||
* M114 - Report current position.
|
* M114 - Report current position.
|
||||||
* M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
|
* M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
|
||||||
|
|
|
@ -715,8 +715,8 @@ class Planner {
|
||||||
FORCE_INLINE static float get_axis_position_degrees(const AxisEnum axis) { return get_axis_position_mm(axis); }
|
FORCE_INLINE static float get_axis_position_degrees(const AxisEnum axis) { return get_axis_position_mm(axis); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Called to force a quick stop of the machine (for example, when an emergency
|
// Called to force a quick stop of the machine (for example, when
|
||||||
// stop is required, or when endstops are hit)
|
// a Full Shutdown is required, or when endstops are hit)
|
||||||
static void quick_stop();
|
static void quick_stop();
|
||||||
|
|
||||||
// Called when an endstop is triggered. Causes the machine to stop inmediately
|
// Called when an endstop is triggered. Causes the machine to stop inmediately
|
||||||
|
|
Loading…
Reference in a new issue