Add HOTEND_OVERSHOOT
This commit is contained in:
parent
8b3c7dda75
commit
33217b0dd0
|
@ -582,7 +582,7 @@ void GcodeSuite::G26() {
|
|||
|
||||
if (parser.seenval('H')) {
|
||||
g26_hotend_temp = parser.value_celsius();
|
||||
if (!WITHIN(g26_hotend_temp, 165, (HEATER_0_MAXTEMP - 15))) {
|
||||
if (!WITHIN(g26_hotend_temp, 165, (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT))) {
|
||||
SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible.");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ void GcodeSuite::M145() {
|
|||
int v;
|
||||
if (parser.seenval('H')) {
|
||||
v = parser.value_int();
|
||||
ui.preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
|
||||
ui.preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
|
||||
}
|
||||
if (parser.seenval('F')) {
|
||||
v = parser.value_int();
|
||||
|
|
|
@ -472,7 +472,10 @@
|
|||
|
||||
#if HOTENDS
|
||||
#define HAS_HOTEND 1
|
||||
#if HOTENDS > 1
|
||||
#ifndef HOTEND_OVERSHOOT
|
||||
#define HOTEND_OVERSHOOT 15
|
||||
#endif
|
||||
#if HOTENDS_ > 1
|
||||
#define HAS_MULTI_HOTEND 1
|
||||
#define HAS_HOTEND_OFFSET 1
|
||||
#endif
|
||||
|
|
|
@ -946,7 +946,7 @@ namespace ExtUI {
|
|||
{
|
||||
#if HAS_HOTEND
|
||||
const int16_t e = heater - H0;
|
||||
thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - 15)), e);
|
||||
thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -958,7 +958,7 @@ namespace ExtUI {
|
|||
#if HAS_HOTEND
|
||||
const int16_t e = extruder - E0;
|
||||
enableHeater(extruder);
|
||||
thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - 15)), e);
|
||||
thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -257,8 +257,8 @@ void menu_cancelobject();
|
|||
//
|
||||
#if BOTH(AUTOTEMP, HAS_TEMP_HOTEND)
|
||||
EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
|
||||
EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
|
||||
EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
|
||||
EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - HOTEND_OVERSHOOT);
|
||||
EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - HOTEND_OVERSHOOT);
|
||||
EDIT_ITEM(float42_52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
|
||||
#endif
|
||||
|
||||
|
@ -304,7 +304,7 @@ void menu_cancelobject();
|
|||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
#define PID_EDIT_MENU_ITEMS(N) \
|
||||
_PID_EDIT_MENU_ITEMS(N); \
|
||||
EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, heater_maxtemp[N] - 15, []{ _lcd_autotune(MenuItemBase::itemIndex); });
|
||||
EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, heater_maxtemp[N] - HOTEND_OVERSHOOT, []{ _lcd_autotune(MenuItemBase::itemIndex); });
|
||||
#else
|
||||
#define PID_EDIT_MENU_ITEMS(N) _PID_EDIT_MENU_ITEMS(N);
|
||||
#endif
|
||||
|
|
|
@ -331,7 +331,7 @@ void menu_advanced_settings();
|
|||
BACK_ITEM(MSG_CONFIGURATION);
|
||||
EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);
|
||||
#if HAS_TEMP_HOTEND
|
||||
EDIT_ITEM(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - 15);
|
||||
EDIT_ITEM(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - HOTEND_OVERSHOOT);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
EDIT_ITEM(int3, MSG_BED, &ui.preheat_bed_temp[material], BED_MINTEMP, BED_MAX_TARGET);
|
||||
|
|
|
@ -83,7 +83,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
|
|||
BACK_ITEM(MSG_BACK);
|
||||
ACTION_ITEM(MSG_PREHEAT_1, []{ _change_filament(ui.preheat_hotend_temp[0]); });
|
||||
ACTION_ITEM(MSG_PREHEAT_2, []{ _change_filament(ui.preheat_hotend_temp[1]); });
|
||||
EDIT_ITEM_FAST(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_extruder].target, EXTRUDE_MINTEMP, heater_maxtemp[extruder] - 15, []{
|
||||
EDIT_ITEM_FAST(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_extruder].target, EXTRUDE_MINTEMP, heater_maxtemp[extruder] - HOTEND_OVERSHOOT, []{
|
||||
_change_filament(thermalManager.temp_hotend[_change_filament_extruder].target);
|
||||
});
|
||||
END_MENU();
|
||||
|
|
|
@ -50,7 +50,7 @@ uint8_t MarlinUI::preheat_fan_speed[2];
|
|||
void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb) {
|
||||
#if HAS_HOTEND
|
||||
if (indh >= 0 && ui.preheat_hotend_temp[indh] > 0)
|
||||
setTargetHotend(_MIN(heater_maxtemp[e] - 15, ui.preheat_hotend_temp[indh]), e);
|
||||
setTargetHotend(_MIN(heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.preheat_hotend_temp[indh]), e);
|
||||
#else
|
||||
UNUSED(e);
|
||||
UNUSED(temph);
|
||||
|
@ -163,14 +163,14 @@ void menu_temperature() {
|
|||
// Nozzle [1-5]:
|
||||
//
|
||||
#if HOTENDS == 1
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT, []{ 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, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
|
||||
EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
|
||||
#endif
|
||||
|
||||
//
|
||||
|
|
|
@ -118,14 +118,14 @@ void menu_tune() {
|
|||
// Nozzle [1-4]:
|
||||
//
|
||||
#if HOTENDS == 1
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT, []{ 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, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
|
||||
EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
|
||||
#endif
|
||||
|
||||
//
|
||||
|
|
|
@ -128,7 +128,7 @@ void _lcd_ubl_build_custom_mesh() {
|
|||
void _lcd_ubl_custom_mesh() {
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_UBL_BUILD_MESH_MENU);
|
||||
EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 15));
|
||||
EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
|
||||
#if HAS_HEATED_BED
|
||||
EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, BED_MAX_TARGET);
|
||||
#endif
|
||||
|
|
|
@ -400,7 +400,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
|||
|
||||
TERN_(HAS_AUTO_FAN, next_auto_fan_check_ms = next_temp_ms + 2500UL);
|
||||
|
||||
if (target > GHV(BED_MAX_TARGET, temp_range[heater].maxtemp - 15)) {
|
||||
if (target > GHV(BED_MAX_TARGET, temp_range[heater].maxtemp - HOTEND_OVERSHOOT)) {
|
||||
SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
|
||||
return;
|
||||
|
|
|
@ -588,7 +588,7 @@ class Temperature {
|
|||
start_preheat_time(ee);
|
||||
#endif
|
||||
TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
|
||||
temp_hotend[ee].target = _MIN(celsius, temp_range[ee].maxtemp - 15);
|
||||
temp_hotend[ee].target = _MIN(celsius, temp_range[ee].maxtemp - HOTEND_OVERSHOOT);
|
||||
start_watching_hotend(ee);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue