Kaynağa Gözat

🎨 General cleanup of extui/dgus

In relation to #22121
Scott Lahteine 3 yıl önce
ebeveyn
işleme
d5510ea519

+ 23
- 25
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp Dosyayı Görüntüle

@@ -180,7 +180,7 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
180 180
     float valuesend = 0;
181 181
     switch (var.VP) {
182 182
       default: return;
183
-      #if HOTENDS >= 1
183
+      #if HAS_HOTEND
184 184
         case VP_E0_PID_P: valuesend = value; break;
185 185
         case VP_E0_PID_I: valuesend = unscalePID_i(value); break;
186 186
         case VP_E0_PID_D: valuesend = unscalePID_d(value); break;
@@ -393,7 +393,7 @@ void DGUSScreenHandler::HandleTemperatureChanged(DGUS_VP_Variable &var, void *va
393 393
 
394 394
   switch (var.VP) {
395 395
     default: return;
396
-    #if HOTENDS >= 1
396
+    #if HAS_HOTEND
397 397
       case VP_T_E0_Set:
398 398
         NOMORE(newvalue, HEATER_0_MAXTEMP);
399 399
         thermalManager.setTargetHotend(newvalue, 0);
@@ -427,10 +427,8 @@ void DGUSScreenHandler::HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_p
427 427
     uint8_t target_extruder;
428 428
     switch (var.VP) {
429 429
       default: return;
430
-      #if HOTENDS >= 1
431
-        case VP_Flowrate_E0: target_extruder = 0; break;
432
-      #endif
433
-      #if HOTENDS >= 2
430
+      case VP_Flowrate_E0: target_extruder = 0; break;
431
+      #if HAS_MULTI_EXTRUDER
434 432
         case VP_Flowrate_E1: target_extruder = 1; break;
435 433
       #endif
436 434
     }
@@ -450,11 +448,11 @@ void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr
450 448
   ExtUI::extruder_t target_extruder;
451 449
 
452 450
   switch (var.VP) {
453
-    #if HOTENDS >= 1
451
+    #if HAS_HOTEND
454 452
       case VP_MOVE_E0: target_extruder = ExtUI::extruder_t::E0; break;
455
-    #endif
456
-    #if HOTENDS >= 2
457
-      case VP_MOVE_E1: target_extruder = ExtUI::extruder_t::E1; break;
453
+      #if HAS_MULTI_EXTRUDER
454
+        case VP_MOVE_E1: target_extruder = ExtUI::extruder_t::E1; break;
455
+      #endif
458 456
     #endif
459 457
     default: return;
460 458
   }
@@ -526,11 +524,11 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
526 524
   ExtUI::extruder_t extruder;
527 525
   switch (var.VP) {
528 526
     default: return;
529
-      #if HOTENDS >= 1
527
+      #if HAS_EXTRUDERS
530 528
         case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break;
531
-      #endif
532
-      #if HOTENDS >= 2
533
-        case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break;
529
+        #if HAS_MULTI_EXTRUDER
530
+          case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break;
531
+        #endif
534 532
       #endif
535 533
   }
536 534
   DEBUG_ECHOLNPAIR_F("value:", value);
@@ -548,7 +546,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
548 546
     switch (var.VP) {
549 547
       default: break;
550 548
         #if ENABLED(PIDTEMP)
551
-          #if HOTENDS >= 1
549
+          #if HAS_HOTEND
552 550
             case VP_PID_AUTOTUNE_E0: // Autotune Extruder 0
553 551
               sprintf_P(buf, PSTR("M303 E%d C5 S210 U1"), ExtUI::extruder_t::E0);
554 552
               break;
@@ -598,17 +596,17 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
598 596
 
599 597
   uint8_t preheat_temp = 0;
600 598
   switch (var.VP) {
601
-    #if HOTENDS >= 1
599
+    #if HAS_HOTEND
602 600
       case VP_E0_CONTROL:
601
+      #if HOTENDS >= 2
602
+        case VP_E1_CONTROL:
603
+        #if HOTENDS >= 3
604
+          case VP_E2_CONTROL:
605
+        #endif
606
+      #endif
607
+      preheat_temp = PREHEAT_1_TEMP_HOTEND;
608
+      break;
603 609
     #endif
604
-    #if HOTENDS >= 2
605
-      case VP_E1_CONTROL:
606
-    #endif
607
-    #if HOTENDS >= 3
608
-      case VP_E2_CONTROL:
609
-    #endif
610
-    preheat_temp = PREHEAT_1_TEMP_HOTEND;
611
-    break;
612 610
 
613 611
     case VP_BED_CONTROL:
614 612
       preheat_temp = PREHEAT_1_TEMP_BED;
@@ -660,7 +658,7 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
660 658
 
661 659
     switch (var.VP) {
662 660
       default: return;
663
-        #if HOTENDS >= 1
661
+        #if HAS_HOTEND
664 662
           case VP_E0_BED_PREHEAT:
665 663
             thermalManager.setTargetHotend(e_temp, 0);
666 664
             TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(bed_temp));

+ 18
- 0
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.h Dosyayı Görüntüle

@@ -56,3 +56,21 @@ inline uint16_t swap16(const uint16_t value) { return (value & 0xFFU) << 8U | (v
56 56
 #endif
57 57
 
58 58
 extern DGUSScreenHandler ScreenHandler;
59
+
60
+// Helper to define a DGUS_VP_Variable for common use-cases.
61
+#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR) { \
62
+  .VP = VPADR, \
63
+  .memadr = VPADRVAR, \
64
+  .size = sizeof(VPADRVAR), \
65
+  .set_by_display_handler = RXFPTR, \
66
+  .send_to_display_handler = TXFPTR \
67
+}
68
+
69
+// Helper to define a DGUS_VP_Variable when the size of the var cannot be determined automatically (e.g., a string)
70
+#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR) { \
71
+  .VP = VPADR, \
72
+  .memadr = VPADRVAR, \
73
+  .size = STRLEN, \
74
+  .set_by_display_handler = RXFPTR, \
75
+  .send_to_display_handler = TXFPTR \
76
+}

+ 87
- 98
Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp Dosyayı Görüntüle

@@ -41,14 +41,11 @@
41 41
   uint16_t distanceToMove = 10;
42 42
 #endif
43 43
 
44
-const uint16_t VPList_Boot[] PROGMEM = {
45
-  VP_MARLIN_VERSION,
46
-  0x0000
47
-};
44
+const uint16_t VPList_Boot[] PROGMEM = { VP_MARLIN_VERSION, 0x0000 };
48 45
 
49 46
 const uint16_t VPList_Main[] PROGMEM = {
50
-  /* VP_M117, for completeness, but it cannot be auto-uploaded. */
51
-  #if HOTENDS >= 1
47
+  // VP_M117, for completeness, but it cannot be auto-uploaded.
48
+  #if HAS_HOTEND
52 49
     VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS,
53 50
   #endif
54 51
   #if HOTENDS >= 2
@@ -70,7 +67,7 @@ const uint16_t VPList_Main[] PROGMEM = {
70 67
 };
71 68
 
72 69
 const uint16_t VPList_Temp[] PROGMEM = {
73
-  #if HOTENDS >= 1
70
+  #if HAS_HOTEND
74 71
     VP_T_E0_Is, VP_T_E0_Set,
75 72
   #endif
76 73
   #if HOTENDS >= 2
@@ -83,8 +80,8 @@ const uint16_t VPList_Temp[] PROGMEM = {
83 80
 };
84 81
 
85 82
 const uint16_t VPList_Status[] PROGMEM = {
86
-  /* VP_M117, for completeness, but it cannot be auto-uploaded */
87
-  #if HOTENDS >= 1
83
+  // VP_M117, for completeness, but it cannot be auto-uploaded
84
+  #if HAS_HOTEND
88 85
     VP_T_E0_Is, VP_T_E0_Set,
89 86
   #endif
90 87
   #if HOTENDS >= 2
@@ -105,11 +102,11 @@ const uint16_t VPList_Status[] PROGMEM = {
105 102
 
106 103
 const uint16_t VPList_Status2[] PROGMEM = {
107 104
   /* VP_M117, for completeness, but it cannot be auto-uploaded */
108
-  #if HOTENDS >= 1
105
+  #if HAS_HOTEND
109 106
     VP_Flowrate_E0,
110
-  #endif
111
-  #if HOTENDS >= 2
112
-    VP_Flowrate_E1,
107
+    #if HAS_MULTI_EXTRUDER
108
+      VP_Flowrate_E1,
109
+    #endif
113 110
   #endif
114 111
   VP_PrintProgress_Percentage,
115 112
   VP_PrintTime,
@@ -117,7 +114,7 @@ const uint16_t VPList_Status2[] PROGMEM = {
117 114
 };
118 115
 
119 116
 const uint16_t VPList_Preheat[] PROGMEM = {
120
-  #if HOTENDS >= 1
117
+  #if HAS_HOTEND
121 118
     VP_T_E0_Is, VP_T_E0_Set,
122 119
   #endif
123 120
   #if HOTENDS >= 2
@@ -135,11 +132,11 @@ const uint16_t VPList_ManualMove[] PROGMEM = {
135 132
 };
136 133
 
137 134
 const uint16_t VPList_ManualExtrude[] PROGMEM = {
138
-  #if HOTENDS >= 1
135
+  #if HAS_HOTEND
139 136
     VP_T_E0_Is, VP_T_E0_Set,
140
-  #endif
141
-  #if HOTENDS >= 2
142
-    VP_T_E1_Is, VP_T_E1_Set,
137
+    #if HAS_MULTI_EXTRUDER
138
+      VP_T_E1_Is, VP_T_E1_Set,
139
+    #endif
143 140
   #endif
144 141
   VP_EPos,
145 142
   0x0000
@@ -156,23 +153,23 @@ const uint16_t VPList_SD_FlowRates[] PROGMEM = {
156 153
 };
157 154
 
158 155
 const uint16_t VPList_Filament_heating[] PROGMEM = {
159
-  #if HOTENDS >= 1
156
+  #if HAS_HOTEND
160 157
     VP_T_E0_Is, VP_T_E0_Set,
161 158
     VP_E0_FILAMENT_LOAD_UNLOAD,
162
-  #endif
163
-  #if HOTENDS >= 2
164
-    VP_T_E1_Is, VP_T_E1_Set,
165
-    VP_E1_FILAMENT_LOAD_UNLOAD,
159
+    #if HAS_MULTI_EXTRUDER
160
+      VP_T_E1_Is, VP_T_E1_Set,
161
+      VP_E1_FILAMENT_LOAD_UNLOAD,
162
+    #endif
166 163
   #endif
167 164
   0x0000
168 165
 };
169 166
 
170 167
 const uint16_t VPList_Filament_load_unload[] PROGMEM = {
171
-  #if HOTENDS >= 1
168
+  #if HAS_HOTEND
172 169
     VP_E0_FILAMENT_LOAD_UNLOAD,
173
-  #endif
174
-  #if HOTENDS >= 2
175
-    VP_E1_FILAMENT_LOAD_UNLOAD,
170
+    #if HAS_MULTI_EXTRUDER
171
+      VP_E1_FILAMENT_LOAD_UNLOAD,
172
+    #endif
176 173
   #endif
177 174
   0x0000
178 175
 };
@@ -184,7 +181,7 @@ const uint16_t VPList_SDFileList[] PROGMEM = {
184 181
 
185 182
 const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
186 183
   VP_PrintProgress_Percentage, VP_PrintTime,
187
-  #if HOTENDS >= 1
184
+  #if HAS_HOTEND
188 185
     VP_T_E0_Is, VP_T_E0_Set,
189 186
   #endif
190 187
   #if HOTENDS >= 2
@@ -204,11 +201,11 @@ const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
204 201
 };
205 202
 
206 203
 const uint16_t VPList_SDPrintTune[] PROGMEM = {
207
-  #if HOTENDS >= 1
204
+  #if HAS_HOTEND
208 205
     VP_T_E0_Is, VP_T_E0_Set, VP_Flowrate_E0,
209
-  #endif
210
-  #if HOTENDS >= 2
211
-    VP_T_E1_Is, VP_T_E1_Set, VP_Flowrate_E1,
206
+    #if HAS_MULTI_EXTRUDER
207
+      VP_T_E1_Is, VP_T_E1_Set, VP_Flowrate_E1,  // ERROR: Flowrate is per-extruder, not per-hotend
208
+    #endif
212 209
   #endif
213 210
   #if HAS_HEATED_BED
214 211
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -222,11 +219,11 @@ const uint16_t VPList_StepPerMM[] PROGMEM = {
222 219
   VP_X_STEP_PER_MM,
223 220
   VP_Y_STEP_PER_MM,
224 221
   VP_Z_STEP_PER_MM,
225
-  #if HOTENDS >= 1
222
+  #if HAS_EXTRUDERS
226 223
     VP_E0_STEP_PER_MM,
227
-  #endif
228
-  #if HOTENDS >= 2
229
-    VP_E1_STEP_PER_MM,
224
+    #if HAS_MULTI_EXTRUDER
225
+      VP_E1_STEP_PER_MM,
226
+    #endif
230 227
   #endif
231 228
   0x0000
232 229
 };
@@ -265,7 +262,7 @@ const uint16_t VPList_PIDTuningWaiting[] PROGMEM = {
265 262
 };
266 263
 
267 264
 const uint16_t VPList_FLCPreheat[] PROGMEM = {
268
-  #if HOTENDS >= 1
265
+  #if HAS_HOTEND
269 266
     VP_T_E0_Is, VP_T_E0_Set,
270 267
   #endif
271 268
   #if HAS_HEATED_BED
@@ -275,14 +272,14 @@ const uint16_t VPList_FLCPreheat[] PROGMEM = {
275 272
 };
276 273
 
277 274
 const uint16_t VPList_FLCPrinting[] PROGMEM = {
278
-  #if HOTENDS >= 1
275
+  #if HAS_HOTEND
279 276
     VP_SD_Print_ProbeOffsetZ,
280 277
   #endif
281 278
   0x0000
282 279
 };
283 280
 
284 281
 const uint16_t VPList_Z_Offset[] PROGMEM = {
285
-  #if HOTENDS >= 1
282
+  #if HAS_HOTEND
286 283
     VP_SD_Print_ProbeOffsetZ,
287 284
   #endif
288 285
   0x0000
@@ -316,14 +313,6 @@ const struct VPMapping VPMap[] PROGMEM = {
316 313
 
317 314
 const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION;
318 315
 
319
-// Helper to define a DGUS_VP_Variable for common use cases.
320
-#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=sizeof(VPADRVAR), \
321
-  .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
322
-
323
-// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string)
324
-#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=STRLEN, \
325
-  .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
326
-
327 316
 const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
328 317
   // Helper to detect touch events
329 318
   VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr),
@@ -333,96 +322,96 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
333 322
   #endif
334 323
   VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr),
335 324
 
336
-  VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr),
325
+  VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr),
337 326
   #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
338
-    VPHELPER(VP_MOVE_OPTION, &distanceToMove, &ScreenHandler.HandleManualMoveOption, nullptr),
327
+    VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr),
339 328
   #endif
340 329
   #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
341
-    VPHELPER(VP_MOVE_X, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
342
-    VPHELPER(VP_MOVE_Y, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
343
-    VPHELPER(VP_MOVE_Z, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
344
-    VPHELPER(VP_HOME_ALL, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
330
+    VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
331
+    VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
332
+    VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
333
+    VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
345 334
   #else
346
-    VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr),
347
-    VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr),
348
-    VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr),
349
-    VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr),
335
+    VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr),
336
+    VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr),
337
+    VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr),
338
+    VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr),
350 339
   #endif
351
-  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleMotorLockUnlock, nullptr),
340
+  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr),
352 341
   #if ENABLED(POWER_LOSS_RECOVERY)
353
-    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr),
342
+    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr),
354 343
   #endif
355
-  VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr),
344
+  VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr),
356 345
   #if ENABLED(SINGLE_Z_CALIBRATION)
357
-    VPHELPER(VP_Z_CALIBRATE, nullptr, &ScreenHandler.HandleZCalibration, nullptr),
346
+    VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr),
358 347
   #endif
