Skip to content

Commit

Permalink
Merge pull request #3611 from alephobjects/M108_cancel_heatup
Browse files Browse the repository at this point in the history
Introduce M108 cancel wait for heatup/cooldown of the hotend and bed
  • Loading branch information
thinkyhead committed Jul 4, 2016
2 parents d70197f + 840e13f commit e485028
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
* M105 - Read current temp
* M106 - Fan on
* M107 - Fan off
* M108 - Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
* M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
* Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
* IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
Expand Down Expand Up @@ -1103,6 +1104,7 @@ inline void get_serial_commands() {

// If command was e-stop process now
if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED));
if (strcmp(command, "M108") == 0) cancel_heatup = true;

This comment has been minimized.

Copy link
@scalez

scalez Jul 6, 2016

Contributor

@thinkyhead thank you so much for merging the PR! Could you please rename the cancel_heatup identifier to cancel_wait_heatup as was done to the PR toward MarlinDev?

This comment has been minimized.

Copy link
@thinkyhead

thinkyhead Jul 6, 2016

Author Member

#if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
last_command_time = ms;
Expand Down Expand Up @@ -4516,6 +4518,13 @@ inline void gcode_M105() {

#endif // FAN_COUNT > 0

/**
* M108: Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
*/
inline void gcode_M108() {
cancel_heatup = true;
}

/**
* M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
* Rxxx Wait for extruder(s) to reach temperature. Waits when heating and cooling.
Expand Down Expand Up @@ -6954,6 +6963,10 @@ void process_next_command() {
KEEPALIVE_STATE(NOT_BUSY);
return; // "ok" already printed

case 108:
gcode_M108();
break;

case 109: // M109: Wait for temperature
gcode_M109();
break;
Expand Down

0 comments on commit e485028

Please sign in to comment.