Skip to content

Commit

Permalink
Ensure M109 calls autotemp
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Sep 29, 2018
1 parent 501b837 commit e6339a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8416,8 +8416,9 @@ inline void gcode_M109() {
if (target_extruder != active_extruder) return;
#endif

const bool no_wait_for_cooling = parser.seenval('S');
if (no_wait_for_cooling || parser.seenval('R')) {
const bool no_wait_for_cooling = parser.seenval('S'),
set_temp = no_wait_for_cooling || parser.seenval('R')
if (set_temp) {
const int16_t temp = parser.value_celsius();
thermalManager.setTargetHotend(temp, target_extruder);

Expand Down Expand Up @@ -8450,12 +8451,13 @@ inline void gcode_M109() {
#endif
#endif
}
else return;

#if ENABLED(AUTOTEMP)
planner.autotemp_M104_M109();
#endif

if (!set_temp) return;

#if TEMP_RESIDENCY_TIME > 0
millis_t residency_start_ms = 0;
// Loop until the temperature has stabilized
Expand Down

0 comments on commit e6339a4

Please sign in to comment.