Browse Source

Throw an error in PID_autotune for E < -1

Scott Lahteine 8 years ago
parent
commit
3c68be79dc
1 changed files with 12 additions and 9 deletions
  1. 12
    9
      Marlin/temperature.cpp

+ 12
- 9
Marlin/temperature.cpp View File

@@ -206,15 +206,18 @@ unsigned char Temperature::soft_pwm[HOTENDS];
206 206
       next_auto_fan_check_ms = temp_ms + 2500UL;
207 207
     #endif
208 208
 
209
-    if (false
210
-      #if ENABLED(PIDTEMP)
211
-         || hotend >= HOTENDS
212
-      #else
213
-         || hotend >= 0
214
-      #endif
215
-      #if DISABLED(PIDTEMPBED)
216
-         || hotend < 0
217
-      #endif
209
+    if (hotend >=
210
+        #if ENABLED(PIDTEMP)
211
+          HOTENDS
212
+        #else
213
+          0
214
+        #endif
215
+      || hotend <
216
+        #if ENABLED(PIDTEMPBED)
217
+          -1
218
+        #else
219
+          0
220
+        #endif
218 221
     ) {
219 222
       SERIAL_ECHOLN(MSG_PID_BAD_EXTRUDER_NUM);
220 223
       return;

Loading…
Cancel
Save