Browse Source

Merge pull request #3611 from alephobjects/M108_cancel_heatup

Introduce M108 cancel wait for heatup/cooldown of the hotend and bed
Scott Lahteine 9 years ago
parent
commit
e48502866b
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      Marlin/Marlin_main.cpp

+ 13
- 0
Marlin/Marlin_main.cpp View File

@@ -160,6 +160,7 @@
160 160
  * M105 - Read current temp
161 161
  * M106 - Fan on
162 162
  * M107 - Fan off
163
+ * M108 - Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
163 164
  * M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
164 165
  *        Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
165 166
  *        IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
@@ -1103,6 +1104,7 @@ inline void get_serial_commands() {
1103 1104
 
1104 1105
       // If command was e-stop process now
1105 1106
       if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED));
1107
+      if (strcmp(command, "M108") == 0) cancel_heatup = true;
1106 1108
 
1107 1109
       #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
1108 1110
         last_command_time = ms;
@@ -4517,6 +4519,13 @@ inline void gcode_M105() {
4517 4519
 #endif // FAN_COUNT > 0
4518 4520
 
4519 4521
 /**
4522
+ * M108: Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
4523
+ */
4524
+inline void gcode_M108() {
4525
+  cancel_heatup = true;
4526
+}
4527
+
4528
+/**
4520 4529
  * M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
4521 4530
  *       Rxxx Wait for extruder(s) to reach temperature. Waits when heating and cooling.
4522 4531
  */
@@ -6954,6 +6963,10 @@ void process_next_command() {
6954 6963
         KEEPALIVE_STATE(NOT_BUSY);
6955 6964
         return; // "ok" already printed
6956 6965
 
6966
+      case 108:
6967
+        gcode_M108();
6968
+        break;
6969
+
6957 6970
       case 109: // M109: Wait for temperature
6958 6971
         gcode_M109();
6959 6972
         break;

Loading…
Cancel
Save