Browse Source

Merge pull request #851 from DanNixon/estop

Implemented M112
nothinman 11 years ago
parent
commit
aed5ec008a
2 changed files with 12 additions and 0 deletions
  1. 11
    0
      Marlin/Marlin_main.cpp
  2. 1
    0
      README.md

+ 11
- 0
Marlin/Marlin_main.cpp View File

673
           }
673
           }
674
 
674
 
675
         }
675
         }
676
+
677
+        //If command was e-stop process now
678
+        if(strcmp(cmdbuffer[bufindw], "M112") == 0)
679
+          kill();
680
+        
676
         bufindw = (bufindw + 1)%BUFSIZE;
681
         bufindw = (bufindw + 1)%BUFSIZE;
677
         buflen += 1;
682
         buflen += 1;
678
       }
683
       }
1830
 #endif
1835
 #endif
1831
       setWatch();
1836
       setWatch();
1832
       break;
1837
       break;
1838
+    case 112: //  M112 -Emergency Stop
1839
+      kill();
1840
+      break;
1833
     case 140: // M140 set bed temp
1841
     case 140: // M140 set bed temp
1834
       if (code_seen('S')) setTargetBed(code_value());
1842
       if (code_seen('S')) setTargetBed(code_value());
1835
       break;
1843
       break;
3426
 
3434
 
3427
 void manage_inactivity()
3435
 void manage_inactivity()
3428
 {
3436
 {
3437
+  if(buflen < (BUFSIZE-1))
3438
+    get_command();
3439
+
3429
   if( (millis() - previous_millis_cmd) >  max_inactive_time )
3440
   if( (millis() - previous_millis_cmd) >  max_inactive_time )
3430
     if(max_inactive_time)
3441
     if(max_inactive_time)
3431
       kill();
3442
       kill();

+ 1
- 0
README.md View File

195
 *  M107 - Fan off
195
 *  M107 - Fan off
196
 *  M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
196
 *  M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
197
 *         Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
197
 *         Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
198
+*  M112 - Emergency stop
198
 *  M114 - Output current position to serial port
199
 *  M114 - Output current position to serial port
199
 *  M115 - Capabilities string
200
 *  M115 - Capabilities string
200
 *  M117 - display message
201
 *  M117 - display message

Loading…
Cancel
Save