359 348
 
360 349
   #if ENABLED(FIRST_LAYER_CAL)
361
-    VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, &ScreenHandler.HandleFirstLayerCal, nullptr),
350
+    VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr),
362 351
   #endif
363 352
 
364
-  { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
353
+  { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
365 354
   // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
366
-  { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplay },
355
+  { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay },
367 356
 
368 357
   // Temperature Data
369
-  #if HOTENDS >= 1
358
+  #if HAS_HOTEND
370 359
     VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
371
-    VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
372
-    VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
360
+    VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
361
+    VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
373 362
     VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
374
-    VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
375
-    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr),
376
-    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
363
+    VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
364
+    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr),
365
+    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
377 366
     #if ENABLED(DGUS_PREHEAT_UI)
378
-      VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr),
367
+      VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr),
379 368
     #endif
380 369
     #if ENABLED(PIDTEMP)
381 370
       VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
382 371
       VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
383 372
       VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
384
-      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
373
+      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
385 374
     #endif
386 375
     #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
387
-      VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload),
376
+      VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
388 377
     #endif
389 378
   #endif
390 379
   #if HOTENDS >= 2
391 380
     VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
392
-    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
393
-    VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
394
-    VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
395
-    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr),
396
-    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
381
+    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
382
+    VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),  // ERROR: Flow is per-extruder, not per-hotend
383
+    VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
384
+    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr),
385
+    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
397 386
     #if ENABLED(PIDTEMP)
