Limit top bed temp to BED_MAXTEMP - 10

The chances of a 10° overshoot is pretty minimal.
This commit is contained in:
Scott Lahteine 2019-03-11 16:32:34 -05:00
parent 98b55421a5
commit e52bcc9408
8 changed files with 9 additions and 9 deletions

View file

@ -571,8 +571,8 @@ void GcodeSuite::G26() {
if (parser.seenval('B')) { if (parser.seenval('B')) {
g26_bed_temp = parser.value_celsius(); g26_bed_temp = parser.value_celsius();
if (g26_bed_temp && !WITHIN(g26_bed_temp, 40, (BED_MAXTEMP - 15))) { if (g26_bed_temp && !WITHIN(g26_bed_temp, 40, (BED_MAXTEMP - 10))) {
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", int(BED_MAXTEMP - 15), "C)."); SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", int(BED_MAXTEMP - 10), "C).");
return; return;
} }
} }

View file

@ -52,7 +52,7 @@ void GcodeSuite::M145() {
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
if (parser.seenval('B')) { if (parser.seenval('B')) {
v = parser.value_int(); v = parser.value_int();
ui.preheat_bed_temp[material] = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15); ui.preheat_bed_temp[material] = constrain(v, BED_MINTEMP, BED_MAXTEMP - 10);
} }
#endif #endif
} }

View file

@ -609,7 +609,7 @@ namespace ExtUI {
const int16_t e = heater - H0; const int16_t e = heater - H0;
#if HAS_HEATED_BED #if HAS_HEATED_BED
if (heater == BED) if (heater == BED)
thermalManager.setTargetBed(clamp(value, 0, BED_MAXTEMP - 15)); thermalManager.setTargetBed(clamp(value, 0, BED_MAXTEMP - 10));
else else
#endif #endif
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e); thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);

View file

@ -238,7 +238,7 @@ static void lcd_factory_settings() {
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - 15); MENU_ITEM_EDIT(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - 15);
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM_EDIT(int3, MSG_BED, &ui.preheat_bed_temp[material], BED_MINTEMP, BED_MAXTEMP - 15); MENU_ITEM_EDIT(int3, MSG_BED, &ui.preheat_bed_temp[material], BED_MINTEMP, BED_MAXTEMP - 10);
#endif #endif
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);

View file

@ -380,7 +380,7 @@ void menu_temperature() {
// Bed: // Bed:
// //
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 5, thermalManager.start_watching_bed); MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed);
#endif #endif
// //

View file

@ -143,7 +143,7 @@ void menu_tune() {
// Bed: // Bed:
// //
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 15, thermalManager.start_watching_bed); MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed);
#endif #endif
// //

View file

@ -131,7 +131,7 @@ void _lcd_ubl_custom_mesh() {
MENU_BACK(MSG_UBL_BUILD_MESH_MENU); MENU_BACK(MSG_UBL_BUILD_MESH_MENU);
MENU_ITEM_EDIT(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10)); MENU_ITEM_EDIT(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10));
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM_EDIT(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 15)); MENU_ITEM_EDIT(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 10));
#endif #endif
MENU_ITEM(function, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh); MENU_ITEM(function, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh);
END_MENU(); END_MENU();

View file

@ -632,7 +632,7 @@ class Temperature {
#endif #endif
temp_bed.target = temp_bed.target =
#ifdef BED_MAXTEMP #ifdef BED_MAXTEMP
MIN(celsius, BED_MAXTEMP - 15) MIN(celsius, BED_MAXTEMP - 10)
#else #else
celsius celsius
#endif #endif