瀏覽代碼

🐛 Fix ExtUI/DGUS Celsius display (#22121)

Sola 3 年之前
父節點
當前提交
b87e2ceda1
No account linked to committer's email address

+ 2
- 2
Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp 查看文件

@@ -356,7 +356,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
356 356
 
357 357
   // Temperature Data
358 358
   #if HAS_HOTEND
359
-    VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
359
+    VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
360 360
     VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
361 361
     VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
362 362
     VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -377,7 +377,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
377 377
     #endif
378 378
   #endif
379 379
   #if HOTENDS >= 2
380
-    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
380
+    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
381 381
     VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
382 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 383
     VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),

+ 2
- 2
Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp 查看文件

@@ -362,7 +362,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
362 362
 
363 363
   // Temperature Data
364 364
   #if HAS_HOTEND
365
-    VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
365
+    VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
366 366
     VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
367 367
     VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
368 368
     VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -383,7 +383,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
383 383
     #endif
384 384
   #endif
385 385
   #if HOTENDS >= 2
386
-    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
386
+    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
387 387
     VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
388 388
     VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
389 389
     VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),

+ 6
- 3
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp 查看文件

@@ -543,7 +543,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
543 543
 
544 544
   // Temperature Data
545 545
   #if HAS_HOTEND
546
-    VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
546
+    VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
547 547
     VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
548 548
     VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
549 549
     VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
@@ -568,7 +568,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
568 568
   #endif
569 569
 
570 570
   #if HOTENDS >= 2
571
-    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
571
+    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
572 572
     VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
573 573
     VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
574 574
     VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
@@ -588,7 +588,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
588 588
   #endif
589 589
 
590 590
   #if HAS_HEATED_BED
591
-    VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
591
+    VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
592 592
     VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
593 593
     VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr),
594 594
     VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
@@ -635,6 +635,9 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
635 635
   // LCD Control
636 636
   VPHELPER(VP_LCD_BLK, &lcd_default_light, ScreenHandler.LCD_BLK_Adjust, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
637 637
 
638
+  // SD File - Back
639
+  VPHELPER(VP_SD_FileSelect_Back, nullptr, ScreenHandler.SD_FileBack, nullptr),
640
+
638 641
   // Print Time
639 642
   VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay_MKS),
640 643
 

+ 1
- 180
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h 查看文件

@@ -241,191 +241,11 @@ enum DGUSLCD_Screens : uint8_t {
241 241
   DGUSLDC_SCREEN_UNUSED                 = 255
242 242
 };
243 243
 
