From c8d88a90b5aa3063bb82758aac37ef39f07308e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Morav=C4=8D=C3=ADk?= Date: Fri, 21 Dec 2018 08:28:34 +0100 Subject: [PATCH 1/2] [1.1.x] Limit PID autotune target to maxtemp-15 --- Marlin/temperature.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 665e5b5ec98d..701eaf6b225e 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -308,6 +308,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; return; } + if (target > GHV(BED_MAXTEMP, maxttemp[heater]) - 15) { + SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH); + return; + } + SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START); disable_all_heaters(); // switch off all heaters. From 127118bbc91ae5774492c10d2194f0efae9f238f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Morav=C4=8D=C3=ADk?= Date: Fri, 21 Dec 2018 13:35:25 +0100 Subject: [PATCH 2/2] Fixed compilation. --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 701eaf6b225e..554ee0031359 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -308,7 +308,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; return; } - if (target > GHV(BED_MAXTEMP, maxttemp[heater]) - 15) { + if (target > GHV(BED_MAXTEMP, maxttemp[hotend]) - 15) { SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH); return; }