From 3c68be79dc139788fb976a150088e4ea5946708b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 9 Jun 2016 16:41:53 -0700 Subject: [PATCH] Throw an error in PID_autotune for E < -1 --- Marlin/temperature.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 61d9fe2e2f..bb6e1e6aff 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -206,15 +206,18 @@ unsigned char Temperature::soft_pwm[HOTENDS]; next_auto_fan_check_ms = temp_ms + 2500UL; #endif - if (false - #if ENABLED(PIDTEMP) - || hotend >= HOTENDS - #else - || hotend >= 0 - #endif - #if DISABLED(PIDTEMPBED) - || hotend < 0 - #endif + if (hotend >= + #if ENABLED(PIDTEMP) + HOTENDS + #else + 0 + #endif + || hotend < + #if ENABLED(PIDTEMPBED) + -1 + #else + 0 + #endif ) { SERIAL_ECHOLN(MSG_PID_BAD_EXTRUDER_NUM); return;