Improve max temp / target
This commit is contained in:
committed by
Scott Lahteine
parent
df1ef496d1
commit
cfa6c7d45b
@@ -315,7 +315,7 @@ void menu_backlash();
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
#define HOTEND_PID_EDIT_MENU_ITEMS(N) \
|
||||
_HOTEND_PID_EDIT_MENU_ITEMS(N); \
|
||||
EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, thermalManager.heater_maxtemp[N] - HOTEND_OVERSHOOT, []{ _lcd_autotune(heater_id_t(MenuItemBase::itemIndex)); });
|
||||
EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, thermalManager.hotend_max_target(N), []{ _lcd_autotune(heater_id_t(MenuItemBase::itemIndex)); });
|
||||
#else
|
||||
#define HOTEND_PID_EDIT_MENU_ITEMS(N) _HOTEND_PID_EDIT_MENU_ITEMS(N);
|
||||
#endif
|
||||
|
@@ -95,7 +95,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
|
||||
ACTION_ITEM_N_S(m, ui.get_preheat_label(m), MSG_PREHEAT_M, _change_filament_with_preset);
|
||||
#endif
|
||||
EDIT_ITEM_FAST_N(int3, extruder, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[extruder].target,
|
||||
EXTRUDE_MINTEMP, thermalManager.heater_maxtemp[extruder] - HOTEND_OVERSHOOT,
|
||||
EXTRUDE_MINTEMP, thermalManager.hotend_max_target(extruder),
|
||||
_change_filament_with_custom
|
||||
);
|
||||
END_MENU();
|
||||
|
@@ -47,11 +47,11 @@
|
||||
// "Temperature" submenu items
|
||||
//
|
||||
|
||||
void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb) {
|
||||
void Temperature::lcd_preheat(const uint8_t e, const int8_t indh, const int8_t indb) {
|
||||
UNUSED(e); UNUSED(indh); UNUSED(indb);
|
||||
#if HAS_HOTEND
|
||||
if (indh >= 0 && ui.material_preset[indh].hotend_temp > 0)
|
||||
setTargetHotend(_MIN(thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.material_preset[indh].hotend_temp), e);
|
||||
setTargetHotend(_MIN(thermalManager.hotend_max_target(e), ui.material_preset[indh].hotend_temp), e);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
if (indb >= 0 && ui.material_preset[indb].bed_temp > 0) setTargetBed(ui.material_preset[indb].bed_temp);
|
||||
@@ -70,7 +70,7 @@ void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t i
|
||||
void do_preheat_end_m() { _preheat_end(editable.int8, 0); }
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
inline void _preheat_bed(const uint8_t m) { thermalManager.lcd_preheat(-1, -1, m); }
|
||||
inline void _preheat_bed(const uint8_t m) { thermalManager.lcd_preheat(0, -1, m); }
|
||||
#endif
|
||||
#if HAS_COOLER
|
||||
inline void _precool_laser(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, -1); }
|
||||
@@ -163,15 +163,15 @@ void menu_temperature() {
|
||||
// Nozzle [1-5]:
|
||||
//
|
||||
#if HOTENDS == 1
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - (HOTEND_OVERSHOOT), []{ thermalManager.start_watching_hotend(0); });
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); });
|
||||
#elif HAS_MULTI_HOTEND
|
||||
HOTEND_LOOP()
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.heater_maxtemp[e] - (HOTEND_OVERSHOOT), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.hotend_max_target(e), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
||||
LOOP_S_L_N(e, 1, EXTRUDERS)
|
||||
EDIT_ITEM_FAST_N(uint16_3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.heater_maxtemp[0] - (HOTEND_OVERSHOOT));
|
||||
EDIT_ITEM_FAST_N(uint16_3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.hotend_max_target(0));
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -185,7 +185,7 @@ void menu_temperature() {
|
||||
// Chamber:
|
||||
//
|
||||
#if HAS_HEATED_CHAMBER
|
||||
EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 10, thermalManager.start_watching_chamber);
|
||||
EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAX_TARGET, thermalManager.start_watching_chamber);
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -194,7 +194,7 @@ void menu_temperature() {
|
||||
#if HAS_COOLER
|
||||
editable.state = cooler.is_enabled();
|
||||
EDIT_ITEM(bool, MSG_COOLER(TOGGLE), &cooler.state, []{ if (editable.state) cooler.disable(); else cooler.enable(); });
|
||||
EDIT_ITEM_FAST(int3, MSG_COOLER, &thermalManager.temp_cooler.target, COOLER_MINTEMP + 2, COOLER_MAXTEMP - 2, thermalManager.start_watching_cooler);
|
||||
EDIT_ITEM_FAST(int3, MSG_COOLER, &thermalManager.temp_cooler.target, COOLER_MIN_TARGET, COOLER_MAX_TARGET, thermalManager.start_watching_cooler);
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@@ -126,15 +126,15 @@ void menu_tune() {
|
||||
// Nozzle [1-4]:
|
||||
//
|
||||
#if HOTENDS == 1
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(0); });
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); });
|
||||
#elif HAS_MULTI_HOTEND
|
||||
HOTEND_LOOP()
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.hotend_max_target(e), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
||||
LOOP_S_L_N(e, 1, EXTRUDERS)
|
||||
EDIT_ITEM_FAST_N(uint16_3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.heater_maxtemp[0] - HOTEND_OVERSHOOT);
|
||||
EDIT_ITEM_FAST_N(uint16_3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.hotend_max_target(0));
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@@ -126,7 +126,7 @@ void _lcd_ubl_custom_mesh() {
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_UBL_BUILD_MESH_MENU);
|
||||
#if HAS_HOTEND
|
||||
EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
|
||||
EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, thermalManager.hotend_max_target(0));
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, BED_MAX_TARGET);
|
||||
|
Reference in New Issue
Block a user