Преглед на файлове

Use Material Preset 1 for PID autotune (#18446)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Luc Hoang Long преди 4 години
родител
ревизия
764fc81761
No account linked to committer's email address
променени са 2 файла, в които са добавени 6 реда и са изтрити 21 реда
  1. 3
    11
      Marlin/src/gcode/temp/M303.cpp
  2. 3
    10
      Marlin/src/lcd/menu/menu_advanced.cpp

+ 3
- 11
Marlin/src/gcode/temp/M303.cpp Целия файл

@@ -60,16 +60,8 @@ void GcodeSuite::M303() {
60 60
     }
61 61
   #endif
62 62
 
63
-  #if ENABLED(PIDTEMPBED)
64
-    #define SI H_BED
65
-  #else
66
-    #define SI H_E0
67
-  #endif
68
-  #if ENABLED(PIDTEMP)
69
-    #define EI HOTENDS - 1
70
-  #else
71
-    #define EI H_BED
72
-  #endif
63
+  #define SI TERN(PIDTEMPBED, H_BED, H_E0)
64
+  #define EI TERN(PIDTEMP, HOTENDS - 1, H_BED)
73 65
   const heater_ind_t e = (heater_ind_t)parser.intval('E');
74 66
   if (!WITHIN(e, SI, EI)) {
75 67
     SERIAL_ECHOLNPGM(STR_PID_BAD_EXTRUDER_NUM);
@@ -79,7 +71,7 @@ void GcodeSuite::M303() {
79 71
 
80 72
   const int c = parser.intval('C', 5);
81 73
   const bool u = parser.boolval('U');
82
-  const int16_t temp = parser.celsiusval('S', e < 0 ? 70 : 150);
74
+  const int16_t temp = parser.celsiusval('S', e < 0 ? PREHEAT_1_TEMP_BED : PREHEAT_1_TEMP_HOTEND);
83 75
 
84 76
   #if DISABLED(BUSY_WHILE_HEATING)
85 77
     KEEPALIVE_STATE(NOT_BUSY);

+ 3
- 10
Marlin/src/lcd/menu/menu_advanced.cpp Целия файл

@@ -169,17 +169,10 @@ void menu_cancelobject();
169 169
 #if ENABLED(PID_AUTOTUNE_MENU)
170 170
 
171 171
   #if ENABLED(PIDTEMP)
172
-    #ifdef PREHEAT_1_TEMP_HOTEND
173
-      #define PID_TUNE_TEMP PREHEAT_1_TEMP_HOTEND
174
-    #else
175
-      #define PID_TUNE_TEMP 200
176
-    #endif
177
-    int16_t autotune_temp[HOTENDS] = ARRAY_BY_HOTENDS1(PID_TUNE_TEMP);
178
-    #undef PID_TUNE_TEMP
172
+    int16_t autotune_temp[HOTENDS] = ARRAY_BY_HOTENDS1(PREHEAT_1_TEMP_HOTEND);
179 173
   #endif
180
-
181 174
   #if ENABLED(PIDTEMPBED)
182
-    int16_t autotune_temp_bed = 70;
175
+    int16_t autotune_temp_bed = PREHEAT_1_TEMP_BED;
183 176
   #endif
184 177
 
185 178
   #include "../../gcode/queue.h"
@@ -324,7 +317,7 @@ void menu_cancelobject();
324 317
         #ifndef BED_OVERSHOOT
325 318
           #define BED_OVERSHOOT 5
326 319
         #endif
327
-        EDIT_ITEM_FAST_N(int3, -1, MSG_PID_AUTOTUNE_E, &autotune_temp_bed, 70, BED_MAXTEMP - BED_OVERSHOOT, []{ _lcd_autotune(-1); });
320
+        EDIT_ITEM_FAST_N(int3, -1, MSG_PID_AUTOTUNE_E, &autotune_temp_bed, PREHEAT_1_TEMP_BED, BED_MAXTEMP - BED_OVERSHOOT, []{ _lcd_autotune(-1); });
328 321
       #endif
329 322
     #endif
330 323
 

Loading…
Отказ
Запис