[1.1.x] Limit PID autotune target to maxtemp-15 (#12703)

This commit is contained in:
Roman Moravčík authored and Scott Lahteine committed 2019-09-02 05:38:24 -05:00
1 parent 3e459a071a
commit 544990604e
1 file changed
+5
+5
View File
@@ -308,6 +308,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
return; return;
} }
if (target > GHV(BED_MAXTEMP, maxttemp[hotend]) - 15) {
SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH);
return;
}
SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START); SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START);
disable_all_heaters(); // switch off all heaters. disable_all_heaters(); // switch off all heaters.