398
-      VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
387
+      VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
399 388
     #endif
400
-    VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload),
389
+    VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
401 390
   #endif
402 391
   #if HAS_HEATED_BED
403 392
     VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
404
-    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
405
-    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr),
406
-    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
393
+    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
394
+    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr),
395
+    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
407 396
     #if ENABLED(PIDTEMPBED)
408 397
       VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
409 398
       VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
410 399
       VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
411
-      VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
400
+      VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
412 401
     #endif
413 402
   #endif
414 403
 
415 404
   // Fan Data
416 405
   #if HAS_FAN
417 406
     #define FAN_VPHELPER(N) \
418
-      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, &ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
419
-      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr), \
420
-      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
407
+      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
408
+      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \
409
+      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
421 410
     REPEAT(FAN_COUNT, FAN_VPHELPER)
422 411
   #endif
423 412
 
424 413
   // Feedrate
425
-  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, &ScreenHandler.DGUSLCD_SendWordValueToDisplay ),
414
+  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
426 415
 
427 416
   // Position Data
428 417
   VPHELPER(VP_XPos, &current_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -430,7 +419,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
430 419
   VPHELPER(VP_ZPos, &current_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
431 420
 
432 421
   // Print Progress
433
-  VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay ),
422
+  VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay),
434 423
 
435 424
   // Print Time
436 425
   VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay),
@@ -442,11 +431,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
442 431
   VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
443 432
   VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
444 433
   VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
445
-  #if HOTENDS >= 1
434
+  #if HAS_EXTRUDERS
446 435
     VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
447
-  #endif
448
-  #if HOTENDS >= 2
449
-    VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
436
+    #if HAS_MULTI_EXTRUDER
437
+      VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
438
+    #endif
450 439
   #endif
451 440
 
452 441
   // SDCard File listing.
@@ -463,7 +452,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
463 452
     VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr),
464 453
     VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr),
465 454
     #if HAS_BED_PROBE
466
-      VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
455
+      VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
467 456
       #if ENABLED(BABYSTEPPING)
468 457
         VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr),
469 458
       #endif
@@ -475,10 +464,10 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
475 464
   #endif
476 465
 
477 466
   // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
