Drop intermediate float in HEATER_0_USES_MAX6675 test

This commit is contained in:
Scott Lahteine 2016-08-08 22:21:32 -07:00
parent 3e8f9ecd1c
commit d3ba878f70

View file

@ -683,9 +683,8 @@ void Temperature::manage_heater() {
updateTemperaturesFromRawValues(); // also resets the watchdog
#if ENABLED(HEATER_0_USES_MAX6675)
float ct = current_temperature[0];
if (ct > min(HEATER_0_MAXTEMP, 1023)) max_temp_error(0);
if (ct < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0);
if (current_temperature[0] > min(HEATER_0_MAXTEMP, 1023)) max_temp_error(0);
if (current_temperature[0] < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0);
#endif
#if (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0) || (ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0) || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN