[2.0.x] Limit PID autotune target to maxtemp-15 (#12691)

This commit is contained in:
Roman Moravčík 2018-12-20 22:55:30 +01:00 committed by Scott Lahteine
parent 8dcc28c9ae
commit 4dad489a50

View file

@ -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();