1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* DGUS VPs changed by George Fu in 2019 for Marlin */
#include "../../../../../inc/MarlinConfigPre.h"
#if ENABLED(DGUS_LCD_UI_FYSETC)
#include "DGUSDisplayDef.h"
#include "../DGUSDisplay.h"
#include "../DGUSScreenHandler.h"
#include "../../../../../module/temperature.h"
#include "../../../../../module/motion.h"
#include "../../../../../module/planner.h"
#include "../../../ui_api.h"
#include "../../../../marlinui.h"
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
uint16_t distanceToMove = 10;
#endif
const uint16_t VPList_Boot[] PROGMEM = {
VP_MARLIN_VERSION,
0x0000
};
const uint16_t VPList_Main[] PROGMEM = {
/* VP_M117, for completeness, but it cannot be auto-uploaded. */
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set, VP_BED_STATUS,
#endif
#if HAS_FAN
VP_Fan0_Percentage, VP_FAN0_STATUS,
#endif
VP_XPos, VP_YPos, VP_ZPos,
VP_Fan0_Percentage,
VP_Feedrate_Percentage,
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
VP_PrintProgress_Percentage,
#endif
0x0000
};
const uint16_t VPList_Temp[] PROGMEM = {
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_Status[] PROGMEM = {
/* VP_M117, for completeness, but it cannot be auto-uploaded */
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
#if HAS_FAN
VP_Fan0_Percentage,
#endif
VP_XPos, VP_YPos, VP_ZPos,
VP_Fan0_Percentage,
VP_Feedrate_Percentage,
VP_PrintProgress_Percentage,
0x0000
};
const uint16_t VPList_Status2[] PROGMEM = {
/* VP_M117, for completeness, but it cannot be auto-uploaded */
#if HOTENDS >= 1
VP_Flowrate_E0,
#endif
#if HOTENDS >= 2
VP_Flowrate_E1,
#endif
VP_PrintProgress_Percentage,
VP_PrintTime,
0x0000
};
const uint16_t VPList_Preheat[] PROGMEM = {
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_ManualMove[] PROGMEM = {
VP_XPos, VP_YPos, VP_ZPos,
0x0000
};
const uint16_t VPList_ManualExtrude[] PROGMEM = {
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
VP_EPos,
0x0000
};
const uint16_t VPList_FanAndFeedrate[] PROGMEM = {
VP_Feedrate_Percentage, VP_Fan0_Percentage,
0x0000
};
const uint16_t VPList_SD_FlowRates[] PROGMEM = {
VP_Flowrate_E0, VP_Flowrate_E1,
0x0000
};
const uint16_t VPList_Filament_heating[] PROGMEM = {
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set,
VP_E0_FILAMENT_LOAD_UNLOAD,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
VP_E1_FILAMENT_LOAD_UNLOAD,
#endif
0x0000
};
const uint16_t VPList_Filament_load_unload[] PROGMEM = {
#if HOTENDS >= 1
VP_E0_FILAMENT_LOAD_UNLOAD,
#endif
#if HOTENDS >= 2
VP_E1_FILAMENT_LOAD_UNLOAD,
#endif
0x0000
};
const uint16_t VPList_SDFileList[] PROGMEM = {
VP_SD_FileName0, VP_SD_FileName1, VP_SD_FileName2, VP_SD_FileName3, VP_SD_FileName4,
0x0000
};
const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
VP_PrintProgress_Percentage, VP_PrintTime,
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
#if HAS_FAN
VP_Fan0_Percentage,
#if FAN_COUNT > 1
VP_Fan1_Percentage,
#endif
#endif
VP_Flowrate_E0,
0x0000
};
const uint16_t VPList_SDPrintTune[] PROGMEM = {
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set, VP_Flowrate_E0,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set, VP_Flowrate_E1,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
VP_Feedrate_Percentage,
VP_SD_Print_ProbeOffsetZ,
0x0000
};
const uint16_t VPList_StepPerMM[] PROGMEM = {
VP_X_STEP_PER_MM,
VP_Y_STEP_PER_MM,
VP_Z_STEP_PER_MM,
#if HOTENDS >= 1
VP_E0_STEP_PER_MM,
#endif
#if HOTENDS >= 2
VP_E1_STEP_PER_MM,
#endif
0x0000
};
const uint16_t VPList_PIDE0[] PROGMEM = {
#if ENABLED(PIDTEMP)
VP_E0_PID_P,
VP_E0_PID_I,
VP_E0_PID_D,
#endif
0x0000
};
const uint16_t VPList_PIDBED[] PROGMEM = {
#if ENABLED(PIDTEMP)
VP_BED_PID_P,
VP_BED_PID_I,
VP_BED_PID_D,
#endif
0x0000
};
const uint16_t VPList_Infos[] PROGMEM = {
VP_MARLIN_VERSION,
VP_PrintTime,
#if ENABLED(PRINTCOUNTER)
VP_PrintAccTime,
VP_PrintsTotal,
#endif
0x0000
};
const uint16_t VPList_PIDTuningWaiting[] PROGMEM = {
VP_WAITING_STATUS,
0x0000
};
const uint16_t VPList_FLCPreheat[] PROGMEM = {
#if HOTENDS >= 1
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_FLCPrinting[] PROGMEM = {
#if HOTENDS >= 1
VP_SD_Print_ProbeOffsetZ,
#endif
0x0000
};
const uint16_t VPList_Z_Offset[] PROGMEM = {
#if HOTENDS >= 1
VP_SD_Print_ProbeOffsetZ,
#endif
0x0000
};
const struct VPMapping VPMap[] PROGMEM = {
{ DGUSLCD_SCREEN_BOOT, VPList_Boot },
{ DGUSLCD_SCREEN_MAIN, VPList_Main },
{ DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp },
{ DGUSLCD_SCREEN_STATUS, VPList_Status },
{ DGUSLCD_SCREEN_STATUS2, VPList_Status2 },
{ DGUSLCD_SCREEN_PREHEAT, VPList_Preheat },
{ DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove },
{ DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude },
{ DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating },
{ DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload },
{ DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload },
{ DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation },
{ DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList },
{ DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune },
{ DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting },
{ DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat },
{ DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting },
{ DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset },
{ DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM },
{ DGUSLCD_SCREEN_PID_E, VPList_PIDE0 },
{ DGUSLCD_SCREEN_PID_BED, VPList_PIDBED },
{ DGUSLCD_SCREEN_INFOS, VPList_Infos },
{ 0 , nullptr } // List is terminated with an nullptr as table entry.
};
const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION;
// Helper to define a DGUS_VP_Variable for common use cases.
#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=sizeof(VPADRVAR), \
.set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string)
#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=STRLEN, \
.set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR }
const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
// Helper to detect touch events
VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr),
VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr),
#if ENABLED(SDSUPPORT)
VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr),
#endif
VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr),
VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr),
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
VPHELPER(VP_MOVE_OPTION, &distanceToMove, &ScreenHandler.HandleManualMoveOption, nullptr),
#endif
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
VPHELPER(VP_MOVE_X, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Y, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Z, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_HOME_ALL, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr),
#else
VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr),
#endif
VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleMotorLockUnlock, nullptr),
#if ENABLED(POWER_LOSS_RECOVERY)
VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr),
#endif
VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr),
#if ENABLED(SINGLE_Z_CALIBRATION)
VPHELPER(VP_Z_CALIBRATE, nullptr, &ScreenHandler.HandleZCalibration, nullptr),
#endif
#if ENABLED(FIRST_LAYER_CAL)
VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, &ScreenHandler.HandleFirstLayerCal, nullptr),
#endif
{ .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
// M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
{ .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplay },
// Temperature Data
#if HOTENDS >= 1
VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(DGUS_PREHEAT_UI)
VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr),
#endif
#if ENABLED(PIDTEMP)
VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
#endif
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload),
#endif
#endif
#if HOTENDS >= 2
VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr),
VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(PIDTEMP)
VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
#endif
VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload),
#endif
#if HAS_HEATED_BED
VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(PIDTEMPBED)
VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr),
#endif
#endif
// Fan Data
#if HAS_FAN
#define FAN_VPHELPER(N) \
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, &ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr), \
VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
REPEAT(FAN_COUNT, FAN_VPHELPER)
#endif
// Feedrate
VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, &ScreenHandler.DGUSLCD_SendWordValueToDisplay ),
// Position Data
VPHELPER(VP_XPos, ¤t_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_YPos, ¤t_position.y, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_ZPos, ¤t_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
// Print Progress
VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay ),
// Print Time
VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay),
#if ENABLED(PRINTCOUNTER)
VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay),
VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay),
#endif
VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#if HOTENDS >= 1
VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#endif
#if HOTENDS >= 2
VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#endif
// SDCard File listing.
#if ENABLED(SDSUPPORT)
VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr),
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr),
VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr),
VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr),
VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr),
#if HAS_BED_PROBE
VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
#if ENABLED(BABYSTEPPING)
VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr),
#endif
#endif
#endif
#if ENABLED(DGUS_UI_WAITING)
VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay),
#endif
// Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
{ .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
VPHELPER(0, 0, 0, 0) // must be last entry.
};
#endif // DGUS_LCD_UI_FYSETC
|