244
-// Display Memory layout used (T5UID)
245
-// Except system variables this is arbitrary, just to organize stuff....
246
-
247
-// 0x0000 .. 0x0FFF  -- System variables and reserved by the display
248
-// 0x1000 .. 0x1FFF  -- Variables to never change location, regardless of UI Version
249
-// 0x2000 .. 0x2FFF  -- Controls (VPs that will trigger some action)
250
-// 0x3000 .. 0x4FFF  -- Marlin Data to be displayed
251
-// 0x5000 ..         -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
252
-
253
-// As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
254
-// so that we can keep variables nicely together in the address space.
255
-
256
-// UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
257
-
258
-// constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000;  // Major -- incremented when incompatible
259
-// constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001;  // Minor -- incremented on new features, but compatible
260
-// constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002;  // Patch -- fixed which do not change functionality.
261
-// constexpr uint16_t VP_UI_FLAVOUR       = 0x1010;  // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
262
-
263
-// Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
264
-// constexpr uint16_t VP_MSGSTR1 = 0x1100;
265
-// constexpr uint8_t VP_MSGSTR1_LEN = 0x20;  // might be more place for it...
266
-// constexpr uint16_t VP_MSGSTR2 = 0x1140;
267
-// constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
268
-// constexpr uint16_t VP_MSGSTR3 = 0x1180;
269
-// constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
270
-// constexpr uint16_t VP_MSGSTR4 = 0x11C0;
271
-// constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
272
-
273
-// Screenchange request for screens that only make sense when printer is idle.
274
-// e.g movement is only allowed if printer is not printing.
275
-// Marlin must confirm by setting the screen manually.
276
-// constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
277
-// constexpr uint16_t VP_SCREENCHANGE = 0x2001;   // Key-Return button to new menu pressed. Data contains target screen in low byte and info in high byte.
278
-// constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002;   // Turn all heaters off. Value arbitrary ;)=
279
-// constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
280
-// constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
281
-
282
-// // Buttons on the SD-Card File listing.
283
-// constexpr uint16_t VP_SD_ScrollEvent = 0x2020; // Data: 0 for "up a directory", numbers are the amount to scroll, e.g -1 one up, 1 one down
284
-// constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
285
-// constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
286
-
287
-// constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
288
-// constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
289
-// constexpr uint16_t VP_SD_Print_Setting = 0x2040;
290
-// constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x2050; // Data: 0 down, 1 up
291
-
292
-// Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
293
-// (which would limit us to 655.35mm, which is likely not a problem for common setups, but i don't want to rule out hangprinters support)
294
-// A word about the coding: The VP will be per axis and the return code will be an signed 16 bit value in 0.01 mm resolution, telling us
295
-// the relative travel amount t he user wants to do. So eg. if the display sends us VP=2100 with value 100, the user wants us to move X by +1 mm.
296
-// constexpr uint16_t VP_MOVE_X = 0x2100;
297
-// constexpr uint16_t VP_MOVE_Y = 0x2102;
298
-// constexpr uint16_t VP_MOVE_Z = 0x2104;
299
-// constexpr uint16_t VP_MOVE_E0 = 0x2110;
300
-// constexpr uint16_t VP_MOVE_E1 = 0x2112;
301
-// //constexpr uint16_t VP_MOVE_E2 = 0x2114;
302
-// //constexpr uint16_t VP_MOVE_E3 = 0x2116;
303
-// //constexpr uint16_t VP_MOVE_E4 = 0x2118;
304
-// //constexpr uint16_t VP_MOVE_E5 = 0x211A;
305
-// constexpr uint16_t VP_HOME_ALL = 0x2120;
306
-// constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2130;
307
-// constexpr uint16_t VP_XYZ_HOME = 0x2132;
308
-
309
-// Power loss recovery
310
-// constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x2180;
311
-
312
-// // Fan Control Buttons , switch between "off" and "on"
313
-// constexpr uint16_t VP_FAN0_CONTROL = 0x2200;
314
-// constexpr uint16_t VP_FAN1_CONTROL = 0x2202;
315
-// constexpr uint16_t VP_FAN2_CONTROL = 0x2204;
316
-// constexpr uint16_t VP_FAN3_CONTROL = 0x2206;
317
-
318
-// // Heater Control Buttons , triged between "cool down" and "heat PLA" state
319
-// constexpr uint16_t VP_E0_CONTROL = 0x2210;
320
-// constexpr uint16_t VP_E1_CONTROL = 0x2212;
321
-// //constexpr uint16_t VP_E2_CONTROL = 0x2214;
322
-// //constexpr uint16_t VP_E3_CONTROL = 0x2216;
323
-// //constexpr uint16_t VP_E4_CONTROL = 0x2218;
324
-// //constexpr uint16_t VP_E5_CONTROL = 0x221A;
325
-// constexpr uint16_t VP_BED_CONTROL = 0x221C;
326
-
327
-// // Preheat
328
-// constexpr uint16_t VP_E0_BED_PREHEAT = 0x2220;
329
-// constexpr uint16_t VP_E1_BED_PREHEAT = 0x2222;
330
-// //constexpr uint16_t VP_E2_BED_PREHEAT = 0x2224;
331
-// //constexpr uint16_t VP_E3_BED_PREHEAT = 0x2226;
332
-// //constexpr uint16_t VP_E4_BED_PREHEAT = 0x2228;
333
-// //constexpr uint16_t VP_E5_BED_PREHEAT = 0x222A;
334
-
335
-// // Filament load and unload
336
-// // constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2300;
337
-// // constexpr uint16_t VP_E1_FILAMENT_LOAD_UNLOAD = 0x2302;
338
-
339
-// // Settings store , reset
340
-
341
-// // PID autotune
342
-// constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x2410;
343
-// constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x2412;
344
-// //constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x2414;
345
-// //constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x2416;
346
-// //constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x2418;
347
-// //constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x241A;
348
-// constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x2420;
349
-// // Calibrate Z
350
-// constexpr uint16_t VP_Z_CALIBRATE = 0x2430;
351
-
352
-// First layer cal
353
-// constexpr uint16_t VP_Z_FIRST_LAYER_CAL = 0x2500; // Data: 0 - Cancel first layer cal progress, >0 filament type have loaded
354
-
355
-// Firmware version on the boot screen.
356
-// constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
357
-// constexpr uint8_t VP_MARLIN_VERSION_LEN = 16;   // there is more space on the display, if needed.
358 244
 
