Merge pull request #3789 from jbrazio/feature/m999-s-arg

Implements S1 argument in M999
This commit is contained in:
Scott Lahteine 2016-05-18 16:58:09 -07:00
commit 8aa591ca09

View File

@ -3645,7 +3645,7 @@ inline void gcode_G28() {
#if ENABLED(MECHANICAL_PROBE) #if ENABLED(MECHANICAL_PROBE)
stow_z_probe(); stow_z_probe();
#endif #endif
#ifdef Z_PROBE_END_SCRIPT #ifdef Z_PROBE_END_SCRIPT
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
@ -6335,10 +6335,20 @@ inline void gcode_M907() {
/** /**
* M999: Restart after being stopped * M999: Restart after being stopped
*
* Default behaviour is to flush the serial buffer and request
* a resend to the host starting on the last N line received.
*
* Sending "M999 S1" will resume printing without flushing the
* existing command buffer.
*
*/ */
inline void gcode_M999() { inline void gcode_M999() {
Running = true; Running = true;
lcd_reset_alert_level(); lcd_reset_alert_level();
if (code_seen('S') && code_value_short() == 1) return;
// gcode_LastN = Stopped_gcode_LastN; // gcode_LastN = Stopped_gcode_LastN;
FlushSerialRequestResend(); FlushSerialRequestResend();
} }