478
-  { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
479
-  { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
480
-  { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
481
-  { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
467
+  { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
468
+  { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
469
+  { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
470
+  { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
482 471
 
483 472
   VPHELPER(0, 0, 0, 0)  // must be last entry.
484 473
 };

+ 4
- 4
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp Dosyayı Görüntüle

@@ -249,7 +249,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
249 249
 
250 250
     switch (var.VP) {
251 251
       default: return;
252
-        #if HOTENDS >= 1
252
+        #if HAS_HOTEND
253 253
           case VP_E0_PID_P: newvalue = value; break;
254 254
           case VP_E0_PID_I: newvalue = scalePID_i(value); break;
255 255
           case VP_E0_PID_D: newvalue = scalePID_d(value); break;
@@ -329,7 +329,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
329 329
     }
330 330
 
331 331
     if (filament_data.action == 0) { // Go back to utility screen
332
-      #if HOTENDS >= 1
332
+      #if HAS_HOTEND
333 333
         thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0);
334 334
       #endif
335 335
       #if HOTENDS >= 2
@@ -340,13 +340,13 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
340 340
     else { // Go to the preheat screen to show the heating progress
341 341
       switch (var.VP) {
342 342
         default: return;
343
-          #if HOTENDS >= 1
343
+          #if HAS_HOTEND
344 344
             case VP_E0_FILAMENT_LOAD_UNLOAD:
345 345
               filament_data.extruder = ExtUI::extruder_t::E0;
346 346
               thermalManager.setTargetHotend(e_temp, filament_data.extruder);
347 347
               break;
348 348
           #endif
349
-          #if HOTENDS >= 2
349
+          #if HAS_MULTI_EXTRUDER
350 350
             case VP_E1_FILAMENT_LOAD_UNLOAD:
351 351
               filament_data.extruder = ExtUI::extruder_t::E1;
352 352
               thermalManager.setTargetHotend(e_temp, filament_data.extruder);

+ 99
- 107
Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp Dosyayı Görüntüle

@@ -48,11 +48,11 @@ const uint16_t VPList_Boot[] PROGMEM = {
48 48
 
49 49
 const uint16_t VPList_Main[] PROGMEM = {
50 50
   /* VP_M117, for completeness, but it cannot be auto-uploaded. */
51
-  #if HOTENDS >= 1
51
+  #if HAS_HOTEND
52 52
     VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS,
53
-  #endif
54
-  #if HOTENDS >= 2
55
-    VP_T_E1_Is, VP_T_E1_Set,
53
+    #if HOTENDS >= 2
54
+      VP_T_E1_Is, VP_T_E1_Set,
55
+    #endif
56 56
   #endif
57 57
   #if HAS_HEATED_BED
58 58
     VP_T_Bed_Is, VP_T_Bed_Set, VP_BED_STATUS,
@@ -70,11 +70,11 @@ const uint16_t VPList_Main[] PROGMEM = {
70 70
 };
71 71
 
72 72
 const uint16_t VPList_Temp[] PROGMEM = {
73
-  #if HOTENDS >= 1
73
+  #if HAS_HOTEND
74 74
     VP_T_E0_Is, VP_T_E0_Set,
75
-  #endif
76
-  #if HOTENDS >= 2
77
-    VP_T_E1_Is, VP_T_E1_Set,
75
+    #if HOTENDS >= 2
76
+      VP_T_E1_Is, VP_T_E1_Set,
77
+    #endif
78 78
   #endif
79 79
   #if HAS_HEATED_BED
80 80
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -84,11 +84,11 @@ const uint16_t VPList_Temp[] PROGMEM = {
84 84
 
85 85
 const uint16_t VPList_Status[] PROGMEM = {
86 86
   /* VP_M117, for completeness, but it cannot be auto-uploaded */
87
-  #if HOTENDS >= 1
87
+  #if HAS_HOTEND
88 88
     VP_T_E0_Is, VP_T_E0_Set,
89
-  #endif
90
-  #if HOTENDS >= 2
91
-    VP_T_E1_Is, VP_T_E1_Set,
89
+    #if HOTENDS >= 2
90
+      VP_T_E1_Is, VP_T_E1_Set,
91
+    #endif
92 92
   #endif
93 93
   #if HAS_HEATED_BED
94 94
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -105,11 +105,11 @@ const uint16_t VPList_Status[] PROGMEM = {
105 105
 
106 106
 const uint16_t VPList_Status2[] PROGMEM = {
107 107
   /* VP_M117, for completeness, but it cannot be auto-uploaded */
108
-  #if HOTENDS >= 1
108
+  #if HAS_HOTEND
109 109
     VP_Flowrate_E0,
110
-  #endif
111
-  #if HOTENDS >= 2
112
-    VP_Flowrate_E1,
110
+    #if HOTENDS >= 2
111
+      VP_Flowrate_E1,
112
+    #endif
113 113
   #endif
114 114
   VP_PrintProgress_Percentage,
115 115
   VP_PrintTime,
@@ -117,11 +117,11 @@ const uint16_t VPList_Status2[] PROGMEM = {
117 117
 };
118 118
 
119 119
 const uint16_t VPList_Preheat[] PROGMEM = {
120
-  #if HOTENDS >= 1
120
+  #if HAS_HOTEND
121 121
     VP_T_E0_Is, VP_T_E0_Set,
122
-  #endif
123
-  #if HOTENDS >= 2
124
-    VP_T_E1_Is, VP_T_E1_Set,
122
+    #if HOTENDS >= 2
123
+      VP_T_E1_Is, VP_T_E1_Set,
124
+    #endif
125 125
   #endif
126 126
   #if HAS_HEATED_BED
127 127
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -135,11 +135,11 @@ const uint16_t VPList_ManualMove[] PROGMEM = {
135 135
 };
136 136
 
137 137
 const uint16_t VPList_ManualExtrude[] PROGMEM = {
138
-  #if HOTENDS >= 1
138
+  #if HAS_HOTEND
139 139
     VP_T_E0_Is, VP_T_E0_Set,
140
-  #endif
141
-  #if HOTENDS >= 2
142
-    VP_T_E1_Is, VP_T_E1_Set,
140
+    #if HOTENDS >= 2
141
+      VP_T_E1_Is, VP_T_E1_Set,
142
+    #endif
143 143
   #endif
144 144
   VP_EPos,
145 145
   0x0000
@@ -156,22 +156,22 @@ const uint16_t VPList_SD_FlowRates[] PROGMEM = {
156 156
 };
157 157
 
158 158
 const uint16_t VPList_Filament_heating[] PROGMEM = {
159
-  #if HOTENDS >= 1
159
+  #if HAS_HOTEND
160 160
     VP_T_E0_Is, VP_T_E0_Set,
161 161
     VP_E0_FILAMENT_LOAD_UNLOAD,
162
-  #endif
163
-  #if HOTENDS >= 2
164
-    VP_T_E1_Is, VP_T_E1_Set,
162
+    #if HOTENDS >= 2
163
+      VP_T_E1_Is, VP_T_E1_Set,
164
+    #endif
165 165
   #endif
166 166
   0x0000
167 167
 };
168 168
 
169 169
 const uint16_t VPList_Filament_load_unload[] PROGMEM = {
170
-  #if HOTENDS >= 1
170
+  #if HAS_HOTEND
171 171
     VP_E0_FILAMENT_LOAD_UNLOAD,
172
-  #endif
173
-  #if HOTENDS >= 2
174
-    VP_E1_FILAMENT_LOAD_UNLOAD,
172
+    #if HOTENDS >= 2
173
+      VP_E1_FILAMENT_LOAD_UNLOAD,
174
+    #endif
175 175
   #endif
176 176
   0x0000
177 177
 };
@@ -183,11 +183,11 @@ const uint16_t VPList_SDFileList[] PROGMEM = {
183 183
 
184 184
 const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
185 185
   VP_PrintProgress_Percentage, VP_PrintTime,
186
-  #if HOTENDS >= 1
186
+  #if HAS_HOTEND
187 187
     VP_T_E0_Is, VP_T_E0_Set,
188
-  #endif
189
-  #if HOTENDS >= 2
190
-    VP_T_E1_Is, VP_T_E1_Set,
188
+    #if HOTENDS >= 2
189
+      VP_T_E1_Is, VP_T_E1_Set,
190
+    #endif
191 191
   #endif
192 192
   #if HAS_HEATED_BED
193 193
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -203,11 +203,11 @@ const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
203 203
 };
204 204
 
205 205
 const uint16_t VPList_SDPrintTune[] PROGMEM = {
206
-  #if HOTENDS >= 1
206
+  #if HAS_HOTEND
207 207
     VP_T_E0_Is, VP_T_E0_Set,
208
-  #endif
209
-  #if HOTENDS >= 2
210
-    VP_T_E1_Is, VP_T_E1_Set,
208
+    #if HOTENDS >= 2
209
+      VP_T_E1_Is, VP_T_E1_Set,
210
+    #endif
211 211
   #endif
212 212
   #if HAS_HEATED_BED
213 213
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -225,11 +225,11 @@ const uint16_t VPList_StepPerMM[] PROGMEM = {
225 225
   VP_X_STEP_PER_MM,
226 226
   VP_Y_STEP_PER_MM,
227 227
   VP_Z_STEP_PER_MM,
228
-  #if HOTENDS >= 1
228
+  #if HAS_HOTEND
229 229
     VP_E0_STEP_PER_MM,
230
-  #endif
231
-  #if HOTENDS >= 2
232
-    VP_E1_STEP_PER_MM,
230
+    #if HOTENDS >= 2
231
+      VP_E1_STEP_PER_MM,
232
+    #endif
233 233
   #endif
234 234
   0x0000
235 235
 };
@@ -268,7 +268,7 @@ const uint16_t VPList_PIDTuningWaiting[] PROGMEM = {
268 268
 };
269 269
 
270 270
 const uint16_t VPList_FLCPreheat[] PROGMEM = {
271
-  #if HOTENDS >= 1
271
+  #if HAS_HOTEND
272 272
     VP_T_E0_Is, VP_T_E0_Set,
273 273
   #endif
274 274
   #if HAS_HEATED_BED
@@ -278,14 +278,14 @@ const uint16_t VPList_FLCPreheat[] PROGMEM = {
278 278
 };
279 279
 
280 280
 const uint16_t VPList_FLCPrinting[] PROGMEM = {
281
-  #if HOTENDS >= 1
281
+  #if HAS_HOTEND
282 282
     VP_SD_Print_ProbeOffsetZ,
283 283
   #endif
284 284
   0x0000
285 285
 };
286 286
 
287 287
 const uint16_t VPList_Z_Offset[] PROGMEM = {
288
-  #if HOTENDS >= 1
288
+  #if HAS_HOTEND
289 289
     VP_SD_Print_ProbeOffsetZ,
290 290
   #endif
291 291
   0x0000
@@ -319,14 +319,6 @@ const struct VPMapping VPMap[] PROGMEM = {
319 319
 
320 320
 const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION;
321 321
 
322
-// Helper to define a DGUS_VP_Variable for common use cases.
323
-#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=sizeof(VPADRVAR), \
324
-  .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
325
-
326
-// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string)
327
-#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=STRLEN, \
328
-  .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
329
-
330 322
 const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
331 323
   // Helper to detect touch events
332 324
   VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr),
@@ -336,92 +328,92 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
336 328
   #endif
337 329
   VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr),
338 330
 
339
-  VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr),
331
+  VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr),
340 332
 
341 333
   #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
342
-    VPHELPER(VP_MOVE_OPTION, &distanceToMove, &ScreenHandler.HandleManualMoveOption, nullptr),
334
+    VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr),
343 335
   #endif
344 336
   #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
345
-    VPHELPER(VP_MOVE_X, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
346
-    VPHELPER(VP_MOVE_Y, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
347
-    VPHELPER(VP_MOVE_Z, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
348
-    VPHELPER(VP_HOME_ALL, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
337
+    VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
338
+    VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
339
+    VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
340
+    VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
349 341
   #else
350
-    VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr),
351
-    VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr),
352
-    VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr),
353
-    VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr),
342
+    VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr),
343
+    VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr),
344
+    VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr),
345
+    VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr),
354 346
   #endif
355
-  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleMotorLockUnlock, nullptr),
347
+  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr),
356 348
   #if ENABLED(POWER_LOSS_RECOVERY)
357
-    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr),
349
+    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr),
358 350
   #endif
359
-  VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr),
351
+  VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr),
360 352
   #if ENABLED(SINGLE_Z_CALIBRATION)
361
-    VPHELPER(VP_Z_CALIBRATE, nullptr, &ScreenHandler.HandleZCalibration, nullptr),
353
+    VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr),
362 354
   #endif
363 355
   #if ENABLED(FIRST_LAYER_CAL)
364
-    VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, &ScreenHandler.HandleFirstLayerCal, nullptr),
356
+    VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr),
365 357
   #endif
366 358
 
367
-  { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
359
+  { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
368 360
   // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
369
-  { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplay },
361
+  { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay },
370 362
 
371 363
   // Temperature Data
372
-  #if HOTENDS >= 1
364
+  #if HAS_HOTEND
373 365
     VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
374
-    VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
375
-    VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
366
+    VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
367
+    VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
376 368
     VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
377
-    VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
378
-    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr),
379
-    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
369
+    VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
370
+    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr),
371
+    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
380 372
     #if ENABLED(DGUS_PREHEAT_UI)
381
-      VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr),
373
+      VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr),
382 374
     #endif
383 375
     #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
384
-      VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload),
376
+      VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
385 377
     #endif
386 378
     #if ENABLED(PIDTEMP)
387 379
       VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
388 380
       VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
389 381
       VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
390
-      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
382
+      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
391 383
     #endif
392 384
   #endif
393 385
   #if HOTENDS >= 2
394 386
     VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
395
-    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
396
-    VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
397
-    VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
398
-    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr),
399
-    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
387
+    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
388
+    VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
389
+    VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
390
+    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr),
391
+    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
400 392
   #endif