359 245
 // Place for status messages.
360 246
 constexpr uint16_t VP_M117 = 0x7020;
361 247
 constexpr uint8_t VP_M117_LEN = 0x20;
362 248
 
363
-// // Temperatures.
364
-// constexpr uint16_t VP_T_E0_Is = 0x3060;  // 4 Byte Integer
365
-// constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
366
-// constexpr uint16_t VP_T_E1_Is = 0x3064;  // 4 Byte Integer
367
-// // reserved to support up to 6 Extruders:
368
-// constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
369
-// constexpr uint16_t VP_T_E2_Is = 0x3068;  // 4 Byte Integer
370
-// constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
371
-// constexpr uint16_t VP_T_E3_Is = 0x306C;  // 4 Byte Integer
372
-// constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
373
-// constexpr uint16_t VP_T_E4_Is = 0x3070;  // 4 Byte Integer
374
-// constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
375
-// constexpr uint16_t VP_T_E5_Is = 0x3074;  // 4 Byte Integer
376
-// constexpr uint16_t VP_T_E5_Set = 0x3076; // 2 Byte Integer
377
-// constexpr uint16_t VP_T_E6_Is = 0x3078;  // 4 Byte Integer
378
-// constexpr uint16_t VP_T_E6_Set = 0x307A; // 2 Byte Integer
379
-// constexpr uint16_t VP_T_E7_Is = 0x3078;  // 4 Byte Integer
380
-// constexpr uint16_t VP_T_E7_Set = 0x307A; // 2 Byte Integer
381
-
382
-
383
-// constexpr uint16_t VP_T_Bed_Is = 0x3080;  // 4 Byte Integer
384
-// constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
385
-
386
-// constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
387
-// constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
388
-// // reserved for up to 6 Extruders:
389
-// constexpr uint16_t VP_Flowrate_E2 = 0x3094;
390
-// constexpr uint16_t VP_Flowrate_E3 = 0x3096;
391
-// constexpr uint16_t VP_Flowrate_E4 = 0x3098;
392
-// constexpr uint16_t VP_Flowrate_E5 = 0x309A;
393
-
394
-// constexpr uint16_t VP_Fan0_Percentage = 0x3100;  // 2 Byte Integer (0..100)
395
-// constexpr uint16_t VP_Fan1_Percentage = 0x3102;  // 2 Byte Integer (0..100)
396
-// constexpr uint16_t VP_Fan2_Percentage = 0x3104;  // 2 Byte Integer (0..100)
397
-// constexpr uint16_t VP_Fan3_Percentage = 0x3106;  // 2 Byte Integer (0..100)
398
-// constexpr uint16_t VP_Feedrate_Percentage = 0x3108; // 2 Byte Integer (0..100)
399
-
400
-// Actual Position
401
-// constexpr uint16_t VP_XPos = 0x3110;  // 4 Byte Fixed point number; format xxx.yy
402
-// constexpr uint16_t VP_YPos = 0x3112;  // 4 Byte Fixed point number; format xxx.yy
403
-// constexpr uint16_t VP_ZPos = 0x3114;  // 4 Byte Fixed point number; format xxx.yy
404
-// constexpr uint16_t VP_EPos = 0x3120;  // 4 Byte Fixed point number; format xxx.yy
405
-
406
-// constexpr uint16_t VP_PrintProgress_Percentage = 0x3130; // 2 Byte Integer (0..100)
407
-
408
-// constexpr uint16_t VP_PrintTime = 0x3140;
409
-// constexpr uint16_t VP_PrintTime_LEN = 32;
410
-
411
-// constexpr uint16_t VP_PrintAccTime = 0x3160;
412
-// constexpr uint16_t VP_PrintAccTime_LEN = 32;
413
-
414
-// constexpr uint16_t VP_PrintsTotal = 0x3180;
415
-// constexpr uint16_t VP_PrintsTotal_LEN = 16;
416
-
417
-// // SDCard File Listing
418
-// constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
419
-// constexpr uint16_t DGUS_SD_FILESPERSCREEN = 8; // FIXME move that info to the display and read it from there.
420
-// constexpr uint16_t VP_SD_FileName0 = 0x3200;
421
-// constexpr uint16_t VP_SD_FileName1 = 0x3220;
422
-// constexpr uint16_t VP_SD_FileName2 = 0x3240;
423
-// constexpr uint16_t VP_SD_FileName3 = 0x3260;
424
-// constexpr uint16_t VP_SD_FileName4 = 0x3280;
425
-// constexpr uint16_t VP_SD_FileName5 = 0x32A0;
426
-// constexpr uint16_t VP_SD_FileName6 = 0x32C0;
427
-// constexpr uint16_t VP_SD_FileName7 = 0x32E0;
428
-
429 249
 // Heater status
