Browse Source

Optimize emergency parser check

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
3ba374a29e
  1. 9
      Marlin/src/gcode/queue.cpp

9
Marlin/src/gcode/queue.cpp

@ -538,12 +538,11 @@ void GCodeQueue::get_serial_commands() {
#if DISABLED(EMERGENCY_PARSER) #if DISABLED(EMERGENCY_PARSER)
// Process critical commands early // Process critical commands early
if (strcmp_P(command, PSTR("M108")) == 0) { if (command[0] == 'M') switch (command[3]) {
wait_for_heatup = false; case '8': if (command[2] == '0' && command[1] == '1') { wait_for_heatup = false; TERN_(HAS_LCD_MENU, wait_for_user = false); } break;
TERN_(HAS_LCD_MENU, wait_for_user = false); case '2': if (command[2] == '1' && command[1] == '1') kill(M112_KILL_STR, nullptr, true); break;
case '0': if (command[1] == '4' && command[2] == '1') quickstop_stepper(); break;
} }
if (strcmp_P(command, PSTR("M112")) == 0) kill(M112_KILL_STR, nullptr, true);
if (strcmp_P(command, PSTR("M410")) == 0) quickstop_stepper();
#endif #endif
#if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0 #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0

Loading…
Cancel
Save