From 986c4390f08cd0094367362ac0e65e67220c1a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Morav=C4=8D=C3=ADk?= Date: Thu, 27 Dec 2018 18:43:07 +0100 Subject: [PATCH] [1.1.x] Limit PID autotune target to maxtemp-15 (#12703) --- Marlin/temperature.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 665e5b5ec9..554ee00313 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[hotend]) - 15) { + SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH); + return; + } + SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START); disable_all_heaters(); // switch off all heaters.