430 250
 constexpr uint16_t VP_E0_STATUS = 0x3410;
431 251
 constexpr uint16_t VP_E1_STATUS = 0x3412;
@@ -635,6 +455,7 @@ constexpr uint16_t SP_T_Bed_Set   = 0x5040;
635 455
   constexpr uint16_t VP_SD_Print_LiveAdjustZ_Confirm  = 0x3060;
636 456
   constexpr uint16_t VP_ZOffset_Distance              = 0x3070;
637 457
   constexpr uint16_t VP_ZOffset_DE_DIS                = 0x3080;
458
+  constexpr uint16_t VP_SD_FileSelect_Back            = 0x3082;
638 459
   // SDCard File Listing
639 460
   constexpr uint16_t VP_SD_FileName_LEN = 32;                   // LEN is shared for all entries.
640 461
   constexpr uint16_t DGUS_SD_FILESPERSCREEN = 10;               // FIXME move that info to the display and read it from there.

+ 4
- 0
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp 查看文件

@@ -588,6 +588,10 @@ void DGUSScreenHandler::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) {
588 588
   #endif // MESH_BED_LEVELING
589 589
 }
590 590
 
591
+void DGUSScreenHandler::SD_FileBack(DGUS_VP_Variable&, void*) {
592
+  GotoScreen(MKSLCD_SCREEN_HOME);
593
+}
594
+
591 595
 void DGUSScreenHandler::LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr) {
592 596
   const uint16_t lcd_value = swap16(*(uint16_t *)val_ptr);
593 597
 

+ 1
- 0
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h 查看文件

@@ -93,6 +93,7 @@ public:
93 93
   static void DGUS_RunoutInit(void);
94 94
   static void DGUS_ExtrudeLoadInit(void);
95 95
   static void LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr);
96
+  static void SD_FileBack(DGUS_VP_Variable &var, void *val_ptr);
96 97
 
97 98
   // Hook for manual move.
98 99
   static void HandleManualMove(DGUS_VP_Variable &var, void *val_ptr);

+ 1
- 1
Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp 查看文件

@@ -183,7 +183,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
183 183
     #endif
184 184
   #endif
185 185
   #if HOTENDS >= 2
186
-    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
186
+    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
187 187
     VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
188 188
     VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
189 189
     VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),

Loading…
取消
儲存