浏览代码

Ensure M109 handles autotemp

Scott Lahteine 6 年前
父节点
当前提交
1410e79e7f
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5
    4
      Marlin/src/gcode/temperature/M104_M109.cpp

+ 5
- 4
Marlin/src/gcode/temperature/M104_M109.cpp 查看文件

@@ -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
 }

正在加载...
取消
保存