|
@ -838,7 +838,7 @@ void get_command() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// If command was e-stop process now
|
|
|
// If command was e-stop process now
|
|
|
if (strcmp(command, "M112") == 0) kill(); |
|
|
if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED)); |
|
|
|
|
|
|
|
|
cmd_queue_index_w = (cmd_queue_index_w + 1) % BUFSIZE; |
|
|
cmd_queue_index_w = (cmd_queue_index_w + 1) % BUFSIZE; |
|
|
commands_in_queue += 1; |
|
|
commands_in_queue += 1; |
|
@ -3593,7 +3593,7 @@ inline void gcode_M111() { |
|
|
/**
|
|
|
/**
|
|
|
* M112: Emergency Stop |
|
|
* M112: Emergency Stop |
|
|
*/ |
|
|
*/ |
|
|
inline void gcode_M112() { kill(); } |
|
|
inline void gcode_M112() { kill(PSTR(MSG_KILLED)); } |
|
|
|
|
|
|
|
|
#ifdef BARICUDA |
|
|
#ifdef BARICUDA |
|
|
|
|
|
|
|
@ -6244,7 +6244,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { |
|
|
|
|
|
|
|
|
millis_t ms = millis(); |
|
|
millis_t ms = millis(); |
|
|
|
|
|
|
|
|
if (max_inactive_time && ms > previous_cmd_ms + max_inactive_time) kill(); |
|
|
if (max_inactive_time && ms > previous_cmd_ms + max_inactive_time) kill(PSTR(MSG_KILLED)); |
|
|
|
|
|
|
|
|
if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time |
|
|
if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time |
|
|
&& !ignore_stepper_queue && !blocks_queued()) |
|
|
&& !ignore_stepper_queue && !blocks_queued()) |
|
@ -6272,7 +6272,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { |
|
|
// Exceeded threshold and we can confirm that it was not accidental
|
|
|
// Exceeded threshold and we can confirm that it was not accidental
|
|
|
// KILL the machine
|
|
|
// KILL the machine
|
|
|
// ----------------------------------------------------------------
|
|
|
// ----------------------------------------------------------------
|
|
|
if (killCount >= KILL_DELAY) kill(); |
|
|
if (killCount >= KILL_DELAY) kill(PSTR(MSG_KILLED)); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_HOME |
|
|
#if HAS_HOME |
|
@ -6373,11 +6373,13 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { |
|
|
check_axes_activity(); |
|
|
check_axes_activity(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void kill() |
|
|
void kill(const char *lcd_msg) { |
|
|
{ |
|
|
#ifdef ULTRA_LCD |
|
|
|
|
|
lcd_setalertstatuspgm(lcd_msg); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
cli(); // Stop interrupts
|
|
|
cli(); // Stop interrupts
|
|
|
disable_all_heaters(); |
|
|
disable_all_heaters(); |
|
|
|
|
|
|
|
|
disable_all_steppers(); |
|
|
disable_all_steppers(); |
|
|
|
|
|
|
|
|
#if HAS_POWER_SWITCH |
|
|
#if HAS_POWER_SWITCH |
|
@ -6386,7 +6388,6 @@ void kill() |
|
|
|
|
|
|
|
|
SERIAL_ERROR_START; |
|
|
SERIAL_ERROR_START; |
|
|
SERIAL_ERRORLNPGM(MSG_ERR_KILLED); |
|
|
SERIAL_ERRORLNPGM(MSG_ERR_KILLED); |
|
|
LCD_ALERTMESSAGEPGM(MSG_KILLED); |
|
|
|
|
|
|
|
|
|
|
|
// FMC small patch to update the LCD before ending
|
|
|
// FMC small patch to update the LCD before ending
|
|
|
sei(); // enable interrupts
|
|
|
sei(); // enable interrupts
|
|
|