Limit set hotend temperature to maxtemp. (#12690)

This commit is contained in:
Roman Moravčík 2018-12-20 22:56:37 +01:00 committed by Scott Lahteine
parent 4dad489a50
commit 98cf546771

View File

@ -407,7 +407,7 @@ class Temperature {
#if ENABLED(AUTO_POWER_CONTROL)
powerManager.power_on();
#endif
target_temperature[HOTEND_INDEX] = celsius;
target_temperature[HOTEND_INDEX] = MIN(celsius, maxttemp[HOTEND_INDEX]);
#if WATCH_HOTENDS
start_watching_heater(HOTEND_INDEX);
#endif