Procházet zdrojové kódy

Apply maxtemp patch

Scott Lahteine před 4 roky
rodič
revize
37176ed2b9

+ 2
- 2
Marlin/src/lcd/extui/ui_api.cpp Zobrazit soubor

@@ -946,7 +946,7 @@ namespace ExtUI {
946 946
       {
947 947
         #if HAS_HOTEND
948 948
           const int16_t e = heater - H0;
949
-          thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
949
+          thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
950 950
         #endif
951 951
       }
952 952
   }
@@ -958,7 +958,7 @@ namespace ExtUI {
958 958
     #if HAS_HOTEND
959 959
       const int16_t e = extruder - E0;
960 960
       enableHeater(extruder);
961
-      thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
961
+      thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
962 962
     #endif
963 963
   }
964 964
 

+ 1
- 1
Marlin/src/lcd/menu/menu_advanced.cpp Zobrazit soubor

@@ -298,7 +298,7 @@ void menu_cancelobject();
298 298
     #if ENABLED(PID_AUTOTUNE_MENU)
299 299
       #define PID_EDIT_MENU_ITEMS(N) \
300 300
         _PID_EDIT_MENU_ITEMS(N); \
301
-        EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, heater_maxtemp[N] - HOTEND_OVERSHOOT, []{ _lcd_autotune(MenuItemBase::itemIndex); });
301
+        EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, thermalManager.heater_maxtemp[N] - HOTEND_OVERSHOOT, []{ _lcd_autotune(MenuItemBase::itemIndex); });
302 302
     #else
303 303
       #define PID_EDIT_MENU_ITEMS(N) _PID_EDIT_MENU_ITEMS(N);
304 304
     #endif

+ 1
- 1
Marlin/src/lcd/menu/menu_filament.cpp Zobrazit soubor

@@ -83,7 +83,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
83 83
   BACK_ITEM(MSG_BACK);
84 84
   ACTION_ITEM(MSG_PREHEAT_1, []{ _change_filament(ui.preheat_hotend_temp[0]); });
85 85
   ACTION_ITEM(MSG_PREHEAT_2, []{ _change_filament(ui.preheat_hotend_temp[1]); });
86
-  EDIT_ITEM_FAST(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_extruder].target, EXTRUDE_MINTEMP, heater_maxtemp[extruder] - HOTEND_OVERSHOOT, []{
86
+  EDIT_ITEM_FAST(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_extruder].target, EXTRUDE_MINTEMP, thermalManager.heater_maxtemp[extruder] - HOTEND_OVERSHOOT, []{
87 87
     _change_filament(thermalManager.temp_hotend[_change_filament_extruder].target);
88 88
   });
89 89
   END_MENU();

+ 3
- 4
Marlin/src/lcd/menu/menu_temperature.cpp Zobrazit soubor

@@ -50,10 +50,9 @@ uint8_t MarlinUI::preheat_fan_speed[2];
50 50
 void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb) {
51 51
   #if HAS_HOTEND
52 52
     if (indh >= 0 && ui.preheat_hotend_temp[indh] > 0)
53
-      setTargetHotend(_MIN(heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.preheat_hotend_temp[indh]), e);
53
+      setTargetHotend(_MIN(thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.preheat_hotend_temp[indh]), e);
54 54
   #else
55
-    UNUSED(e);
56
-    UNUSED(temph);
55
+    UNUSED(e); UNUSED(indh);
57 56
   #endif
58 57
   #if HAS_HEATED_BED
59 58
     if (indb >= 0 && ui.preheat_bed_temp[indb] > 0) setTargetBed(ui.preheat_bed_temp[indb]);
@@ -166,7 +165,7 @@ void menu_temperature() {
166 165
     EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(0); });
167 166
   #elif HAS_MULTI_HOTEND
168 167
     HOTEND_LOOP()
169
-      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); });
168
+      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); });
170 169
   #endif
171 170
 
172 171
   #if ENABLED(SINGLENOZZLE)

+ 1
- 1
Marlin/src/lcd/menu/menu_tune.cpp Zobrazit soubor

@@ -121,7 +121,7 @@ void menu_tune() {
121 121
     EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(0); });
122 122
   #elif HAS_MULTI_HOTEND
123 123
     HOTEND_LOOP()
124
-      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); });
124
+      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); });
125 125
   #endif
126 126
 
127 127
   #if ENABLED(SINGLENOZZLE)

+ 1
- 0
Marlin/src/module/temperature.cpp Zobrazit soubor

@@ -142,6 +142,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
142 142
 
143 143
 #if HAS_HOTEND
144 144
   hotend_info_t Temperature::temp_hotend[HOTEND_TEMPS]; // = { 0 }
145
+  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);
145 146
 #endif
146 147
 
147 148
 #if ENABLED(AUTO_POWER_E_FANS)

+ 1
- 1
Marlin/src/module/temperature.h Zobrazit soubor

@@ -322,7 +322,7 @@ class Temperature {
322 322
     #if HAS_HOTEND
323 323
       #define HOTEND_TEMPS (HOTENDS + ENABLED(TEMP_SENSOR_1_AS_REDUNDANT))
324 324
       static hotend_info_t temp_hotend[HOTEND_TEMPS];
325
-      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);
325
+      static const int16_t heater_maxtemp[HOTENDS];
326 326
     #endif
327 327
     TERN_(HAS_HEATED_BED, static bed_info_t temp_bed);
328 328
     TERN_(HAS_TEMP_PROBE, static probe_info_t temp_probe);

Loading…
Zrušit
Uložit