401 393
   #if HAS_HEATED_BED
402 394
     VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
403
-    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
404
-    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr),
405
-    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
395
+    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
396
+    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr),
397
+    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
406 398
     #if ENABLED(PIDTEMP)
407 399
       VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
408 400
       VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
409 401
       VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
410
-      VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
402
+      VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
411 403
     #endif
412 404
   #endif
413 405
 
414 406
   // Fan Data
415 407
   #if HAS_FAN
416 408
     #define FAN_VPHELPER(N) \
417
-      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, &ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
418
-      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr), \
419
-      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
409
+      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
410
+      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \
411
+      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
420 412
     REPEAT(FAN_COUNT, FAN_VPHELPER)
421 413
   #endif
422 414
 
423 415
   // Feedrate
424
-  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, &ScreenHandler.DGUSLCD_SendWordValueToDisplay ),
416
+  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
425 417
 
426 418
   // Position Data
427 419
   VPHELPER(VP_XPos, &current_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -429,23 +421,23 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
429 421
   VPHELPER(VP_ZPos, &current_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
430 422
 
431 423
   // Print Progress
432
-  VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay ),
424
+  VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay),
433 425
 
434 426
   // Print Time
435
-  VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay ),
427
+  VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay),
436 428
   #if ENABLED(PRINTCOUNTER)
437
-    VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay ),
438
-    VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay ),
429
+    VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay),
430
+    VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay),
439 431
   #endif
440 432
 
441 433
   VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
442 434
   VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
443 435
   VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
444
-  #if HOTENDS >= 1
436
+  #if HAS_HOTEND
445 437
     VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
446
-  #endif
447
-  #if HOTENDS >= 2
448
-    VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
438
+    #if HOTENDS >= 2
439
+      VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
440
+    #endif
449 441
   #endif
450 442
 
451 443
   // SDCard File listing.
@@ -462,7 +454,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
462 454
     VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr),
463 455
     VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr),
464 456
     #if HAS_BED_PROBE
465
-      VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
457
+      VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
466 458
       #if ENABLED(BABYSTEPPING)
467 459
         VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr),
468 460
       #endif
@@ -474,10 +466,10 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
474 466
   #endif
475 467
 
476 468
   // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
477
-  { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
478
-  { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
479
-  { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
480
-  { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
469
+  { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
470
+  { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
471
+  { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
472
+  { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
481 473
 
482 474
   VPHELPER(0, 0, 0, 0)  // must be last entry.
483 475
 };

+ 6
- 6
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp Dosyayı Görüntüle

@@ -249,7 +249,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
249 249
 
250 250
     switch (var.VP) {
251 251
       default: return;
252
-        #if HOTENDS >= 1
252
+        #if HAS_HOTEND
253 253
           case VP_E0_PID_P: newvalue = value; break;
254 254
           case VP_E0_PID_I: newvalue = scalePID_i(value); break;
255 255
           case VP_E0_PID_D: newvalue = scalePID_d(value); break;
@@ -329,18 +329,18 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
329 329
     }
330 330
 
331 331
     if (filament_data.action == 0) { // Go back to utility screen
332
-      #if HOTENDS >= 1
332
+      #if HAS_HOTEND
333 333
         thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0);
334
-      #endif
335
-      #if HOTENDS >= 2
336
-        thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1);
334
+        #if HOTENDS >= 2
335
+          thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1);
336
+        #endif
337 337
       #endif
338 338
       GotoScreen(DGUSLCD_SCREEN_UTILITY);
339 339
     }
340 340
     else { // Go to the preheat screen to show the heating progress
341 341
       switch (var.VP) {
342 342
         default: return;
343
-          #if HOTENDS >= 1
343
+          #if HAS_HOTEND
344 344
             case VP_E0_FILAMENT_LOAD_UNLOAD:
345 345
               filament_data.extruder = ExtUI::extruder_t::E0;
346 346
               thermalManager.setTargetHotend(e_temp, filament_data.extruder);

+ 80
- 95
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp Dosyayı Görüntüle

@@ -120,11 +120,11 @@ const uint16_t VPList_Boot[] PROGMEM = {
120 120
 
121 121
 const uint16_t VPList_Main[] PROGMEM = {
122 122
   // VP_M117, for completeness, but it cannot be auto-uploaded.
123
-  #if HOTENDS >= 1
123
+  #if HAS_HOTEND
124 124
     MKSLIST_E_ITEM(0) VP_E0_STATUS,
125
-  #endif
126
-  #if HOTENDS >= 2
127
-    MKSLIST_E_ITEM(1)
125
+    #if HOTENDS >= 2
126
+      MKSLIST_E_ITEM(1) VP_E1_STATUS,
127
+    #endif
128 128
   #endif
129 129
   #if HAS_HEATED_BED
130 130
     VP_T_Bed_Is, VP_T_Bed_Set, VP_BED_STATUS,
@@ -498,20 +498,6 @@ const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION;
498 498
 const char H43Version[] PROGMEM = "MKS H43_V1.30";
499 499
 const char Updata_Time[] PROGMEM = STRING_DISTRIBUTION_DATE;
500 500
 
501
-// Helper to define a DGUS_VP_Variable for common use cases.
502
-#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR)                       \
503
-  {                                                                     \
504
-    .VP = VPADR, .memadr = VPADRVAR, .size = sizeof(VPADRVAR),          \
505
-    .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR \
506
-  }
507
-
508
-// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string)
509
-#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR)           \
510
-  {                                                                     \
511
-    .VP = VPADR, .memadr = VPADRVAR, .size = STRLEN,                    \
512
-    .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR \
513
-  }
514
-
515 501
 const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
516 502
   // Helper to detect touch events
517 503
   VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr),
@@ -522,109 +508,109 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
522 508
   VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr),
523 509
 
524 510
   // Back Button
525
-  VPHELPER(VP_BACK_PAGE, nullptr, &ScreenHandler.ScreenBackChange, nullptr),
526
-  VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr),
511
+  VPHELPER(VP_BACK_PAGE, nullptr, ScreenHandler.ScreenBackChange, nullptr),
512
+  VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr),
527 513
 
528
-  VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr),
529
-  VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr),
530
-  VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr),
531
-  VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr),
514
+  VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr),
515
+  VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr),
516
+  VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr),
517
+  VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr),
532 518
 
533
-  VPHELPER(VP_X_HOME, nullptr, &ScreenHandler.HandleManualMove, nullptr),
534
-  VPHELPER(VP_Y_HOME, nullptr, &ScreenHandler.HandleManualMove, nullptr),
535
-  VPHELPER(VP_Z_HOME, nullptr, &ScreenHandler.HandleManualMove, nullptr),
519
+  VPHELPER(VP_X_HOME, nullptr, ScreenHandler.HandleManualMove, nullptr),
520
+  VPHELPER(VP_Y_HOME, nullptr, ScreenHandler.HandleManualMove, nullptr),
521
+  VPHELPER(VP_Z_HOME, nullptr, ScreenHandler.HandleManualMove, nullptr),
536 522
 
537
-  VPHELPER(VP_MOVE_DISTANCE, &manualMoveStep, &ScreenHandler.GetManualMovestep, nullptr),
523
+  VPHELPER(VP_MOVE_DISTANCE, &manualMoveStep, ScreenHandler.GetManualMovestep, nullptr),
538 524
 
539
-  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleManualMove, nullptr),
540
-  VPHELPER(VP_LEVEL_POINT, nullptr, &ScreenHandler.ManualAssistLeveling, nullptr),
525
+  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleManualMove, nullptr),
526
+  VPHELPER(VP_LEVEL_POINT, nullptr, ScreenHandler.ManualAssistLeveling, nullptr),
541 527
 
542 528
   #if ENABLED(POWER_LOSS_RECOVERY)
