From 4dad489a50cb6e5b63968e40ffb3874b70b395b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Morav=C4=8D=C3=ADk?= Date: Thu, 20 Dec 2018 22:55:30 +0100 Subject: [PATCH] [2.0.x] Limit PID autotune target to maxtemp-15 (#12691) --- Marlin/src/module/temperature.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index c086d29e7..89eaee2ef 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -286,6 +286,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; next_auto_fan_check_ms = next_temp_ms + 2500UL; #endif + 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();