Treat temperature as integer, when possible

This commit is contained in:
Scott Lahteine
2017-05-03 17:12:14 -05:00
parent 1b2c7ec20a
commit 2658cc707a
6 changed files with 89 additions and 91 deletions

View File

@ -1179,14 +1179,14 @@ void kill_screen(const char* lcd_msg) {
}
#endif
constexpr int heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
/**
*
* "Prepare" submenu items
*
*/
void _lcd_preheat(int endnum, const float temph, const float tempb, const int fan) {
void _lcd_preheat(const int endnum, const int16_t temph, const int16_t tempb, const int16_t fan) {
if (temph > 0) thermalManager.setTargetHotend(min(heater_maxtemp[endnum], temph), endnum);
#if TEMP_SENSOR_BED != 0
if (tempb >= 0) thermalManager.setTargetBed(tempb);