543
-    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr),
529
+    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr),
544 530
   #endif
545
-  VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr),
531
+  VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr),
546 532
   #if ENABLED(SINGLE_Z_CALIBRATION)
547
-    VPHELPER(VP_Z_CALIBRATE, nullptr, &ScreenHandler.HandleZCalibration, nullptr),
533
+    VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr),
548 534
   #endif
549 535
   #if ENABLED(FIRST_LAYER_CAL)
550
-    VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, &ScreenHandler.HandleFirstLayerCal, nullptr),
536
+    VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr),
551 537
   #endif
552
-  {.VP = VP_MARLIN_VERSION, .memadr = (void *)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
538
+  {.VP = VP_MARLIN_VERSION, .memadr = (void *)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
553 539
   // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
554
-  {.VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplay},
555
-  {.VP = VP_MKS_H43_VERSION, .memadr = (void *)H43Version, .size = VP_MKS_H43_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
556
-  {.VP = VP_MKS_H43_UpdataVERSION, .memadr = (void *)Updata_Time, .size = VP_MKS_H43_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
540
+  {.VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay},
541
+  {.VP = VP_MKS_H43_VERSION, .memadr = (void *)H43Version, .size = VP_MKS_H43_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
542
+  {.VP = VP_MKS_H43_UpdataVERSION, .memadr = (void *)Updata_Time, .size = VP_MKS_H43_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
557 543
 
558 544
   // Temperature Data
559
-  #if HOTENDS >= 1
545
+  #if HAS_HOTEND
560 546
     VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
561
-    VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
562
-    VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
547
+    VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
548
+    VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
563 549
     VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
564
-    VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
565
-    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr),
566
-    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
550
+    VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
551
+    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr),
552
+    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
567 553
     #if ENABLED(DGUS_PREHEAT_UI)
568
-      VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr),
554
+      VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr),
569 555
     #endif
570 556
     #if ENABLED(PIDTEMP)
571 557
       VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
572 558
       VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
573 559
       VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
574
-      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
560
+      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
575 561
     #endif
576 562
     #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
577
-      VPHELPER(VP_LOAD_Filament, nullptr, &ScreenHandler.MKS_FilamentLoad, nullptr),
578
-      VPHELPER(VP_UNLOAD_Filament, nullptr, &ScreenHandler.MKS_FilamentUnLoad, nullptr),
579
-      VPHELPER(VP_Filament_distance, &distanceFilament, &ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
580
-      VPHELPER(VP_Filament_speed, &filamentSpeed_mm_s, &ScreenHandler.GetManualFilamentSpeed, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
563
+      VPHELPER(VP_LOAD_Filament, nullptr, ScreenHandler.MKS_FilamentLoad, nullptr),
564
+      VPHELPER(VP_UNLOAD_Filament, nullptr, ScreenHandler.MKS_FilamentUnLoad, nullptr),
565
+      VPHELPER(VP_Filament_distance, &distanceFilament, ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
566
+      VPHELPER(VP_Filament_speed, &filamentSpeed_mm_s, ScreenHandler.GetManualFilamentSpeed, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
581 567
     #endif
582 568
   #endif
583 569
 
584 570
   #if HOTENDS >= 2
585 571
     VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
586
-    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
587
-    VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
588
-    VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
589
-    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr),
590
-    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
572
+    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
573
+    VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
574
+    VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
575
+    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr),
576
+    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
591 577
 
592 578
     #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
593
-      VPHELPER(VP_Filament_distance, &distanceFilament, &ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
594
-      VPHELPER(VP_Filament_speed, &filamentSpeed_mm_s, &ScreenHandler.GetManualFilamentSpeed, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
579
+      VPHELPER(VP_Filament_distance, &distanceFilament, ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
580
+      VPHELPER(VP_Filament_speed, &filamentSpeed_mm_s, ScreenHandler.GetManualFilamentSpeed, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
595 581
     #endif
596 582
 
597 583
     #if ENABLED(PIDTEMP)
598
-      VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
584
+      VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
599 585
     #endif
600 586
 
601
-    VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload),
587
+    VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
602 588
   #endif
603 589
 
604 590
   #if HAS_HEATED_BED
605 591
     VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
606
-    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
607
-    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr),
608
-    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
592
+    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
593
+    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr),
594
+    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
609 595
     #if ENABLED(PIDTEMPBED)
610 596
       VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
611 597
       VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
612 598
       VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
613
-      VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
599
+      VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
614 600
     #endif
615 601
   #endif
616 602
 
617 603
   // Fan Data
618 604
   #if HAS_FAN
619 605
     #define FAN_VPHELPER(N)                                                                                                                    \
620
-      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_SetUint8, &ScreenHandler.DGUSLCD_SendFanToDisplay), \
621
-      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr),                               \
622
-      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
606
+      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_SetUint8, ScreenHandler.DGUSLCD_SendFanToDisplay), \
607
+      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr),                               \
608
+      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
623 609
     REPEAT(FAN_COUNT, FAN_VPHELPER)
624 610
   #endif
625 611
 
626 612
   // Feedrate
627
-  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
613
+  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
628 614
 
629 615
   // Position Data
630 616
   VPHELPER(VP_XPos, &current_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -646,8 +632,8 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
646 632
   // Print Progress
647 633
   VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay),
648 634
 
649
-  //LCD Control
650
-  VPHELPER(VP_LCD_BLK, &lcd_default_light, &ScreenHandler.LCD_BLK_Adjust, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
635
+  // LCD Control
636
+  VPHELPER(VP_LCD_BLK, &lcd_default_light, ScreenHandler.LCD_BLK_Adjust, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
651 637
 
652 638
   // Print Time
653 639
   VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay_MKS),
@@ -665,22 +651,22 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
665 651
   VPHELPER(VP_Y_MAX_SPEED, &planner.settings.max_feedrate_mm_s[Y_AXIS], ScreenHandler.HandleMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
666 652
   VPHELPER(VP_Z_MAX_SPEED, &planner.settings.max_feedrate_mm_s[Z_AXIS], ScreenHandler.HandleMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
667 653
 
668
-  #if HOTENDS >= 1
654
+  #if HAS_HOTEND
669 655
     VPHELPER(VP_E0_MAX_SPEED, &planner.settings.max_feedrate_mm_s[E_AXIS_N(0)], ScreenHandler.HandleExtruderMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
670
-  #endif
671
-  #if HOTENDS >= 2
672
-    VPHELPER(VP_E1_MAX_SPEED, &planner.settings.max_feedrate_mm_s[E_AXIS_N(1)], ScreenHandler.HandleExtruderMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
656
+    #if HOTENDS >= 2
657
+      VPHELPER(VP_E1_MAX_SPEED, &planner.settings.max_feedrate_mm_s[E_AXIS_N(1)], ScreenHandler.HandleExtruderMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
658
+    #endif
673 659
   #endif
674 660
 
675 661
   VPHELPER(VP_X_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[X_AXIS], ScreenHandler.HandleMaxAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
676 662
   VPHELPER(VP_Y_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[Y_AXIS], ScreenHandler.HandleMaxAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
677 663
   VPHELPER(VP_Z_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[Z_AXIS], ScreenHandler.HandleMaxAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
678 664
 
679
-  #if HOTENDS >= 1
665
+  #if HAS_HOTEND
680 666
     VPHELPER(VP_E0_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(0)], ScreenHandler.HandleExtruderAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
681
-  #endif
682
-  #if HOTENDS >= 2
683
-    VPHELPER(VP_E1_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)], ScreenHandler.HandleExtruderAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
667
+    #if HOTENDS >= 2
668
+      VPHELPER(VP_E1_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)], ScreenHandler.HandleExtruderAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
669
+    #endif
684 670
   #endif
685 671
 
686 672
   VPHELPER(VP_TRAVEL_SPEED, (uint16_t *)&planner.settings.travel_acceleration, ScreenHandler.HandleTravelAccChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
@@ -748,18 +734,17 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
748 734
   VPHELPER(VP_MESH_LEVEL_POINT,nullptr, ScreenHandler.MeshLevel,nullptr),
749 735
 
750 736
   #if ENABLED(PREVENT_COLD_EXTRUSION)
751
-    VPHELPER(VP_Min_EX_T_E, &thermalManager.extrude_min_temp, &ScreenHandler.GetMinExtrudeTemp, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
737
+    VPHELPER(VP_Min_EX_T_E, &thermalManager.extrude_min_temp, ScreenHandler.GetMinExtrudeTemp, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
752 738
   #endif
753 739
 
754
-  VPHELPER(VP_AutoTurnOffSw, nullptr, &ScreenHandler.GetTurnOffCtrl, nullptr),
740
+  VPHELPER(VP_AutoTurnOffSw, nullptr, ScreenHandler.GetTurnOffCtrl, nullptr),
755 741
 
756
-  #if HOTENDS >= 1
742
+  #if HAS_HOTEND
757 743
     VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
744
+    #if HOTENDS >= 2
745
+      VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
746
+    #endif
758 747
   #endif
759
-  #if HOTENDS >= 2
760
-    VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>),
761
-  #endif
762
-
763 748
 
764 749
   // SDCard File listing
765 750
 
@@ -781,8 +766,8 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
781 766
     VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr),
782 767
     VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr),
783 768
     #if ENABLED(BABYSTEPPING)
784
-      VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
785
-      VPHELPER(VP_ZOffset_DE_DIS, &z_offset_add, nullptr, &ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
769
+      VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
770
+      VPHELPER(VP_ZOffset_DE_DIS, &z_offset_add, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
786 771
     #endif
787 772
     #if HAS_BED_PROBE
788 773
       VPHELPER(VP_OFFSET_X, &probe.offset.x, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -798,15 +783,15 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
798 783
   #endif
799 784
 
800 785
   // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
801
-  //{.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
802
-  //{.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
803
-  //{.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
804
-  //{.VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
805
-
806
-  {.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
807
-  {.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
808
-  {.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
809
-  {.VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
786
+  //{.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
787
+  //{.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
788
+  //{.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
789
+  //{.VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM},
790
+
791
+  {.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
792
+  {.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
793
+  {.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
794
+  {.VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS},
810 795
 
811 796
   VPHELPER(0, 0, 0, 0) // must be last entry.
812 797
 };

+ 0
- 1
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp Dosyayı Görüntüle

@@ -575,7 +575,6 @@ void DGUSScreenHandler::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) {
575 575
           settings.save();
576 576
         }
577 577
         else if (mesh_point_count == 0) {
578
-
579 578
           mesh_point_count = GRID_MAX_POINTS;
580 579
           soft_endstop._enabled = true;
581 580
           settings.save();

+ 4
- 4
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h Dosyayı Görüntüle

@@ -189,12 +189,12 @@ public:
189 189
     static void PrintReturn(DGUS_VP_Variable &var, void *val_ptr);
190 190
   #endif
191 191
 
192
-  // OK Button the Confirm screen.
192
+  // OK Button on the Confirm screen.
193 193
   static void ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr);
194 194
 
195
-  // Update data after went to new screen (by display or by GotoScreen)
196
-  // remember: store the last-displayed screen, so it can get returned to.
197
-  // (e.g for pop up messages)
195
+  // Update data after going to a new screen (by display or by GotoScreen)
196
+  // remember: store the last-displayed screen, so it can be returned to.
197
+  // (e.g for popup messages)
198 198
   static void UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup=false);
199 199
 
200 200
   // Recall the remembered screen.

+ 79
- 112
Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp Dosyayı Görüntüle

@@ -55,11 +55,11 @@ const uint16_t VPList_Main[] PROGMEM = {
55 55
 };
56 56
 
57 57
 const uint16_t VPList_Temp[] PROGMEM = {
58
-  #if HOTENDS >= 1
58
+  #if HAS_HOTEND
59 59
     VP_T_E0_Is, VP_T_E0_Set,
60
-  #endif
61
-  #if HOTENDS >= 2
62
-    VP_T_E1_Is, VP_T_E1_Set,
60
+    #if HOTENDS >= 2
61
+      VP_T_E1_Is, VP_T_E1_Set,
62
+    #endif
63 63
   #endif
64 64
   #if HAS_HEATED_BED
65 65
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -69,11 +69,11 @@ const uint16_t VPList_Temp[] PROGMEM = {
69 69
 
70 70
 const uint16_t VPList_Status[] PROGMEM = {
71 71
   /* VP_M117, for completeness, but it cannot be auto-uploaded */
72
-  #if HOTENDS >= 1
72
+  #if HAS_HOTEND
73 73
     VP_T_E0_Is, VP_T_E0_Set,
74
-  #endif
75
-  #if HOTENDS >= 2
76
-    VP_T_E1_Is, VP_T_E1_Set,
74
+    #if HOTENDS >= 2
75
+      VP_T_E1_Is, VP_T_E1_Set,
76
+    #endif
77 77
   #endif
78 78
   #if HAS_HEATED_BED
79 79
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -90,72 +90,40 @@ const uint16_t VPList_Status[] PROGMEM = {
90 90
 
91 91
 const uint16_t VPList_Status2[] PROGMEM = {
92 92
   // VP_M117, for completeness, but it cannot be auto-uploaded
93
-  #if HOTENDS >= 1
93
+  #if HAS_HOTEND
94 94
     VP_Flowrate_E0,
95
-  #endif
96
-  #if HOTENDS >= 2
97
-    VP_Flowrate_E1,
95
+    #if HOTENDS >= 2
96
+      VP_Flowrate_E1,
97
+    #endif
98 98
   #endif
99 99
   VP_PrintProgress_Percentage,
100 100
   VP_PrintTime,
101 101
   0x0000
102 102
 };
103
-
104
-const uint16_t VPList_ManualMove[] PROGMEM = {
105
-  VP_XPos, VP_YPos, VP_ZPos,
106
-  0x0000
107
-};
108
-
109
-const uint16_t VPList_ManualExtrude[] PROGMEM = {
110
-  VP_EPos,
111
-  0x0000
112
-};
113
-
114
-const uint16_t VPList_FanAndFeedrate[] PROGMEM = {
115
-  VP_Feedrate_Percentage, VP_Fan0_Percentage,
116
-  0x0000
117
-};
118
-
119
-const uint16_t VPList_SD_FlowRates[] PROGMEM = {
120
-  VP_Flowrate_E0, VP_Flowrate_E1,
121
-  0x0000
122
-};
123
-
124
-const uint16_t VPList_SDFileList[] PROGMEM = {
125
-  VP_SD_FileName0, VP_SD_FileName1, VP_SD_FileName2, VP_SD_FileName3, VP_SD_FileName4,
126
-  0x0000
127
-};
128
-
129
-const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
130
-  VP_PrintProgress_Percentage, VP_PrintTime,
131
-  0x0000
132
-};
103
+const uint16_t VPList_ManualMove[]           PROGMEM = { VP_XPos, VP_YPos, VP_ZPos, 0x0000 };
104
+const uint16_t VPList_ManualExtrude[]        PROGMEM = { VP_EPos, 0x0000 };
105
+const uint16_t VPList_FanAndFeedrate[]       PROGMEM = { VP_Feedrate_Percentage, VP_Fan0_Percentage, 0x0000 };
106
+const uint16_t VPList_SD_FlowRates[]         PROGMEM = { VP_Flowrate_E0, VP_Flowrate_E1, 0x0000 };
107
+const uint16_t VPList_SDFileList[]           PROGMEM = { VP_SD_FileName0, VP_SD_FileName1, VP_SD_FileName2, VP_SD_FileName3, VP_SD_FileName4, 0x0000 };
108
+const uint16_t VPList_SD_PrintManipulation[] PROGMEM = { VP_PrintProgress_Percentage, VP_PrintTime, 0x0000 };
133 109
 
134 110
 const struct VPMapping VPMap[] PROGMEM = {
135
-  { DGUSLCD_SCREEN_BOOT, VPList_Boot },
136
-  { DGUSLCD_SCREEN_MAIN, VPList_Main },
137
-  { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp },
138
-  { DGUSLCD_SCREEN_STATUS, VPList_Status },
139
-  { DGUSLCD_SCREEN_STATUS2, VPList_Status2 },
140
-  { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove },
141
-  { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude },
142
-  { DGUSLCD_SCREEN_FANANDFEEDRATE, VPList_FanAndFeedrate },
143
-  { DGUSLCD_SCREEN_FLOWRATES, VPList_SD_FlowRates },
111
+  { DGUSLCD_SCREEN_BOOT,                VPList_Boot                 },
112
+  { DGUSLCD_SCREEN_MAIN,                VPList_Main                 },
113
+  { DGUSLCD_SCREEN_TEMPERATURE,         VPList_Temp                 },
114
+  { DGUSLCD_SCREEN_STATUS,              VPList_Status               },
115
+  { DGUSLCD_SCREEN_STATUS2,             VPList_Status2              },
116
+  { DGUSLCD_SCREEN_MANUALMOVE,          VPList_ManualMove           },
117
+  { DGUSLCD_SCREEN_MANUALEXTRUDE,       VPList_ManualExtrude        },
118
+  { DGUSLCD_SCREEN_FANANDFEEDRATE,      VPList_FanAndFeedrate       },
119
+  { DGUSLCD_SCREEN_FLOWRATES,           VPList_SD_FlowRates         },
144 120
   { DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation },
145
-  { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList },
121
+  { DGUSLCD_SCREEN_SDFILELIST,          VPList_SDFileList           },
146 122
   { 0 , nullptr } // List is terminated with an nullptr as table entry.
147 123
 };
148 124
 
149 125
 const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION;
150 126
 
151
-// Helper to define a DGUS_VP_Variable for common use cases.
152
-#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=sizeof(VPADRVAR), \
153
-  .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
154
-
155
-// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string)
156
-#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=STRLEN, \
157
-  .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
158
-
159 127
 const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
160 128
   // Helper to detect touch events
161 129
   VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr),
@@ -165,72 +133,71 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
165 133
   #endif
166 134
   VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr),
167 135
 
168
-  VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr),
136
+  VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr),
169 137
 
170 138
   #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
171
-    VPHELPER(VP_MOVE_OPTION, &distanceToMove, &ScreenHandler.HandleManualMoveOption, nullptr),
139
+    VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr),
172 140
   #endif
173 141
   #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
174
-    VPHELPER(VP_MOVE_X, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
175
-    VPHELPER(VP_MOVE_Y, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
176
-    VPHELPER(VP_MOVE_Z, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
177
-    VPHELPER(VP_HOME_ALL, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
142
+    VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
143
+    VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
144
+    VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
145
+    VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
178 146
   #else
179
-    VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr),
180
-    VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr),
181
-    VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr),
182
-    VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr),
147
+    VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr),
148
+    VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr),
149
+    VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr),
150
+    VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr),
183 151
   #endif
184 152
 
185
-  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleMotorLockUnlock, nullptr),
153
+  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr),
186 154
   #if ENABLED(POWER_LOSS_RECOVERY)
187
-    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr),
155
+    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr),
188 156
   #endif
189
-  VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr),
157
+  VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr),
190 158
 
191
-  { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
159
+  { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
192 160
   // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
193
-  { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplay },
161
+  { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay },
194 162
 
195 163
   // Temperature Data
196
-  #if HOTENDS >= 1
164
+  #if HAS_HOTEND
197 165
     VPHELPER(VP_T_E0_Is, nullptr, nullptr, SET_VARIABLE(getActualTemp_celsius, E0, long)),
198
-    VPHELPER(VP_T_E0_Set, nullptr, GET_VARIABLE(setTargetTemp_celsius, E0),
199
-                                   SET_VARIABLE(getTargetTemp_celsius, E0)),
200
-    VPHELPER(VP_Flowrate_E0, nullptr, ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
166
+    VPHELPER(VP_T_E0_Set, nullptr, GET_VARIABLE(setTargetTemp_celsius, E0), SET_VARIABLE(getTargetTemp_celsius, E0)),
167
+    VPHELPER(VP_Flowrate_E0, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
201 168
     VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
202
-    VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
203
-    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr),
204
-    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
169
+    VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
170
+    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr),
171
+    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
205 172
     #if ENABLED(DGUS_PREHEAT_UI)
206
-      VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr),
173
+      VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr),
207 174
     #endif
208 175
     #if ENABLED(PIDTEMP)
209 176
       VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
210 177
       VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
211 178
       VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
212
-      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
179
+      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
213 180
     #endif
214 181
     #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
215
-      VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload),
182
+      VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
216 183
     #endif
217 184
   #endif
218 185
   #if HOTENDS >= 2
219
-    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, DGUSLCD_SendWordValueToDisplay),
220
-    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
221
-    VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
222
-    VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
223
-    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr),
224
-    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
186
+    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
187
+    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
188
+    VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
189
+    VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
190
+    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr),
191
+    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
225 192
     #if ENABLED(PIDTEMP)
