Browse Source

Add HOTEND_OVERSHOOT

Scott Lahteine 4 years ago
parent
commit
33217b0dd0

+ 1
- 1
Marlin/src/gcode/bedlevel/G26.cpp View File

@@ -582,7 +582,7 @@ void GcodeSuite::G26() {
582 582
 
583 583
   if (parser.seenval('H')) {
584 584
     g26_hotend_temp = parser.value_celsius();
585
-    if (!WITHIN(g26_hotend_temp, 165, (HEATER_0_MAXTEMP - 15))) {
585
+    if (!WITHIN(g26_hotend_temp, 165, (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT))) {
586 586
       SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible.");
587 587
       return;
588 588
     }

+ 1
- 1
Marlin/src/gcode/lcd/M145.cpp View File

@@ -43,7 +43,7 @@ void GcodeSuite::M145() {
43 43
     int v;
44 44
     if (parser.seenval('H')) {
45 45
       v = parser.value_int();
46
-      ui.preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
46
+      ui.preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
47 47
     }
48 48
     if (parser.seenval('F')) {
49 49
       v = parser.value_int();

+ 4
- 1
Marlin/src/inc/Conditionals_LCD.h View File

@@ -472,7 +472,10 @@
472 472
 
473 473
 #if HOTENDS
474 474
   #define HAS_HOTEND 1
475
-  #if HOTENDS > 1
475
+  #ifndef HOTEND_OVERSHOOT
476
+    #define HOTEND_OVERSHOOT 15
477
+  #endif
478
+  #if HOTENDS_ > 1
476 479
     #define HAS_MULTI_HOTEND 1
477 480
     #define HAS_HOTEND_OFFSET 1
478 481
   #endif

+ 2
- 2
Marlin/src/lcd/extui/ui_api.cpp View File

@@ -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] - 15)), e);
949
+          thermalManager.setTargetHotend(LROUND(constrain(value, 0, 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] - 15)), e);
961
+      thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - HOTEND_OVERSHOOT)), e);
962 962
     #endif
963 963
   }
964 964
 

+ 3
- 3
Marlin/src/lcd/menu/menu_advanced.cpp View File

@@ -257,8 +257,8 @@ void menu_cancelobject();
257 257
     //
258 258
     #if BOTH(AUTOTEMP, HAS_TEMP_HOTEND)
259 259
       EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
260
-      EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
261
-      EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
260
+      EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - HOTEND_OVERSHOOT);
261
+      EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - HOTEND_OVERSHOOT);
262 262
       EDIT_ITEM(float42_52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
263 263
     #endif
264 264
 
@@ -304,7 +304,7 @@ void menu_cancelobject();
304 304
     #if ENABLED(PID_AUTOTUNE_MENU)
305 305
       #define PID_EDIT_MENU_ITEMS(N) \
306 306
         _PID_EDIT_MENU_ITEMS(N); \
307
-        EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, heater_maxtemp[N] - 15, []{ _lcd_autotune(MenuItemBase::itemIndex); });
307
+        EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, heater_maxtemp[N] - HOTEND_OVERSHOOT, []{ _lcd_autotune(MenuItemBase::itemIndex); });
308 308
     #else
309 309
       #define PID_EDIT_MENU_ITEMS(N) _PID_EDIT_MENU_ITEMS(N);
310 310
     #endif

+ 1
- 1
Marlin/src/lcd/menu/menu_configuration.cpp View File

@@ -331,7 +331,7 @@ void menu_advanced_settings();
331 331
     BACK_ITEM(MSG_CONFIGURATION);
332 332
     EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);
333 333
     #if HAS_TEMP_HOTEND
334
-      EDIT_ITEM(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - 15);
334
+      EDIT_ITEM(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - HOTEND_OVERSHOOT);
335 335
     #endif
336 336
     #if HAS_HEATED_BED
337 337
       EDIT_ITEM(int3, MSG_BED, &ui.preheat_bed_temp[material], BED_MINTEMP, BED_MAX_TARGET);

+ 1
- 1
Marlin/src/lcd/menu/menu_filament.cpp View File

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

+ 4
- 4
Marlin/src/lcd/menu/menu_temperature.cpp View File

@@ -50,7 +50,7 @@ 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] - 15, ui.preheat_hotend_temp[indh]), e);
53
+      setTargetHotend(_MIN(heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.preheat_hotend_temp[indh]), e);
54 54
   #else
55 55
     UNUSED(e);
56 56
     UNUSED(temph);
@@ -163,14 +163,14 @@ void menu_temperature() {
163 163
   // Nozzle [1-5]:
164 164
   //
165 165
   #if HOTENDS == 1
166
-    EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
166
+    EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(0); });
167 167
   #elif HAS_MULTI_HOTEND
168 168
     HOTEND_LOOP()
169
-      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); });
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); });
170 170
   #endif
171 171
 
172 172
   #if ENABLED(SINGLENOZZLE)
173
-    EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
173
+    EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
174 174
   #endif
175 175
 
176 176
   //

+ 3
- 3
Marlin/src/lcd/menu/menu_tune.cpp View File

@@ -118,14 +118,14 @@ void menu_tune() {
118 118
   // Nozzle [1-4]:
119 119
   //
120 120
   #if HOTENDS == 1
121
-    EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
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] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
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); });
125 125
   #endif
126 126
 
127 127
   #if ENABLED(SINGLENOZZLE)
128
-    EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
128
+    EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
129 129
   #endif
130 130
 
131 131
   //

+ 1
- 1
Marlin/src/lcd/menu/menu_ubl.cpp View File

@@ -128,7 +128,7 @@ void _lcd_ubl_build_custom_mesh() {
128 128
 void _lcd_ubl_custom_mesh() {
129 129
   START_MENU();
130 130
   BACK_ITEM(MSG_UBL_BUILD_MESH_MENU);
131
-  EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 15));
131
+  EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT);
132 132
   #if HAS_HEATED_BED
133 133
     EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, BED_MAX_TARGET);
134 134
   #endif

+ 1
- 1
Marlin/src/module/temperature.cpp View File

@@ -400,7 +400,7 @@ volatile bool Temperature::raw_temps_ready = false;
400 400
 
401 401
     TERN_(HAS_AUTO_FAN, next_auto_fan_check_ms = next_temp_ms + 2500UL);
402 402
 
403
-    if (target > GHV(BED_MAX_TARGET, temp_range[heater].maxtemp - 15)) {
403
+    if (target > GHV(BED_MAX_TARGET, temp_range[heater].maxtemp - HOTEND_OVERSHOOT)) {
404 404
       SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
405 405
       TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
406 406
       return;

+ 1
- 1
Marlin/src/module/temperature.h View File

@@ -588,7 +588,7 @@ class Temperature {
588 588
             start_preheat_time(ee);
589 589
         #endif
590 590
         TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
591
-        temp_hotend[ee].target = _MIN(celsius, temp_range[ee].maxtemp - 15);
591
+        temp_hotend[ee].target = _MIN(celsius, temp_range[ee].maxtemp - HOTEND_OVERSHOOT);
592 592
         start_watching_hotend(ee);
593 593
       }
594 594
 

Loading…
Cancel
Save