Browse Source

Add HOTEND_OVERSHOOT

Scott Lahteine 4 years ago
parent
commit
33217b0dd0

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

582
 
582
 
583
   if (parser.seenval('H')) {
583
   if (parser.seenval('H')) {
584
     g26_hotend_temp = parser.value_celsius();
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
       SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible.");
586
       SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible.");
587
       return;
587
       return;
588
     }
588
     }

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

43
     int v;
43
     int v;
44
     if (parser.seenval('H')) {
44
     if (parser.seenval('H')) {
45
       v = parser.value_int();
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
     if (parser.seenval('F')) {
48
     if (parser.seenval('F')) {
49
       v = parser.value_int();
49
       v = parser.value_int();

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

472
 
472
 
473
 #if HOTENDS
473
 #if HOTENDS
474
   #define HAS_HOTEND 1
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
     #define HAS_MULTI_HOTEND 1
479
     #define HAS_MULTI_HOTEND 1
477
     #define HAS_HOTEND_OFFSET 1
480
     #define HAS_HOTEND_OFFSET 1
478
   #endif
481
   #endif

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

946
       {
946
       {
947
         #if HAS_HOTEND
947
         #if HAS_HOTEND
948
           const int16_t e = heater - H0;
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
         #endif
950
         #endif
951
       }
951
       }
952
   }
952
   }
958
     #if HAS_HOTEND
958
     #if HAS_HOTEND
959
       const int16_t e = extruder - E0;
959
       const int16_t e = extruder - E0;
960
       enableHeater(extruder);
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
     #endif
962
     #endif
963
   }
963
   }
964
 
964
 

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

257
     //
257
     //
258
     #if BOTH(AUTOTEMP, HAS_TEMP_HOTEND)
258
     #if BOTH(AUTOTEMP, HAS_TEMP_HOTEND)
259
       EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
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
       EDIT_ITEM(float42_52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
262
       EDIT_ITEM(float42_52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
263
     #endif
263
     #endif
264
 
264
 
304
     #if ENABLED(PID_AUTOTUNE_MENU)
304
     #if ENABLED(PID_AUTOTUNE_MENU)
305
       #define PID_EDIT_MENU_ITEMS(N) \
305
       #define PID_EDIT_MENU_ITEMS(N) \
306
         _PID_EDIT_MENU_ITEMS(N); \
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
     #else
308
     #else
309
       #define PID_EDIT_MENU_ITEMS(N) _PID_EDIT_MENU_ITEMS(N);
309
       #define PID_EDIT_MENU_ITEMS(N) _PID_EDIT_MENU_ITEMS(N);
310
     #endif
310
     #endif

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

331
     BACK_ITEM(MSG_CONFIGURATION);
331
     BACK_ITEM(MSG_CONFIGURATION);
332
     EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);
332
     EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);
333
     #if HAS_TEMP_HOTEND
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
     #endif
335
     #endif
336
     #if HAS_HEATED_BED
336
     #if HAS_HEATED_BED
337
       EDIT_ITEM(int3, MSG_BED, &ui.preheat_bed_temp[material], BED_MINTEMP, BED_MAX_TARGET);
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
   BACK_ITEM(MSG_BACK);
83
   BACK_ITEM(MSG_BACK);
84
   ACTION_ITEM(MSG_PREHEAT_1, []{ _change_filament(ui.preheat_hotend_temp[0]); });
84
   ACTION_ITEM(MSG_PREHEAT_1, []{ _change_filament(ui.preheat_hotend_temp[0]); });
85
   ACTION_ITEM(MSG_PREHEAT_2, []{ _change_filament(ui.preheat_hotend_temp[1]); });
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
     _change_filament(thermalManager.temp_hotend[_change_filament_extruder].target);
87
     _change_filament(thermalManager.temp_hotend[_change_filament_extruder].target);
88
   });
88
   });
89
   END_MENU();
89
   END_MENU();

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

50
 void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb) {
50
 void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb) {
51
   #if HAS_HOTEND
51
   #if HAS_HOTEND
52
     if (indh >= 0 && ui.preheat_hotend_temp[indh] > 0)
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
   #else
54
   #else
55
     UNUSED(e);
55
     UNUSED(e);
56
     UNUSED(temph);
56
     UNUSED(temph);
163
   // Nozzle [1-5]:
163
   // Nozzle [1-5]:
164
   //
164
   //
165
   #if HOTENDS == 1
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
   #elif HAS_MULTI_HOTEND
167
   #elif HAS_MULTI_HOTEND
168
     HOTEND_LOOP()
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
   #endif
170
   #endif
171
 
171
 
172
   #if ENABLED(SINGLENOZZLE)
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
   #endif
174
   #endif
175
 
175
 
176
   //
176
   //

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

118
   // Nozzle [1-4]:
118
   // Nozzle [1-4]:
119
   //
119
   //
120
   #if HOTENDS == 1
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
   #elif HAS_MULTI_HOTEND
122
   #elif HAS_MULTI_HOTEND
123
     HOTEND_LOOP()
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
   #endif
125
   #endif
126
 
126
 
127
   #if ENABLED(SINGLENOZZLE)
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
   #endif
129
   #endif
130
 
130
 
131
   //
131
   //

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

128
 void _lcd_ubl_custom_mesh() {
128
 void _lcd_ubl_custom_mesh() {
129
   START_MENU();
129
   START_MENU();
130
   BACK_ITEM(MSG_UBL_BUILD_MESH_MENU);
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
   #if HAS_HEATED_BED
132
   #if HAS_HEATED_BED
133
     EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, BED_MAX_TARGET);
133
     EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, BED_MAX_TARGET);
134
   #endif
134
   #endif

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

400
 
400
 
401
     TERN_(HAS_AUTO_FAN, next_auto_fan_check_ms = next_temp_ms + 2500UL);
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
       SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
404
       SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
405
       TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
405
       TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
406
       return;
406
       return;

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

588
             start_preheat_time(ee);
588
             start_preheat_time(ee);
589
         #endif
589
         #endif
590
         TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
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
         start_watching_hotend(ee);
592
         start_watching_hotend(ee);
593
       }
593
       }
594
 
594
 

Loading…
Cancel
Save