226
-      VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
193
+      VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
227 194
     #endif
228 195
   #endif
229 196
   #if HAS_HEATED_BED
230 197
     VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
231
-    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
232
-    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr),
233
-    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
198
+    VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
199
+    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr),
200
+    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
234 201
     #if ENABLED(PIDTEMPBED)
235 202
       VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
236 203
       VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
@@ -241,14 +208,14 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
241 208
   // Fan Data
242 209
   #if HAS_FAN
243 210
     #define FAN_VPHELPER(N) \
244
-      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, &ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
245
-      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr), \
246
-      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
211
+      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
212
+      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \
213
+      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
247 214
     REPEAT(FAN_COUNT, FAN_VPHELPER)
248 215
   #endif
249 216
 
250 217
   // Feedrate
251
-  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, &ScreenHandler.DGUSLCD_SendWordValueToDisplay ),
218
+  VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
252 219
 
253 220
   // Position Data
254 221
   VPHELPER(VP_XPos, &current_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -256,23 +223,23 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
256 223
   VPHELPER(VP_ZPos, &current_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
257 224
 
258 225
   // Print Progress
259
-  VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay ),
226
+  VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay),
260 227
 
261 228
   // Print Time
262
-  VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay ),
229
+  VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay),
263 230
   #if ENABLED(PRINTCOUNTER)
