Browse Source

Apply maxtemp patch

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
37176ed2b9
  1. 4
      Marlin/src/lcd/extui/ui_api.cpp
  2. 2
      Marlin/src/lcd/menu/menu_advanced.cpp
  3. 2
      Marlin/src/lcd/menu/menu_filament.cpp
  4. 7
      Marlin/src/lcd/menu/menu_temperature.cpp
  5. 2
      Marlin/src/lcd/menu/menu_tune.cpp
  6. 1
      Marlin/src/module/temperature.cpp
  7. 2
      Marlin/src/module/temperature.h

4
Marlin/src/lcd/extui/ui_api.cpp

@ -946,7 +946,7 @@ namespace ExtUI {
{
#if HAS_HOTEND
const int16_t e = heater - H0;
thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.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] - HOTEND_OVERSHOOT)), e);
thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
#endif
}

2
Marlin/src/lcd/menu/menu_advanced.cpp

@ -298,7 +298,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] - HOTEND_OVERSHOOT, []{ _lcd_autotune(MenuItemBase::itemIndex); });
EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, thermalManager.heater_maxtemp[N] - HOTEND_OVERSHOOT, []{ _lcd_autotune(MenuItemBase::itemIndex); });
#else
#define PID_EDIT_MENU_ITEMS(N) _PID_EDIT_MENU_ITEMS(N);
#endif

2
Marlin/src/lcd/menu/menu_filament.cpp

@ -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] - HOTEND_OVERSHOOT, []{
EDIT_ITEM_FAST(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_extruder].target, EXTRUDE_MINTEMP, thermalManager.heater_maxtemp[extruder] - HOTEND_OVERSHOOT, []{
_change_filament(thermalManager.temp_hotend[_change_filament_extruder].target);
});
END_MENU();

7
Marlin/src/lcd/menu/menu_temperature.cpp

@ -50,10 +50,9 @@ 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] - HOTEND_OVERSHOOT, ui.preheat_hotend_temp[indh]), e);
setTargetHotend(_MIN(thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.preheat_hotend_temp[indh]), e);
#else
UNUSED(e);
UNUSED(temph);
UNUSED(e); UNUSED(indh);
#endif
#if HAS_HEATED_BED
if (indb >= 0 && ui.preheat_bed_temp[indb] > 0) setTargetBed(ui.preheat_bed_temp[indb]);
@ -166,7 +165,7 @@ void menu_temperature() {
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] - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
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); });
#endif
#if ENABLED(SINGLENOZZLE)

2
Marlin/src/lcd/menu/menu_tune.cpp

@ -121,7 +121,7 @@ void menu_tune() {
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] - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
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); });
#endif
#if ENABLED(SINGLENOZZLE)

1
Marlin/src/module/temperature.cpp

@ -142,6 +142,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
#if HAS_HOTEND
hotend_info_t Temperature::temp_hotend[HOTEND_TEMPS]; // = { 0 }
const int16_t Temperature::heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP);
#endif
#if ENABLED(AUTO_POWER_E_FANS)

2
Marlin/src/module/temperature.h

@ -322,7 +322,7 @@ class Temperature {
#if HAS_HOTEND
#define HOTEND_TEMPS (HOTENDS + ENABLED(TEMP_SENSOR_1_AS_REDUNDANT))
static hotend_info_t temp_hotend[HOTEND_TEMPS];
static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP);
static const int16_t heater_maxtemp[HOTENDS];
#endif
TERN_(HAS_HEATED_BED, static bed_info_t temp_bed);
TERN_(HAS_TEMP_PROBE, static probe_info_t temp_probe);

Loading…
Cancel
Save