Browse Source

Ensure M109 handles autotemp

Scott Lahteine 6 years ago
parent
commit
1410e79e7f
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      Marlin/src/gcode/temperature/M104_M109.cpp

+ 5
- 4
Marlin/src/gcode/temperature/M104_M109.cpp View File

@@ -89,8 +89,9 @@ void GcodeSuite::M109() {
89 89
     if (target_extruder != active_extruder) return;
90 90
   #endif
91 91
 
92
-  const bool no_wait_for_cooling = parser.seenval('S');
93
-  if (no_wait_for_cooling || parser.seenval('R')) {
92
+  const bool no_wait_for_cooling = parser.seenval('S'),
93
+             set_temp = no_wait_for_cooling || parser.seenval('R')
94
+  if (set_temp) {
94 95
     const int16_t temp = parser.value_celsius();
95 96
     thermalManager.setTargetHotend(temp, target_extruder);
96 97
 
@@ -123,11 +124,11 @@ void GcodeSuite::M109() {
123 124
         #endif
124 125
     #endif
125 126
   }
126
-  else return;
127 127
 
128 128
   #if ENABLED(AUTOTEMP)
129 129
     planner.autotemp_M104_M109();
130 130
   #endif
131 131
 
132
-  (void)thermalManager.wait_for_hotend(target_extruder, no_wait_for_cooling);
132
+  if (set_temp)
133
+    (void)thermalManager.wait_for_hotend(target_extruder, no_wait_for_cooling);
133 134
 }

Loading…
Cancel
Save