264
-    VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay ),
265
-    VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay ),
231
+    VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay),
232
+    VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay),
266 233
   #endif
267 234
 
268 235
   VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
269 236
   VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
270 237
   VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
271
-  #if HOTENDS >= 1
238
+  #if HAS_HOTEND
272 239
     VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
273
-  #endif
274
-  #if HOTENDS >= 2
275
-    VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
240
+    #if HOTENDS >= 2
241
+      VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
242
+    #endif
276 243
   #endif
277 244
 
278 245
   // SDCard File listing.
@@ -289,7 +256,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
289 256
     VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr),
290 257
     VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr),
291 258
     #if HAS_BED_PROBE
292
-      VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
259
+      VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
293 260
       #if ENABLED(BABYSTEPPING)
294 261
         VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr),
295 262
       #endif
@@ -301,10 +268,10 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
301 268
   #endif
302 269
 
303 270
   // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
304
-  { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
305
-  { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
306
-  { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
307
-  { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
271
+  { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
272
+  { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
273
+  { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
274
+  { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
308 275
 
309 276
   VPHELPER(0, 0, 0, 0)  // must be last entry.
310 277
 };

+ 6
- 6
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp Dosyayı Görüntüle

@@ -251,7 +251,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
251 251
 
252 252
     switch (var.VP) {
253 253
       default: return;
254
-        #if HOTENDS >= 1
254
+        #if HAS_HOTEND
255 255
           case VP_E0_PID_P: newvalue = value; break;
256 256
           case VP_E0_PID_I: newvalue = scalePID_i(value); break;
257 257
           case VP_E0_PID_D: newvalue = scalePID_d(value); break;
@@ -331,18 +331,18 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
331 331
     }
332 332
 
333 333
     if (filament_data.action == 0) { // Go back to utility screen
334
-      #if HOTENDS >= 1
334
+      #if HAS_HOTEND
335 335
         thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0);
336
-      #endif
337
-      #if HOTENDS >= 2
338
-        thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1);
336
+        #if HOTENDS >= 2
337
+          thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1);
338
+        #endif
339 339
       #endif
340 340
       GotoScreen(DGUSLCD_SCREEN_UTILITY);
341 341
     }
342 342
     else { // Go to the preheat screen to show the heating progress
343 343
       switch (var.VP) {
344 344
         default: return;
345
-          #if HOTENDS >= 1
345
+          #if HAS_HOTEND
346 346
             case VP_E0_FILAMENT_LOAD_UNLOAD:
347 347
               filament_data.extruder = ExtUI::extruder_t::E0;
348 348
               thermalManager.setTargetHotend(e_temp, filament_data.extruder);

Loading…
İptal
Kaydet