Browse Source

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

Implements S1 argument in M999
Scott Lahteine 8 years ago
parent
commit
8aa591ca09
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      Marlin/Marlin_main.cpp

+ 11
- 1
Marlin/Marlin_main.cpp View File

3645
     #if ENABLED(MECHANICAL_PROBE)
3645
     #if ENABLED(MECHANICAL_PROBE)
3646
       stow_z_probe();
3646
       stow_z_probe();
3647
     #endif
3647
     #endif
3648
-    
3648
+
3649
     #ifdef Z_PROBE_END_SCRIPT
3649
     #ifdef Z_PROBE_END_SCRIPT
3650
       #if ENABLED(DEBUG_LEVELING_FEATURE)
3650
       #if ENABLED(DEBUG_LEVELING_FEATURE)
3651
         if (DEBUGGING(LEVELING)) {
3651
         if (DEBUGGING(LEVELING)) {
6335
 
6335
 
6336
 /**
6336
 /**
6337
  * M999: Restart after being stopped
6337
  * M999: Restart after being stopped
6338
+ *
6339
+ * Default behaviour is to flush the serial buffer and request
6340
+ * a resend to the host starting on the last N line received.
6341
+ *
6342
+ * Sending "M999 S1" will resume printing without flushing the
6343
+ * existing command buffer.
6344
+ *
6338
  */
6345
  */
6339
 inline void gcode_M999() {
6346
 inline void gcode_M999() {
6340
   Running = true;
6347
   Running = true;
6341
   lcd_reset_alert_level();
6348
   lcd_reset_alert_level();
6349
+
6350
+  if (code_seen('S') && code_value_short() == 1) return;
6351
+
6342
   // gcode_LastN = Stopped_gcode_LastN;
6352
   // gcode_LastN = Stopped_gcode_LastN;
6343
   FlushSerialRequestResend();
6353
   FlushSerialRequestResend();
6344
 }
6354
 }

Loading…
Cancel
Save