Browse Source

Update and fix DGUS (#16317)

George Fu 4 years ago
parent
commit
e593da1c23
100 changed files with 4389 additions and 588 deletions
  1. 4
    2
      Marlin/Configuration.h
  2. 38
    0
      Marlin/Configuration_adv.h
  3. 13
    0
      Marlin/src/HAL/HAL_AVR/HAL.h
  4. 27
    0
      Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
  5. 20
    0
      Marlin/src/HAL/HAL_AVR/MarlinSerial.h
  6. 21
    0
      Marlin/src/HAL/HAL_DUE/HAL.h
  7. 20
    0
      Marlin/src/HAL/HAL_LPC1768/HAL.h
  8. 20
    0
      Marlin/src/HAL/HAL_SAMD51/HAL.h
  9. 28
    0
      Marlin/src/HAL/HAL_STM32/HAL.h
  10. 25
    0
      Marlin/src/HAL/HAL_STM32F1/HAL.h
  11. 26
    0
      Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h
  12. 7
    0
      Marlin/src/HAL/shared/MarlinSerial.h
  13. 5
    0
      Marlin/src/gcode/feature/powerloss/M1000.cpp
  14. 7
    0
      Marlin/src/gcode/temperature/M303.cpp
  15. 1
    0
      Marlin/src/inc/Conditionals_LCD.h
  16. 5
    1
      Marlin/src/inc/SanityCheck.h
  17. 588
    334
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplay.cpp
  18. 75
    0
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplay.h
  19. 8
    150
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinition.h
  20. 476
    0
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionFYSETC.cpp
  21. 290
    0
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionFYSETC.h
  22. 476
    0
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionHIPRECY.cpp
  23. 289
    0
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionHIPRECY.h
  24. 101
    24
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionOrigin.cpp
  25. 280
    0
      Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionOrigin.h
  26. 7
    0
      Marlin/src/lcd/extensible_ui/ui_api.h
  27. 66
    5
      Marlin/src/lcd/extui_dgus_lcd.cpp
  28. 12
    0
      Marlin/src/lcd/extui_example.cpp
  29. 18
    0
      Marlin/src/module/temperature.cpp
  30. 4
    2
      config/default/Configuration.h
  31. 38
    0
      config/default/Configuration_adv.h
  32. 4
    2
      config/examples/3DFabXYZ/Migbot/Configuration.h
  33. 38
    0
      config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  34. 4
    2
      config/examples/ADIMLab/Gantry v1/Configuration.h
  35. 38
    0
      config/examples/ADIMLab/Gantry v1/Configuration_adv.h
  36. 4
    2
      config/examples/ADIMLab/Gantry v2/Configuration.h
  37. 38
    0
      config/examples/ADIMLab/Gantry v2/Configuration_adv.h
  38. 4
    2
      config/examples/AlephObjects/TAZ4/Configuration.h
  39. 38
    0
      config/examples/AlephObjects/TAZ4/Configuration_adv.h
  40. 4
    2
      config/examples/Alfawise/U20-bltouch/Configuration.h
  41. 38
    0
      config/examples/Alfawise/U20-bltouch/Configuration_adv.h
  42. 4
    2
      config/examples/Alfawise/U20/Configuration.h
  43. 38
    0
      config/examples/Alfawise/U20/Configuration_adv.h
  44. 4
    2
      config/examples/AliExpress/CL-260/Configuration.h
  45. 4
    2
      config/examples/AliExpress/UM2pExt/Configuration.h
  46. 38
    0
      config/examples/AliExpress/UM2pExt/Configuration_adv.h
  47. 4
    2
      config/examples/Anet/A2/Configuration.h
  48. 38
    0
      config/examples/Anet/A2/Configuration_adv.h
  49. 4
    2
      config/examples/Anet/A2plus/Configuration.h
  50. 38
    0
      config/examples/Anet/A2plus/Configuration_adv.h
  51. 4
    2
      config/examples/Anet/A6/Configuration.h
  52. 38
    0
      config/examples/Anet/A6/Configuration_adv.h
  53. 4
    2
      config/examples/Anet/A8/Configuration.h
  54. 38
    0
      config/examples/Anet/A8/Configuration_adv.h
  55. 4
    2
      config/examples/Anet/A8plus/Configuration.h
  56. 38
    0
      config/examples/Anet/A8plus/Configuration_adv.h
  57. 4
    2
      config/examples/Anet/E10/Configuration.h
  58. 38
    0
      config/examples/Anet/E10/Configuration_adv.h
  59. 4
    2
      config/examples/Anet/E16/Configuration.h
  60. 38
    0
      config/examples/Anet/E16/Configuration_adv.h
  61. 4
    2
      config/examples/AnyCubic/i3/Configuration.h
  62. 38
    0
      config/examples/AnyCubic/i3/Configuration_adv.h
  63. 4
    2
      config/examples/ArmEd/Configuration.h
  64. 38
    0
      config/examples/ArmEd/Configuration_adv.h
  65. 4
    2
      config/examples/Artillery/Genius/Configuration.h
  66. 38
    0
      config/examples/Artillery/Genius/Configuration_adv.h
  67. 4
    2
      config/examples/Artillery/Sidewinder X1/Configuration.h
  68. 38
    0
      config/examples/Artillery/Sidewinder X1/Configuration_adv.h
  69. 4
    2
      config/examples/Azteeg/X5GT/Configuration.h
  70. 4
    2
      config/examples/BIBO/TouchX/cyclops/Configuration.h
  71. 38
    0
      config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  72. 4
    2
      config/examples/BIBO/TouchX/default/Configuration.h
  73. 38
    0
      config/examples/BIBO/TouchX/default/Configuration_adv.h
  74. 4
    2
      config/examples/BQ/Hephestos/Configuration.h
  75. 38
    0
      config/examples/BQ/Hephestos/Configuration_adv.h
  76. 4
    2
      config/examples/BQ/Hephestos_2/Configuration.h
  77. 38
    0
      config/examples/BQ/Hephestos_2/Configuration_adv.h
  78. 4
    2
      config/examples/BQ/WITBOX/Configuration.h
  79. 38
    0
      config/examples/BQ/WITBOX/Configuration_adv.h
  80. 4
    2
      config/examples/BigTreeTech/SKR Mini E3 1.0/Configuration.h
  81. 38
    0
      config/examples/BigTreeTech/SKR Mini E3 1.0/Configuration_adv.h
  82. 4
    2
      config/examples/BigTreeTech/SKR Mini E3 1.2/Configuration.h
  83. 38
    0
      config/examples/BigTreeTech/SKR Mini E3 1.2/Configuration_adv.h
  84. 4
    2
      config/examples/Cartesio/Configuration.h
  85. 38
    0
      config/examples/Cartesio/Configuration_adv.h
  86. 4
    2
      config/examples/Creality/CR-10/Configuration.h
  87. 38
    0
      config/examples/Creality/CR-10/Configuration_adv.h
  88. 4
    2
      config/examples/Creality/CR-10S/Configuration.h
  89. 38
    0
      config/examples/Creality/CR-10S/Configuration_adv.h
  90. 4
    2
      config/examples/Creality/CR-10_5S/Configuration.h
  91. 38
    0
      config/examples/Creality/CR-10_5S/Configuration_adv.h
  92. 4
    2
      config/examples/Creality/CR-10mini/Configuration.h
  93. 38
    0
      config/examples/Creality/CR-10mini/Configuration_adv.h
  94. 4
    2
      config/examples/Creality/CR-20 Pro/Configuration.h
  95. 38
    0
      config/examples/Creality/CR-20 Pro/Configuration_adv.h
  96. 4
    2
      config/examples/Creality/CR-20/Configuration.h
  97. 38
    0
      config/examples/Creality/CR-20/Configuration_adv.h
  98. 4
    2
      config/examples/Creality/CR-8/Configuration.h
  99. 38
    0
      config/examples/Creality/CR-8/Configuration_adv.h
  100. 0
    0
      config/examples/Creality/Ender-2/Configuration.h

+ 4
- 2
Marlin/Configuration.h View File

@@ -2030,9 +2030,11 @@
2030 2030
 //=============================================================================
2031 2031
 
2032 2032
 //
2033
-// DGUS Touch Display with DWIN OS
2033
+// DGUS Touch Display with DWIN OS. (Choose one.)
2034 2034
 //
2035
-//#define DGUS_LCD
2035
+//#define DGUS_LCD_UI_ORIGIN
2036
+//#define DGUS_LCD_UI_FYSETC
2037
+//#define DGUS_LCD_UI_HIPRECY
2036 2038
 
2037 2039
 //
2038 2040
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
Marlin/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 13
- 0
Marlin/src/HAL/HAL_AVR/HAL.h View File

@@ -109,6 +109,19 @@ typedef int8_t pin_t;
109 109
   #endif
110 110
 #endif
111 111
 
112
+#ifdef DGUS_SERIAL_PORT
113
+  #if !WITHIN(DGUS_SERIAL_PORT, -1, 3)
114
+    #error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
115
+  #elif DGUS_SERIAL_PORT == SERIAL_PORT
116
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
117
+  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
118
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
119
+  #endif
120
+  #define DGUS_SERIAL internalDgusSerial
121
+
122
+  #define DGUS_SERIAL_GET_TX_BUFFER_FREE DGUS_SERIAL.get_tx_buffer_free
123
+#endif
124
+
112 125
 // ------------------------
113 126
 // Public functions
114 127
 // ------------------------

+ 27
- 0
Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp View File

@@ -757,6 +757,33 @@
757 757
 
758 758
 #endif
759 759
 
760
+#ifdef DGUS_SERIAL_PORT
761
+
762
+  template<typename Cfg>
763
+  typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
764
+    const ring_buffer_pos_t t = tx_buffer.tail,  // next byte to send.
765
+                            h = tx_buffer.head;  // next pos for queue.
766
+    int ret = t - h - 1;
767
+    if (ret < 0) ret += Cfg::TX_SIZE + 1;
768
+    return ret;
769
+  }
770
+
771
+  ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_RX_vect)) {
772
+    MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::store_rxd_char();
773
+  }
774
+
775
+  ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_UDRE_vect)) {
776
+    MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::_tx_udr_empty_irq();
777
+  }
778
+
779
+  // Preinstantiate
780
+  template class MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>;
781
+
782
+  // Instantiate
783
+  MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
784
+
785
+#endif
786
+
760 787
 // For AT90USB targets use the UART for BT interfacing
761 788
 #if defined(USBCON) && ENABLED(BLUETOOTH)
762 789
   HardwareSerial bluetoothSerial;

+ 20
- 0
Marlin/src/HAL/HAL_AVR/MarlinSerial.h View File

@@ -217,6 +217,9 @@
217 217
       static ring_buffer_pos_t available();
218 218
       static void write(const uint8_t c);
219 219
       static void flushTX();
220
+      #ifdef DGUS_SERIAL_PORT
221
+        static ring_buffer_pos_t get_tx_buffer_free();
222
+      #endif
220 223
 
221 224
       FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
222 225
       FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
@@ -292,6 +295,23 @@
292 295
   extern MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>> internalSerial;
293 296
 #endif
294 297
 
298
+#ifdef DGUS_SERIAL_PORT
299
+  template <uint8_t serial>
300
+  struct MarlinInternalSerialCfg {
301
+    static constexpr int PORT               = serial;
302
+    static constexpr unsigned int RX_SIZE   = 128;
303
+    static constexpr unsigned int TX_SIZE   = 48;
304
+    static constexpr bool XONOFF            = false;
305
+    static constexpr bool EMERGENCYPARSER   = false;
306
+    static constexpr bool DROPPED_RX        = false;
307
+    static constexpr bool RX_OVERRUNS       = bDGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS;
308
+    static constexpr bool RX_FRAMING_ERRORS = false;
309
+    static constexpr bool MAX_RX_QUEUED     = false;
310
+  };
311
+
312
+  extern MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
313
+#endif
314
+
295 315
 // Use the UART for Bluetooth in AT90USB configurations
296 316
 #if defined(USBCON) && ENABLED(BLUETOOTH)
297 317
   extern HardwareSerial bluetoothSerial;

+ 21
- 0
Marlin/src/HAL/HAL_DUE/HAL.h View File

@@ -74,6 +74,27 @@
74 74
   #define NUM_SERIAL 1
75 75
 #endif
76 76
 
77
+#ifdef DGUS_SERIAL_PORT
78
+  #if DGUS_SERIAL_PORT == SERIAL_PORT
79
+    #error "DGUS_SERIAL_PORT must be different from SERIAL_PORT. Please update your configuration."
80
+  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
81
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
82
+  #elif DGUS_SERIAL_PORT == -1
83
+    #define DGUS_SERIAL internalDgusSerial
84
+  #elif DGUS_SERIAL_PORT == 0
85
+    #define DGUS_SERIAL Serial
86
+  #elif DGUS_SERIAL_PORT == 1
87
+    #define DGUS_SERIAL Serial1
88
+  #elif DGUS_SERIAL_PORT == 2
89
+    #define DGUS_SERIAL Serial2
90
+  #elif DGUS_SERIAL_PORT == 3
91
+    #define DGUS_SERIAL Serial3
92
+  #else
93
+    #error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
94
+  #endif
95
+#endif
96
+
97
+
77 98
 #include "MarlinSerial.h"
78 99
 #include "MarlinSerialUSB.h"
79 100
 

+ 20
- 0
Marlin/src/HAL/HAL_LPC1768/HAL.h View File

@@ -96,6 +96,26 @@ extern "C" volatile uint32_t _millis;
96 96
   #define NUM_SERIAL 1
97 97
 #endif
98 98
 
99
+#ifdef DGUS_SERIAL_PORT
100
+  #if DGUS_SERIAL_PORT == SERIAL_PORT
101
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
102
+  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
103
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
104
+  #elif DGUS_SERIAL_PORT == -1
105
+    #define DGUS_SERIAL UsbSerial
106
+  #elif DGUS_SERIAL_PORT == 0
107
+    #define DGUS_SERIAL MSerial
108
+  #elif DGUS_SERIAL_PORT == 1
109
+    #define DGUS_SERIAL MSerial1
110
+  #elif DGUS_SERIAL_PORT == 2
111
+    #define DGUS_SERIAL MSerial2
112
+  #elif DGUS_SERIAL_PORT == 3
113
+    #define DGUS_SERIAL MSerial3
114
+  #else
115
+    #error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
116
+  #endif
117
+#endif
118
+
99 119
 //
100 120
 // Interrupts
101 121
 //

+ 20
- 0
Marlin/src/HAL/HAL_SAMD51/HAL.h View File

@@ -71,6 +71,26 @@
71 71
     #define NUM_SERIAL 1
72 72
   #endif
73 73
 
74
+  #ifdef DGUS_SERIAL_PORT
75
+    #if DGUS_SERIAL_PORT == SERIAL_PORT
76
+      #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
77
+    #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
78
+      #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
79
+    #elif DGUS_SERIAL_PORT == -1
80
+      #define DGUS_SERIAL Serial
81
+    #elif DGUS_SERIAL_PORT == 0
82
+      #define DGUS_SERIAL Serial1
83
+    #elif DGUS_SERIAL_PORT == 1
84
+      #define DGUS_SERIAL Serial2
85
+    #elif DGUS_SERIAL_PORT == 2
86
+      #define DGUS_SERIAL Serial3
87
+    #elif DGUS_SERIAL_PORT == 2
88
+      #define DGUS_SERIAL Serial4
89
+    #else
90
+      #error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
91
+    #endif
92
+  #endif
93
+
74 94
 #endif // ADAFRUIT_GRAND_CENTRAL_M4
75 95
 
76 96
 typedef int8_t pin_t;

+ 28
- 0
Marlin/src/HAL/HAL_STM32/HAL.h View File

@@ -90,6 +90,34 @@
90 90
   #define NUM_SERIAL 1
91 91
 #endif
92 92
 
93
+#if HAS_DGUS_LCD
94
+  #if DGUS_SERIAL_PORT == 0
95
+    #error "DGUS_SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
96
+  #elif DGUS_SERIAL_PORT == SERIAL_PORT
97
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
98
+  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
99
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
100
+  #elif DGUS_SERIAL_PORT == -1
101
+    #define DGUS_SERIAL SerialUSB
102
+  #elif DGUS_SERIAL_PORT == 1
103
+    #define DGUS_SERIAL Serial1
104
+  #elif DGUS_SERIAL_PORT == 2
105
+    #define DGUS_SERIAL Serial2
106
+  #elif DGUS_SERIAL_PORT == 3
107
+    #define DGUS_SERIAL Serial3
108
+  #elif DGUS_SERIAL_PORT == 4
109
+    #define DGUS_SERIAL Serial4
110
+  #elif DGUS_SERIAL_PORT == 5
111
+    #define DGUS_SERIAL Serial5
112
+  #elif DGUS_SERIAL_PORT == 6
113
+    #define DGUS_SERIAL Serial6
114
+  #else
115
+    #error "DGUS_SERIAL_PORT must be from -1 to 6. Please update your configuration."
116
+  #endif
117
+
118
+  #define DGUS_SERIAL_GET_TX_BUFFER_FREE DGUS_SERIAL.availableForWrite
119
+#endif
120
+
93 121
 #include "timers.h"
94 122
 
95 123
 /**

+ 25
- 0
Marlin/src/HAL/HAL_STM32F1/HAL.h View File

@@ -121,6 +121,31 @@
121 121
   #define NUM_SERIAL 1
122 122
 #endif
123 123
 
124
+#ifdef DGUS_SERIAL
125
+  #if DGUS_SERIAL_PORT == 0
126
+    #error "DGUS_SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
127
+  #elif DGUS_SERIAL_PORT == SERIAL_PORT
128
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
129
+  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
130
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
131
+  #elif DGUS_SERIAL_PORT == -1
132
+    #define DGUS_SERIAL UsbSerial
133
+  #elif DGUS_SERIAL_PORT == 1
134
+    #define DGUS_SERIAL MSerial1
135
+  #elif DGUS_SERIAL_PORT == 2
136
+    #define DGUS_SERIAL MSerial2
137
+  #elif DGUS_SERIAL_PORT == 3
138
+    #define DGUS_SERIAL MSerial3
139
+  #elif DGUS_SERIAL_PORT == 4
140
+    #define DGUS_SERIAL MSerial4
141
+  #elif DGUS_SERIAL_PORT == 5
142
+    #define DGUS_SERIAL MSerial5
143
+  #else
144
+    #error "DGUS_SERIAL_PORT must be from -1 to 5. Please update your configuration."
145
+  #endif
146
+#endif
147
+
148
+
124 149
 // Set interrupt grouping for this MCU
125 150
 void HAL_init();
126 151
 #define HAL_IDLETASK 1

+ 26
- 0
Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h View File

@@ -94,6 +94,32 @@
94 94
   #define NUM_SERIAL 1
95 95
 #endif
96 96
 
97
+#ifdef DGUS_SERIAL_PORT
98
+  #if defined(STM32F4) && DGUS_SERIAL_PORT == 0
99
+    #error "DGUS_SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
100
+  #elif DGUS_SERIAL_PORT == SERIAL_PORT
101
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
102
+  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
103
+    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
104
+  #elif DGUS_SERIAL_PORT == -1
105
+    #define DGUS_SERIAL SerialUSB
106
+  #elif DGUS_SERIAL_PORT == 1
107
+    #define DGUS_SERIAL SerialUART1
108
+  #elif DGUS_SERIAL_PORT == 2
109
+    #define DGUS_SERIAL SerialUART2
110
+  #elif DGUS_SERIAL_PORT == 3
111
+    #define DGUS_SERIAL SerialUART3
112
+  #elif DGUS_SERIAL_PORT == 4
113
+    #define DGUS_SERIAL SerialUART4
114
+  #elif DGUS_SERIAL_PORT == 5
115
+    #define DGUS_SERIAL SerialUART5
116
+  #elif DGUS_SERIAL_PORT == 6
117
+    #define DGUS_SERIAL SerialUART6
118
+  #else
119
+    #error "DGUS_SERIAL_PORT must be from -1 to 6. Please update your configuration."
120
+  #endif
121
+#endif
122
+
97 123
 /**
98 124
  * TODO: review this to return 1 for pins that are not analog input
99 125
  */

+ 7
- 0
Marlin/src/HAL/shared/MarlinSerial.h View File

@@ -28,6 +28,13 @@
28 28
 #include "../../inc/MarlinConfigPre.h"
29 29
 
30 30
 constexpr bool
31
+  #if HAS_DGUS_LCD
32
+    bDGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS = (false
33
+      #if ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS)
34
+        || true
35
+      #endif
36
+    ),
37
+  #endif
31 38
   bSERIAL_XON_XOFF = (false
32 39
     #if ENABLED(SERIAL_XON_XOFF)
33 40
       || true

+ 5
- 0
Marlin/src/gcode/feature/powerloss/M1000.cpp View File

@@ -28,6 +28,9 @@
28 28
 #include "../../../feature/power_loss_recovery.h"
29 29
 #include "../../../module/motion.h"
30 30
 #include "../../../lcd/ultralcd.h"
31
+#if ENABLED(EXTENSIBLE_UI)
32
+  #include "../../../lcd/extensible_ui/ui_api.h"
33
+#endif
31 34
 
32 35
 #define DEBUG_OUT ENABLED(DEBUG_POWER_LOSS_RECOVERY)
33 36
 #include "../../../core/debug_out.h"
@@ -55,6 +58,8 @@ void GcodeSuite::M1000() {
55 58
     if (parser.seen('S')) {
56 59
       #if HAS_LCD_MENU
57 60
         ui.goto_screen(menu_job_recovery);
61
+      #elif ENABLED(EXTENSIBLE_UI)        
62
+        ExtUI::OnPowerLossResume();
58 63
       #else
59 64
         SERIAL_ECHO_MSG("Resume requires LCD.");
60 65
       #endif

+ 7
- 0
Marlin/src/gcode/temperature/M303.cpp View File

@@ -27,6 +27,10 @@
27 27
 #include "../gcode.h"
28 28
 #include "../../module/temperature.h"
29 29
 
30
+#if ENABLED(EXTENSIBLE_UI)
31
+  #include "../../lcd/extensible_ui/ui_api.h"
32
+#endif
33
+
30 34
 /**
31 35
  * M303: PID relay autotune
32 36
  *
@@ -49,6 +53,9 @@ void GcodeSuite::M303() {
49 53
   const heater_ind_t e = (heater_ind_t)parser.intval('E');
50 54
   if (!WITHIN(e, SI, EI)) {
51 55
     SERIAL_ECHOLNPGM(MSG_PID_BAD_EXTRUDER_NUM);
56
+    #if ENABLED(EXTENSIBLE_UI)
57
+      ExtUI::OnPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
58
+    #endif
52 59
     return;
53 60
   }
54 61
 

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

@@ -359,6 +359,7 @@
359 359
 #define HAS_CHARACTER_LCD   (HAS_SPI_LCD && !HAS_GRAPHICAL_LCD)
360 360
 #define HAS_LCD_MENU        (ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS))
361 361
 #define HAS_ADC_BUTTONS      ENABLED(ADC_KEYPAD)
362
+#define HAS_DGUS_LCD         ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
362 363
 
363 364
 /**
364 365
  * Extruders have some combination of stepper motors and hotends

+ 5
- 1
Marlin/src/inc/SanityCheck.h View File

@@ -424,6 +424,8 @@
424 424
   #error "FILAMENT_UNLOAD_DELAY is now FILAMENT_UNLOAD_PURGE_DELAY. Please update Configuration_adv.h."
425 425
 #elif defined(HOME_USING_SPREADCYCLE)
426 426
   #error "HOME_USING_SPREADCYCLE is now obsolete. Please remove it from Configuration_adv.h."
427
+#elif defined(DGUS_LCD)
428
+  #error "DGUS_LCD is now DGUS_LCD_UI_(ORIGIN|FYSETC|HIPRECY). Please update your configuration."
427 429
 #endif
428 430
 
429 431
 /**
@@ -1910,7 +1912,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1910 1912
   + ENABLED(MKS_12864OLED_SSD1306) \
1911 1913
   + ENABLED(U8GLIB_SH1106_EINSTART) \
1912 1914
   + ENABLED(OVERLORD_OLED) \
1913
-  + ENABLED(DGUS_LCD) \
1915
+  + ENABLED(DGUS_LCD_UI_ORIGIN) \
1916
+  + ENABLED(DGUS_LCD_UI_FYSETC) \
1917
+  + ENABLED(DGUS_LCD_UI_HIPRECY) \
1914 1918
   + ENABLED(MALYAN_LCD) \
1915 1919
   + ENABLED(TOUCH_UI_FTDI_EVE) \
1916 1920
   + ENABLED(FSMC_GRAPHICAL_TFT)

+ 588
- 334
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplay.cpp
File diff suppressed because it is too large
View File


+ 75
- 0
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplay.h View File

@@ -116,10 +116,52 @@ public:
116 116
   static void HandleTemperatureChanged(DGUS_VP_Variable &var, void *val_ptr);
117 117
   // Hook for "Change Flowrate"
118 118
   static void HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_ptr);
119
+  #if ENABLED(DUGS_UI_MOVE_DIS_OPTION)
120
+    // Hook for manual move option
121
+    static void HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr);
122
+  #endif
119 123
   // Hook for manual move.
120 124
   static void HandleManualMove(DGUS_VP_Variable &var, void *val_ptr);
121 125
   // Hook for manual extrude.
122 126
   static void HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr);
127
+  // Hook for motor lock and unlook
128
+  static void HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr);
129
+  #if ENABLED(POWER_LOSS_RECOVERY)
130
+    // Hook for power loss recovery.
131
+    static void HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr);
132
+  #endif
133
+  // Hook for settings
134
+  static void HandleSettings(DGUS_VP_Variable &var, void *val_ptr);
135
+  static void HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr);
136
+  static void HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr);
137
+  #if HAS_PID_HEATING
138
+  	// Hook for "Change this temperature PID para"
139
+    static void HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr);
140
+    // Hook for PID autotune
141
+    static void HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr);
142
+  #endif
143
+  // Hook for "Change probe offset z"
144
+  static void HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr);
145
+  #if ENABLED(BABYSTEPPING)
146
+    // Hook for live z adjust action
147
+    static void HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr);
148
+  #endif
149
+  #if FAN_COUNT > 0
150
+    // Hook for fan control
151
+    static void HandleFanControl(DGUS_VP_Variable &var, void *val_ptr);
152
+  #endif
153
+  // Hook for heater control
154
+  static void HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr);
155
+  #if ENABLED(DGUS_PREHEAT_UI)
156
+    // Hook for preheat
157
+    static void HandlePreheat(DGUS_VP_Variable &var, void *val_ptr);
158
+  #endif
159
+  #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
160
+    // Hook for filament load and unload filament option
161
+    static void HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr);
162
+    // Hook for filament load and unload
163
+    static void HandleFilamentLoadUnload(DGUS_VP_Variable &var);
164
+  #endif
123 165
 
124 166
   #if ENABLED(SDSUPPORT)
125 167
     // Callback for VP "Display wants to change screen when there is a SD card"
@@ -134,6 +176,8 @@ public:
134 176
     static void DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr);
135 177
     /// User confirmed the abort action
136 178
     static void DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr);
179
+    /// User hit the tune button
180
+    static void DGUSLCD_SD_PrintTune(DGUS_VP_Variable &var, void *val_ptr);
137 181
     /// Send a single filename to the display.
138 182
     static void DGUSLCD_SD_SendFilename(DGUS_VP_Variable &var);
139 183
     /// Marlin informed us that a new SD has been inserted.
@@ -164,8 +208,20 @@ public:
164 208
   static void DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var);
165 209
   static void DGUSLCD_SendStringToDisplay(DGUS_VP_Variable &var);
166 210
   static void DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var);
211
+  static void DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var);
167 212
   static void DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var);
168 213
   static void DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var);
214
+  #if ENABLED(PRINTCOUNTER)
215
+    static void DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var);
216
+    static void DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var);
217
+  #endif
218
+  #if FAN_COUNT > 0
219
+    static void DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var);
220
+  #endif
221
+  static void DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var);
222
+  #if ENABLED(DGUS_UI_WAITING)
223
+    static void DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var);
224
+  #endif
169 225
 
170 226
   /// Send a value from 0..100 to a variable with a range from 0..255
171 227
   static void DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr);
@@ -199,6 +255,25 @@ public:
199 255
     }
200 256
   }
201 257
 
258
+  /// Send a float value to the display.
259
+  /// Display will get a 2-byte integer scaled to the number of digits:
260
+  /// Tell the display the number of digits and it cheats by displaying a dot between...
261
+  template<unsigned int decimals>
262
+  static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
263
+    if (var.memadr) {
264
+      float f = *(float *)var.memadr;
265
+      DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
266
+      f *= cpow(10, decimals);
267
+      union { int16_t i; char lb[2]; } endian;
268
+
269
+      char tmp[2];
270
+      endian.i = f;
271
+      tmp[0] = endian.lb[1];
272
+      tmp[1] = endian.lb[0];
273
+      dgusdisplay.WriteVariable(var.VP, tmp, 2);
274
+    }
275
+  }
276
+
202 277
   /// Force an update of all VP on the current screen.
203 278
   static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
204 279
   /// Has all VPs sent to the screen

+ 8
- 150
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinition.h View File

@@ -38,155 +38,13 @@ struct VPMapping {
38 38
 
39 39
 extern const struct VPMapping VPMap[];
40 40
 
41
-enum DGUSLCD_Screens : uint8_t {
42
-  DGUSLCD_SCREEN_BOOT = 0,
43
-  DGUSLCD_SCREEN_MAIN = 10,
44
-  DGUSLCD_SCREEN_TEMPERATURE = 20,
45
-  DGUSLCD_SCREEN_STATUS = 30,
46
-  DGUSLCD_SCREEN_STATUS2 = 32,
47
-  DGUSLCD_SCREEN_MANUALMOVE = 40,
48
-  DGUSLCD_SCREEN_MANUALEXTRUDE=42,
49
-  DGUSLCD_SCREEN_FANANDFEEDRATE = 44,
50
-  DGUSLCD_SCREEN_FLOWRATES = 46,
51
-  DGUSLCD_SCREEN_SDFILELIST = 50,
52
-  DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52,
53
-  DGUSLCD_SCREEN_CONFIRM = 240,
54
-  DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")
55
-  DGUSLCD_SCREEN_POPUP = 252,  ///< special target, popup screen will also return this code to say "return to previous screen"
56
-  DGUSLDC_SCREEN_UNUSED = 255
57
-};
58
-
59
-// Display Memory layout used (T5UID)
60
-// Except system variables this is arbitrary, just to organize stuff....
61
-
62
-// 0x0000 .. 0x0FFF  -- System variables and reserved by the display
63
-// 0x1000 .. 0x1FFF  -- Variables to never change location, regardless of UI Version
64
-// 0x2000 .. 0x2FFF  -- Controls (VPs that will trigger some action)
65
-// 0x3000 .. 0x4FFF  -- Marlin Data to be displayed
66
-// 0x5000 ..         -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
67
-
68
-// As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
69
-// so that we can keep variables nicely together in the address space.
70
-
71
-// UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
72
-constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000;  // Major -- incremented when incompatible
73
-constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001;  // Minor -- incremented on new features, but compatible
74
-constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002;  // Patch -- fixed which do not change functionality.
75
-constexpr uint16_t VP_UI_FLAVOUR       = 0x1010;  // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
76
-
77
-// Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
78
-constexpr uint16_t VP_MSGSTR1 = 0x1100;
79
-constexpr uint8_t VP_MSGSTR1_LEN = 0x20;  // might be more place for it...
80
-constexpr uint16_t VP_MSGSTR2 = 0x1140;
81
-constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
82
-constexpr uint16_t VP_MSGSTR3 = 0x1180;
83
-constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
84
-constexpr uint16_t VP_MSGSTR4 = 0x11C0;
85
-constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
86
-
87
-// Screenchange request for screens that only make sense when printer is idle.
88
-// e.g movement is only allowed if printer is not printing.
89
-// Marlin must confirm by setting the screen manually.
90
-constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
91
-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.
92
-constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002;   // Turn all heaters off. Value arbitrary ;)=
93
-constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
94
-
95
-constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
96
-
97
-// Buttons on the SD-Card File listing.
98
-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
99
-constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
100
-constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
101
-
102
-constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
103
-constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
104
-
105
-// Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
106
-// (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)
107
-// 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
108
-// 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.
109
-constexpr uint16_t VP_MOVE_X = 0x2100;
110
-constexpr uint16_t VP_MOVE_Y = 0x2102;
111
-constexpr uint16_t VP_MOVE_Z = 0x2104;
112
-constexpr uint16_t VP_MOVE_E0 = 0x2110;
113
-constexpr uint16_t VP_MOVE_E1 = 0x2112;
114
-//constexpr uint16_t VP_MOVE_E2 = 0x2114;
115
-//constexpr uint16_t VP_MOVE_E3 = 0x2116;
116
-//constexpr uint16_t VP_MOVE_E4 = 0x2118;
117
-//constexpr uint16_t VP_MOVE_E5 = 0x211A;
118
-constexpr uint16_t VP_HOME_ALL = 0x2120;
119
-
120
-// Firmware version on the boot screen.
121
-constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
122
-constexpr uint8_t VP_MARLIN_VERSION_LEN = 16;   // there is more space on the display, if needed.
123
-
124
-// Place for status messages.
125
-constexpr uint16_t VP_M117 = 0x3020;
126
-constexpr uint8_t VP_M117_LEN = 0x20;
127
-
128
-// Temperatures.
129
-constexpr uint16_t VP_T_E0_Is = 0x3060;  // 4 Byte Integer
130
-constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
131
-constexpr uint16_t VP_T_E1_Is = 0x3064;  // 4 Byte Integer
132
-
133
-// reserved to support up to 6 Extruders:
134
-//constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
135
-//constexpr uint16_t VP_T_E2_Is = 0x3068;  // 4 Byte Integer
136
-//constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
137
-//constexpr uint16_t VP_T_E3_Is = 0x306C;  // 4 Byte Integer
138
-//constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
139
-//constexpr uint16_t VP_T_E4_Is = 0x3070;  // 4 Byte Integer
140
-//constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
141
-//constexpr uint16_t VP_T_E4_Is = 0x3074;  // 4 Byte Integer
142
-//constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
143
-//constexpr uint16_t VP_T_E5_Is = 0x3078;  // 4 Byte Integer
144
-//constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
145
-
146
-constexpr uint16_t VP_T_Bed_Is = 0x3080;  // 4 Byte Integer
147
-constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
148
-
149
-constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
150
-constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
151
-
152
-// reserved for up to 6 Extruders:
153
-//constexpr uint16_t VP_Flowrate_E2 = 0x3094;
154
-//constexpr uint16_t VP_Flowrate_E3 = 0x3096;
155
-//constexpr uint16_t VP_Flowrate_E4 = 0x3098;
156
-//constexpr uint16_t VP_Flowrate_E5 = 0x309A;
157
-
158
-constexpr uint16_t VP_Fan_Percentage = 0x3100;  // 2 Byte Integer (0..100)
159
-constexpr uint16_t VP_Feedrate_Percentage = 0x3102; // 2 Byte Integer (0..100)
160
-constexpr uint16_t VP_PrintProgress_Percentage = 0x3104; // 2 Byte Integer (0..100)
161
-
162
-constexpr uint16_t VP_PrintTime = 0x3106;
163
-constexpr uint16_t VP_PrintTime_LEN = 10;
164
-
165
-// Actual Position
166
-constexpr uint16_t VP_XPos = 0x3110;  // 4 Byte Fixed point number; format xxx.yy
167
-constexpr uint16_t VP_YPos = 0x3112;  // 4 Byte Fixed point number; format xxx.yy
168
-constexpr uint16_t VP_ZPos = 0x3114;  // 4 Byte Fixed point number; format xxx.yy
169
-
170
-constexpr uint16_t VP_EPos = 0x3120;  // 4 Byte Fixed point number; format xxx.yy
171
-
172
-// SDCard File Listing
173
-constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
174
-constexpr uint16_t DGUS_SD_FILESPERSCREEN = 5; // FIXME move that info to the display and read it from there.
175
-constexpr uint16_t VP_SD_FileName0 = 0x3200;
176
-constexpr uint16_t VP_SD_FileName1 = 0x3220;
177
-constexpr uint16_t VP_SD_FileName2 = 0x3240;
178
-constexpr uint16_t VP_SD_FileName3 = 0x3260;
179
-constexpr uint16_t VP_SD_FileName4 = 0x3280;
180
-
181
-// SPs for certain variables...
182
-// located at 0x5000 and up
183
-// Not used yet!
184
-// This can be used e.g to make controls / data display invisible
185
-constexpr uint16_t SP_T_E0_Is = 0x5000;
186
-constexpr uint16_t SP_T_E0_Set = 0x5010;
187
-constexpr uint16_t SP_T_E1_Is = 0x5020;
188
-constexpr uint16_t SP_T_Bed_Is = 0x5030;
189
-constexpr uint16_t SP_T_Bed_Set = 0x5040;
190
-
191 41
 // List of VPs handled by Marlin / The Display.
192 42
 extern const struct DGUS_VP_Variable ListOfVP[];
43
+
44
+#if ENABLED(DGUS_LCD_UI_ORIGIN)
45
+  #include "DGUSDisplayDefinitionOrigin.h"
46
+#elif ENABLED(DGUS_LCD_UI_FYSETC)
47
+  #include "DGUSDisplayDefinitionFYSETC.h"
48
+#elif ENABLED(DGUS_LCD_UI_HIPRECY)
49
+  #include "DGUSDisplayDefinitionHIPRECY.h"
50
+#endif

+ 476
- 0
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionFYSETC.cpp View File

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

+ 290
- 0
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionFYSETC.h View File

@@ -0,0 +1,290 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+enum DGUSLCD_Screens : uint8_t {
25
+  DGUSLCD_SCREEN_BOOT                =   0,
26
+  DGUSLCD_SCREEN_MAIN                =   1,
27
+  DGUSLCD_SCREEN_STATUS              =   1,
28
+  DGUSLCD_SCREEN_STATUS2             =   1,
29
+  DGUSLCD_SCREEN_TEMPERATURE         =  10,
30
+  DGUSLCD_SCREEN_PREHEAT             =  18,
31
+  DGUSLCD_SCREEN_POWER_LOSS          = 100,
32
+  DGUSLCD_SCREEN_MANUALMOVE          = 192,
33
+  DGUSLCD_SCREEN_UTILITY             = 120,
34
+  DGUSLCD_SCREEN_FILAMENT_HEATING    = 146,
35
+  DGUSLCD_SCREEN_FILAMENT_LOADING    = 148,
36
+  DGUSLCD_SCREEN_FILAMENT_UNLOADING  = 158,
37
+  DGUSLCD_SCREEN_MANUALEXTRUDE       = 160,
38
+  DGUSLCD_SCREEN_SDFILELIST          =  71,
39
+  DGUSLCD_SCREEN_SDPRINTMANIPULATION =  73,
40
+  DGUSLCD_SCREEN_SDPRINTTUNE         =  75,
41
+  DGUSLCD_SCREEN_FLC_PREHEAT         =  94,
42
+  DGUSLCD_SCREEN_FLC_PRINTING        =  96,
43
+  DGUSLCD_SCREEN_STEPPERMM           = 212,
44
+  DGUSLCD_SCREEN_PID_E               = 214,
45
+  DGUSLCD_SCREEN_PID_BED             = 218,
46
+  DGUSLCD_SCREEN_INFOS               =  30,
47
+  DGUSLCD_SCREEN_CONFIRM             = 240,
48
+  DGUSLCD_SCREEN_KILL                = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")
49
+  DGUSLCD_SCREEN_WAITING             = 251,
50
+  DGUSLCD_SCREEN_POPUP               = 252, ///< special target, popup screen will also return this code to say "return to previous screen"
51
+  DGUSLDC_SCREEN_UNUSED              = 255
52
+};
53
+
54
+// Display Memory layout used (T5UID)
55
+// Except system variables this is arbitrary, just to organize stuff....
56
+
57
+// 0x0000 .. 0x0FFF  -- System variables and reserved by the display
58
+// 0x1000 .. 0x1FFF  -- Variables to never change location, regardless of UI Version
59
+// 0x2000 .. 0x2FFF  -- Controls (VPs that will trigger some action)
60
+// 0x3000 .. 0x4FFF  -- Marlin Data to be displayed
61
+// 0x5000 ..         -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
62
+
63
+// As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
64
+// so that we can keep variables nicely together in the address space.
65
+
66
+// UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
67
+constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000;  // Major -- incremented when incompatible
68
+constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001;  // Minor -- incremented on new features, but compatible
69
+constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002;  // Patch -- fixed which do not change functionality.
70
+constexpr uint16_t VP_UI_FLAVOUR       = 0x1010;  // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
71
+
72
+// Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
73
+constexpr uint16_t VP_MSGSTR1 = 0x1100;
74
+constexpr uint8_t VP_MSGSTR1_LEN = 0x20;  // might be more place for it...
75
+constexpr uint16_t VP_MSGSTR2 = 0x1140;
76
+constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
77
+constexpr uint16_t VP_MSGSTR3 = 0x1180;
78
+constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
79
+constexpr uint16_t VP_MSGSTR4 = 0x11C0;
80
+constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
81
+
82
+// Screenchange request for screens that only make sense when printer is idle.
83
+// e.g movement is only allowed if printer is not printing.
84
+// Marlin must confirm by setting the screen manually.
85
+constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
86
+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.
87
+constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002;   // Turn all heaters off. Value arbitrary ;)=
88
+constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
89
+
90
+constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
91
+
92
+// Buttons on the SD-Card File listing.
93
+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
94
+constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
95
+constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
96
+
97
+constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
98
+constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
99
+constexpr uint16_t VP_SD_Print_Setting = 0x2040;
100
+constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x2050; // Data: 0 down, 1 up
101
+
102
+// Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
103
+// (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)
104
+// 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
105
+// 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.
106
+constexpr uint16_t VP_MOVE_X = 0x2100;
107
+constexpr uint16_t VP_MOVE_Y = 0x2102;
108
+constexpr uint16_t VP_MOVE_Z = 0x2104;
109
+constexpr uint16_t VP_MOVE_E0 = 0x2110;
110
+constexpr uint16_t VP_MOVE_E1 = 0x2112;
111
+//constexpr uint16_t VP_MOVE_E2 = 0x2114;
112
+//constexpr uint16_t VP_MOVE_E3 = 0x2116;
113
+//constexpr uint16_t VP_MOVE_E4 = 0x2118;
114
+//constexpr uint16_t VP_MOVE_E5 = 0x211A;
115
+constexpr uint16_t VP_HOME_ALL = 0x2120;
116
+constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2130;
117
+
118
+// Power loss recovery
119
+constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x2180;
120
+
121
+// Fan Control Buttons , switch between "off" and "on"
122
+constexpr uint16_t VP_FAN0_CONTROL = 0x2200;
123
+constexpr uint16_t VP_FAN1_CONTROL = 0x2202;
124
+//constexpr uint16_t VP_FAN2_CONTROL = 0x2204;
125
+//constexpr uint16_t VP_FAN3_CONTROL = 0x2206;
126
+
127
+// Heater Control Buttons , triged between "cool down" and "heat PLA" state
128
+constexpr uint16_t VP_E0_CONTROL = 0x2210;
129
+constexpr uint16_t VP_E1_CONTROL = 0x2212;
130
+//constexpr uint16_t VP_E2_CONTROL = 0x2214;
131
+//constexpr uint16_t VP_E3_CONTROL = 0x2216;
132
+//constexpr uint16_t VP_E4_CONTROL = 0x2218;
133
+//constexpr uint16_t VP_E5_CONTROL = 0x221A;
134
+constexpr uint16_t VP_BED_CONTROL = 0x221C;
135
+
136
+// Preheat
137
+constexpr uint16_t VP_E0_BED_PREHEAT = 0x2220;
138
+constexpr uint16_t VP_E1_BED_PREHEAT = 0x2222;
139
+//constexpr uint16_t VP_E2_BED_PREHEAT = 0x2224;
140
+//constexpr uint16_t VP_E3_BED_PREHEAT = 0x2226;
141
+//constexpr uint16_t VP_E4_BED_PREHEAT = 0x2228;
142
+//constexpr uint16_t VP_E5_BED_PREHEAT = 0x222A;
143
+
144
+// Filament load and unload
145
+constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2300;
146
+constexpr uint16_t VP_E1_FILAMENT_LOAD_UNLOAD = 0x2302;
147
+
148
+// Settings store , reset
149
+constexpr uint16_t VP_SETTINGS = 0x2400;
150
+
151
+// PID autotune
152
+constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x2410;
153
+//constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x2412;
154
+//constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x2414;
155
+//constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x2416;
156
+//constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x2418;
157
+//constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x241A;
158
+constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x2420;
159
+
160
+// Calibrate Z
161
+constexpr uint16_t VP_Z_CALIBRATE = 0x2430;
162
+
163
+// First layer cal
164
+constexpr uint16_t VP_Z_FIRST_LAYER_CAL = 0x2500; // Data: 0 - Cancel first layer cal progress, >0 filament type have loaded
165
+
166
+// Firmware version on the boot screen.
167
+constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
168
+constexpr uint8_t VP_MARLIN_VERSION_LEN = 16;   // there is more space on the display, if needed.
169
+
170
+// Place for status messages.
171
+constexpr uint16_t VP_M117 = 0x3020;
172
+constexpr uint8_t VP_M117_LEN = 0x20;
173
+
174
+// Temperatures.
175
+constexpr uint16_t VP_T_E0_Is = 0x3060;  // 4 Byte Integer
176
+constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
177
+constexpr uint16_t VP_T_E1_Is = 0x3064;  // 4 Byte Integer
178
+
179
+// reserved to support up to 6 Extruders:
180
+constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
181
+//constexpr uint16_t VP_T_E2_Is = 0x3068;  // 4 Byte Integer
182
+//constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
183
+//constexpr uint16_t VP_T_E3_Is = 0x306C;  // 4 Byte Integer
184
+//constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
185
+//constexpr uint16_t VP_T_E4_Is = 0x3070;  // 4 Byte Integer
186
+//constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
187
+//constexpr uint16_t VP_T_E4_Is = 0x3074;  // 4 Byte Integer
188
+//constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
189
+//constexpr uint16_t VP_T_E5_Is = 0x3078;  // 4 Byte Integer
190
+//constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
191
+
192
+constexpr uint16_t VP_T_Bed_Is = 0x3080;  // 4 Byte Integer
193
+constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
194
+
195
+constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
196
+constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
197
+
198
+// reserved for up to 6 Extruders:
199
+//constexpr uint16_t VP_Flowrate_E2 = 0x3094;
200
+//constexpr uint16_t VP_Flowrate_E3 = 0x3096;
201
+//constexpr uint16_t VP_Flowrate_E4 = 0x3098;
202
+//constexpr uint16_t VP_Flowrate_E5 = 0x309A;
203
+
204
+constexpr uint16_t VP_Fan0_Percentage = 0x3100;  // 2 Byte Integer (0..100)
205
+constexpr uint16_t VP_Fan1_Percentage = 0x3102;  // 2 Byte Integer (0..100)
206
+constexpr uint16_t VP_Fan2_Percentage = 0x3104;  // 2 Byte Integer (0..100)
207
+constexpr uint16_t VP_Fan3_Percentage = 0x3106;  // 2 Byte Integer (0..100)
208
+constexpr uint16_t VP_Feedrate_Percentage = 0x3108; // 2 Byte Integer (0..100)
209
+
210
+// Actual Position
211
+constexpr uint16_t VP_XPos = 0x3110;  // 4 Byte Fixed point number; format xxx.yy
212
+constexpr uint16_t VP_YPos = 0x3112;  // 4 Byte Fixed point number; format xxx.yy
213
+constexpr uint16_t VP_ZPos = 0x3114;  // 4 Byte Fixed point number; format xxx.yy
214
+
215
+constexpr uint16_t VP_EPos = 0x3120;  // 4 Byte Fixed point number; format xxx.yy
216
+
217
+constexpr uint16_t VP_PrintProgress_Percentage = 0x3130; // 2 Byte Integer (0..100)
218
+
219
+constexpr uint16_t VP_PrintTime = 0x3140;
220
+constexpr uint16_t VP_PrintTime_LEN = 32;
221
+
222
+constexpr uint16_t VP_PrintAccTime = 0x3160;
223
+constexpr uint16_t VP_PrintAccTime_LEN = 32;
224
+
225
+constexpr uint16_t VP_PrintsTotal = 0x3180;
226
+constexpr uint16_t VP_PrintsTotal_LEN = 16;
227
+
228
+// SDCard File Listing
229
+constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
230
+constexpr uint16_t DGUS_SD_FILESPERSCREEN = 5; // FIXME move that info to the display and read it from there.
231
+constexpr uint16_t VP_SD_FileName0 = 0x3200;
232
+constexpr uint16_t VP_SD_FileName1 = 0x3220;
233
+constexpr uint16_t VP_SD_FileName2 = 0x3240;
234
+constexpr uint16_t VP_SD_FileName3 = 0x3260;
235
+constexpr uint16_t VP_SD_FileName4 = 0x3280;
236
+
237
+constexpr uint16_t VP_SD_Print_ProbeOffsetZ = 0x32A0; //
238
+constexpr uint16_t VP_SD_Print_Filename = 0x32C0;
239
+
240
+// Fan status
241
+constexpr uint16_t VP_FAN0_STATUS = 0x3300;
242
+constexpr uint16_t VP_FAN1_STATUS = 0x3302;
243
+//constexpr uint16_t VP_FAN2_STATUS = 0x3304;
244
+//constexpr uint16_t VP_FAN3_STATUS = 0x3306;
245
+
246
+// Heater status
247
+constexpr uint16_t VP_E0_STATUS = 0x3310;
248
+//constexpr uint16_t VP_E1_STATUS = 0x3312;
249
+//constexpr uint16_t VP_E2_STATUS = 0x3314;
250
+//constexpr uint16_t VP_E3_STATUS = 0x3316;
251
+//constexpr uint16_t VP_E4_STATUS = 0x3318;
252
+//constexpr uint16_t VP_E5_STATUS = 0x331A;
253
+constexpr uint16_t VP_BED_STATUS = 0x331C;
254
+
255
+constexpr uint16_t VP_MOVE_OPTION = 0x3400;
256
+
257
+// Step per mm
258
+constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
259
+//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
260
+constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
261
+//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
262
+constexpr uint16_t VP_Z_STEP_PER_MM = 0x3608;
263
+//constexpr uint16_t VP_Z2_STEP_PER_MM = 0x360A;
264
+constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
265
+constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
266
+//constexpr uint16_t VP_E2_STEP_PER_MM = 0x3614;
267
+//constexpr uint16_t VP_E3_STEP_PER_MM = 0x3616;
268
+//constexpr uint16_t VP_E4_STEP_PER_MM = 0x3618;
269
+//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
270
+
271
+// PIDs
272
+constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
273
+constexpr uint16_t VP_E0_PID_I = 0x3702;
274
+constexpr uint16_t VP_E0_PID_D = 0x3704;
275
+constexpr uint16_t VP_BED_PID_P = 0x3710;
276
+constexpr uint16_t VP_BED_PID_I = 0x3712;
277
+constexpr uint16_t VP_BED_PID_D = 0x3714;
278
+
279
+// Wating screen status
280
+constexpr uint16_t VP_WAITING_STATUS = 0x3800;
281
+
282
+// SPs for certain variables...
283
+// located at 0x5000 and up
284
+// Not used yet!
285
+// This can be used e.g to make controls / data display invisible
286
+constexpr uint16_t SP_T_E0_Is = 0x5000;
287
+constexpr uint16_t SP_T_E0_Set = 0x5010;
288
+constexpr uint16_t SP_T_E1_Is = 0x5020;
289
+constexpr uint16_t SP_T_Bed_Is = 0x5030;
290
+constexpr uint16_t SP_T_Bed_Set = 0x5040;

+ 476
- 0
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionHIPRECY.cpp View File

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

+ 289
- 0
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionHIPRECY.h View File

@@ -0,0 +1,289 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+enum DGUSLCD_Screens : uint8_t {
25
+  DGUSLCD_SCREEN_BOOT                 = 160,
26
+  DGUSLCD_SCREEN_MAIN                 =   1,
27
+  DGUSLCD_SCREEN_STATUS               =   1,
28
+  DGUSLCD_SCREEN_STATUS2              =   1,
29
+  DGUSLCD_SCREEN_POWER_LOSS           =  17,
30
+  DGUSLCD_SCREEN_TEMPERATURE          =  40,
31
+  DGUSLCD_SCREEN_MANUALMOVE           =  86,
32
+  DGUSLCD_SCREEN_PREHEAT              =  48,
33
+  DGUSLCD_SCREEN_UTILITY              =  70,
34
+  DGUSLCD_SCREEN_FILAMENT_HEATING     =  80,
35
+  DGUSLCD_SCREEN_FILAMENT_LOADING     =  76,
36
+  DGUSLCD_SCREEN_FILAMENT_UNLOADING   =  82,
37
+  DGUSLCD_SCREEN_MANUALEXTRUDE        =  84,
38
+  DGUSLCD_SCREEN_SDFILELIST           =   3,
39
+  DGUSLCD_SCREEN_SDPRINTMANIPULATION  =   7,
40
+  DGUSLCD_SCREEN_SDPRINTTUNE          =   9,
41
+  DGUSLCD_SCREEN_FLC_PREHEAT          =  94,
42
+  DGUSLCD_SCREEN_FLC_PRINTING         =  96,
43
+  DGUSLCD_SCREEN_STEPPERMM            = 122,
44
+  DGUSLCD_SCREEN_PID_E                = 126,
45
+  DGUSLCD_SCREEN_PID_BED              = 128,
46
+  DGUSLCD_SCREEN_INFOS                = 131,
47
+  DGUSLCD_SCREEN_CONFIRM              = 240,
48
+  DGUSLCD_SCREEN_KILL                 = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")
49
+  DGUSLCD_SCREEN_WAITING              = 251,
50
+  DGUSLCD_SCREEN_POPUP                = 252, ///< special target, popup screen will also return this code to say "return to previous screen"
51
+  DGUSLDC_SCREEN_UNUSED               = 255
52
+};
53
+
54
+// Display Memory layout used (T5UID)
55
+// Except system variables this is arbitrary, just to organize stuff....
56
+
57
+// 0x0000 .. 0x0FFF  -- System variables and reserved by the display
58
+// 0x1000 .. 0x1FFF  -- Variables to never change location, regardless of UI Version
59
+// 0x2000 .. 0x2FFF  -- Controls (VPs that will trigger some action)
60
+// 0x3000 .. 0x4FFF  -- Marlin Data to be displayed
61
+// 0x5000 ..         -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
62
+
63
+// As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
64
+// so that we can keep variables nicely together in the address space.
65
+
66
+// UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
67
+constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000;  // Major -- incremented when incompatible
68
+constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001;  // Minor -- incremented on new features, but compatible
69
+constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002;  // Patch -- fixed which do not change functionality.
70
+constexpr uint16_t VP_UI_FLAVOUR       = 0x1010;  // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
71
+
72
+// Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
73
+constexpr uint16_t VP_MSGSTR1 = 0x1100;
74
+constexpr uint8_t VP_MSGSTR1_LEN = 0x20;  // might be more place for it...
75
+constexpr uint16_t VP_MSGSTR2 = 0x1140;
76
+constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
77
+constexpr uint16_t VP_MSGSTR3 = 0x1180;
78
+constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
79
+constexpr uint16_t VP_MSGSTR4 = 0x11C0;
80
+constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
81
+
82
+// Screenchange request for screens that only make sense when printer is idle.
83
+// e.g movement is only allowed if printer is not printing.
84
+// Marlin must confirm by setting the screen manually.
85
+constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
86
+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.
87
+constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002;   // Turn all heaters off. Value arbitrary ;)=
88
+constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
89
+
90
+constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
91
+
92
+// Buttons on the SD-Card File listing.
93
+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
94
+constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
95
+constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
96
+
97
+constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
98
+constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
99
+constexpr uint16_t VP_SD_Print_Setting = 0x2040;
100
+constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x2050; // Data: 0 down, 1 up
101
+
102
+// Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
103
+// (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)
104
+// 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
105
+// 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.
106
+constexpr uint16_t VP_MOVE_X = 0x2100;
107
+constexpr uint16_t VP_MOVE_Y = 0x2102;
108
+constexpr uint16_t VP_MOVE_Z = 0x2104;
109
+constexpr uint16_t VP_MOVE_E0 = 0x2110;
110
+constexpr uint16_t VP_MOVE_E1 = 0x2112;
111
+//constexpr uint16_t VP_MOVE_E2 = 0x2114;
112
+//constexpr uint16_t VP_MOVE_E3 = 0x2116;
113
+//constexpr uint16_t VP_MOVE_E4 = 0x2118;
114
+//constexpr uint16_t VP_MOVE_E5 = 0x211A;
115
+constexpr uint16_t VP_HOME_ALL = 0x2120;
116
+constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2130;
117
+
118
+// Power loss recovery
119
+constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x2180;
120
+
121
+// Fan Control Buttons , switch between "off" and "on"
122
+constexpr uint16_t VP_FAN0_CONTROL = 0x2200;
123
+constexpr uint16_t VP_FAN1_CONTROL = 0x2202;
124
+//constexpr uint16_t VP_FAN2_CONTROL = 0x2204;
125
+//constexpr uint16_t VP_FAN3_CONTROL = 0x2206;
126
+
127
+// Heater Control Buttons , triged between "cool down" and "heat PLA" state
128
+constexpr uint16_t VP_E0_CONTROL = 0x2210;
129
+constexpr uint16_t VP_E1_CONTROL = 0x2212;
130
+//constexpr uint16_t VP_E2_CONTROL = 0x2214;
131
+//constexpr uint16_t VP_E3_CONTROL = 0x2216;
132
+//constexpr uint16_t VP_E4_CONTROL = 0x2218;
133
+//constexpr uint16_t VP_E5_CONTROL = 0x221A;
134
+constexpr uint16_t VP_BED_CONTROL = 0x221C;
135
+
136
+// Preheat
137
+constexpr uint16_t VP_E0_BED_PREHEAT = 0x2220;
138
+//constexpr uint16_t VP_E1_BED_PREHEAT = 0x2222;
139
+//constexpr uint16_t VP_E2_BED_PREHEAT = 0x2224;
140
+//constexpr uint16_t VP_E3_BED_PREHEAT = 0x2226;
141
+//constexpr uint16_t VP_E4_BED_PREHEAT = 0x2228;
142
+//constexpr uint16_t VP_E5_BED_PREHEAT = 0x222A;
143
+
144
+// Filament load and unload
145
+constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2300;
146
+
147
+// Settings store , reset
148
+constexpr uint16_t VP_SETTINGS = 0x2400;
149
+
150
+// PID autotune
151
+constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x2410;
152
+//constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x2412;
153
+//constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x2414;
154
+//constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x2416;
155
+//constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x2418;
156
+//constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x241A;
157
+constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x2420;
158
+
159
+// Calibrate Z
160
+constexpr uint16_t VP_Z_CALIBRATE = 0x2430;
161
+
162
+// First layer cal
163
+constexpr uint16_t VP_Z_FIRST_LAYER_CAL = 0x2500; // Data: 0 - Cancel first layer cal progress, >0 filament type have loaded
164
+
165
+// Firmware version on the boot screen.
166
+constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
167
+constexpr uint8_t VP_MARLIN_VERSION_LEN = 16;   // there is more space on the display, if needed.
168
+
169
+// Place for status messages.
170
+constexpr uint16_t VP_M117 = 0x3020;
171
+constexpr uint8_t VP_M117_LEN = 0x20;
172
+
173
+// Temperatures.
174
+constexpr uint16_t VP_T_E0_Is = 0x3060;  // 4 Byte Integer
175
+constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
176
+constexpr uint16_t VP_T_E1_Is = 0x3064;  // 4 Byte Integer
177
+
178
+// reserved to support up to 6 Extruders:
179
+//constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
180
+//constexpr uint16_t VP_T_E2_Is = 0x3068;  // 4 Byte Integer
181
+//constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
182
+//constexpr uint16_t VP_T_E3_Is = 0x306C;  // 4 Byte Integer
183
+//constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
184
+//constexpr uint16_t VP_T_E4_Is = 0x3070;  // 4 Byte Integer
185
+//constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
186
+//constexpr uint16_t VP_T_E4_Is = 0x3074;  // 4 Byte Integer
187
+//constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
188
+//constexpr uint16_t VP_T_E5_Is = 0x3078;  // 4 Byte Integer
189
+//constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
190
+
191
+constexpr uint16_t VP_T_Bed_Is = 0x3080;  // 4 Byte Integer
192
+constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
193
+
194
+constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
195
+constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
196
+
197
+// reserved for up to 6 Extruders:
198
+//constexpr uint16_t VP_Flowrate_E2 = 0x3094;
199
+//constexpr uint16_t VP_Flowrate_E3 = 0x3096;
200
+//constexpr uint16_t VP_Flowrate_E4 = 0x3098;
201
+//constexpr uint16_t VP_Flowrate_E5 = 0x309A;
202
+
203
+constexpr uint16_t VP_Fan0_Percentage = 0x3100;  // 2 Byte Integer (0..100)
204
+constexpr uint16_t VP_Fan1_Percentage = 0x3102;  // 2 Byte Integer (0..100)
205
+constexpr uint16_t VP_Fan2_Percentage = 0x3104;  // 2 Byte Integer (0..100)
206
+constexpr uint16_t VP_Fan3_Percentage = 0x3106;  // 2 Byte Integer (0..100)
207
+constexpr uint16_t VP_Feedrate_Percentage = 0x3108; // 2 Byte Integer (0..100)
208
+
209
+// Actual Position
210
+constexpr uint16_t VP_XPos = 0x3110;  // 4 Byte Fixed point number; format xxx.yy
211
+constexpr uint16_t VP_YPos = 0x3112;  // 4 Byte Fixed point number; format xxx.yy
212
+constexpr uint16_t VP_ZPos = 0x3114;  // 4 Byte Fixed point number; format xxx.yy
213
+
214
+constexpr uint16_t VP_EPos = 0x3120;  // 4 Byte Fixed point number; format xxx.yy
215
+
216
+constexpr uint16_t VP_PrintProgress_Percentage = 0x3130; // 2 Byte Integer (0..100)
217
+
218
+constexpr uint16_t VP_PrintTime = 0x3140;
219
+constexpr uint16_t VP_PrintTime_LEN = 32;
220
+
221
+constexpr uint16_t VP_PrintAccTime = 0x3160;
222
+constexpr uint16_t VP_PrintAccTime_LEN = 32;
223
+
224
+constexpr uint16_t VP_PrintsTotal = 0x3180;
225
+constexpr uint16_t VP_PrintsTotal_LEN = 16;
226
+
227
+// SDCard File Listing
228
+constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
229
+constexpr uint16_t DGUS_SD_FILESPERSCREEN = 5; // FIXME move that info to the display and read it from there.
230
+constexpr uint16_t VP_SD_FileName0 = 0x3200;
231
+constexpr uint16_t VP_SD_FileName1 = 0x3220;
232
+constexpr uint16_t VP_SD_FileName2 = 0x3240;
233
+constexpr uint16_t VP_SD_FileName3 = 0x3260;
234
+constexpr uint16_t VP_SD_FileName4 = 0x3280;
235
+
236
+constexpr uint16_t VP_SD_Print_ProbeOffsetZ = 0x32A0; //
237
+
238
+constexpr uint16_t VP_SD_Print_Filename = 0x32C0; //
239
+// Fan status
240
+constexpr uint16_t VP_FAN0_STATUS = 0x3300;
241
+constexpr uint16_t VP_FAN1_STATUS = 0x3302;
242
+//constexpr uint16_t VP_FAN2_STATUS = 0x3304;
243
+//constexpr uint16_t VP_FAN3_STATUS = 0x3306;
244
+
245
+// Heater status
246
+constexpr uint16_t VP_E0_STATUS = 0x3310;
247
+//constexpr uint16_t VP_E1_STATUS = 0x3312;
248
+//constexpr uint16_t VP_E2_STATUS = 0x3314;
249
+//constexpr uint16_t VP_E3_STATUS = 0x3316;
250
+//constexpr uint16_t VP_E4_STATUS = 0x3318;
251
+//constexpr uint16_t VP_E5_STATUS = 0x331A;
252
+constexpr uint16_t VP_BED_STATUS = 0x331C;
253
+
254
+constexpr uint16_t VP_MOVE_OPTION = 0x3400;
255
+
256
+// Step per mm
257
+constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
258
+//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
259
+constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
260
+//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
261
+constexpr uint16_t VP_Z_STEP_PER_MM = 0x3608;
262
+//constexpr uint16_t VP_Z2_STEP_PER_MM = 0x360A;
263
+constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
264
+//constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
265
+//constexpr uint16_t VP_E2_STEP_PER_MM = 0x3614;
266
+//constexpr uint16_t VP_E3_STEP_PER_MM = 0x3616;
267
+//constexpr uint16_t VP_E4_STEP_PER_MM = 0x3618;
268
+//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
269
+
270
+// PIDs
271
+constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
272
+constexpr uint16_t VP_E0_PID_I = 0x3702;
273
+constexpr uint16_t VP_E0_PID_D = 0x3704;
274
+constexpr uint16_t VP_BED_PID_P = 0x3710;
275
+constexpr uint16_t VP_BED_PID_I = 0x3712;
276
+constexpr uint16_t VP_BED_PID_D = 0x3714;
277
+
278
+// Wating screen status
279
+constexpr uint16_t VP_WAITING_STATUS = 0x3800;
280
+
281
+// SPs for certain variables...
282
+// located at 0x5000 and up
283
+// Not used yet!
284
+// This can be used e.g to make controls / data display invisible
285
+constexpr uint16_t SP_T_E0_Is = 0x5000;
286
+constexpr uint16_t SP_T_E0_Set = 0x5010;
287
+constexpr uint16_t SP_T_E1_Is = 0x5020;
288
+constexpr uint16_t SP_T_Bed_Is = 0x5030;
289
+constexpr uint16_t SP_T_Bed_Set = 0x5040;

Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinition.cpp → Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionOrigin.cpp View File

@@ -24,16 +24,21 @@
24 24
 
25 25
 #include "../../../../inc/MarlinConfigPre.h"
26 26
 
27
-#if ENABLED(DGUS_LCD)
27
+#if ENABLED(DGUS_LCD_UI_ORIGIN)
28 28
 
29 29
 #include "DGUSDisplayDefinition.h"
30 30
 #include "DGUSDisplay.h"
31 31
 
32 32
 #include "../../../../module/temperature.h"
33 33
 #include "../../../../module/motion.h"
34
+#include "../../../../module/planner.h"
34 35
 
35 36
 #include "../../../ultralcd.h"
36 37
 
38
+#if ENABLED(DUGS_UI_MOVE_DIS_OPTION)
39
+  uint16_t distanceToMove = 0.1;
40
+#endif
41
+
37 42
 const uint16_t VPList_Boot[] PROGMEM = {
38 43
   VP_MARLIN_VERSION,
39 44
   0x0000
@@ -49,7 +54,7 @@ const uint16_t VPList_Temp[] PROGMEM = {
49 54
     VP_T_E0_Is, VP_T_E0_Set,
50 55
   #endif
51 56
   #if HOTENDS >= 2
52
-    VP_T_E1_I, VP_T_E1_S,
57
+    VP_T_E1_Is, VP_T_E1_Set,
53 58
   #endif
54 59
   #if HAS_HEATED_BED
55 60
     VP_T_Bed_Is, VP_T_Bed_Set,
@@ -63,16 +68,16 @@ const uint16_t VPList_Status[] PROGMEM = {
63 68
     VP_T_E0_Is, VP_T_E0_Set,
64 69
   #endif
65 70
   #if HOTENDS >= 2
66
-    VP_T_E1_I, VP_T_E1_S,
71
+    VP_T_E1_Is, VP_T_E1_Set,
67 72
   #endif
68 73
   #if HAS_HEATED_BED
69 74
     VP_T_Bed_Is, VP_T_Bed_Set,
70 75
   #endif
71 76
   #if FAN_COUNT > 0
72
-    VP_Fan_Percentage,
77
+    VP_Fan0_Percentage,
73 78
   #endif
74 79
   VP_XPos, VP_YPos, VP_ZPos,
75
-  VP_Fan_Percentage,
80
+  VP_Fan0_Percentage,
76 81
   VP_Feedrate_Percentage,
77 82
   VP_PrintProgress_Percentage,
78 83
   0x0000
@@ -102,7 +107,7 @@ const uint16_t VPList_ManualExtrude[] PROGMEM = {
102 107
 };
103 108
 
104 109
 const uint16_t VPList_FanAndFeedrate[] PROGMEM = {
105
-  VP_Feedrate_Percentage, VP_Fan_Percentage,
110
+  VP_Feedrate_Percentage, VP_Fan0_Percentage,
106 111
   0x0000
107 112
 };
108 113
 
@@ -150,15 +155,33 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
150 155
   // Helper to detect touch events
151 156
   VPHELPER(VP_SCREENCHANGE, nullptr, DGUSScreenVariableHandler::ScreenChangeHook, nullptr),
152 157
   VPHELPER(VP_SCREENCHANGE_ASK, nullptr, DGUSScreenVariableHandler::ScreenChangeHookIfIdle, nullptr),
153
-  VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, DGUSScreenVariableHandler::ScreenChangeHookIfSD, nullptr),
158
+  #if ENABLED(SDSUPPORT)
159
+    VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, DGUSScreenVariableHandler::ScreenChangeHookIfSD, nullptr),
160
+  #endif
154 161
   VPHELPER(VP_CONFIRMED, nullptr, DGUSScreenVariableHandler::ScreenConfirmedOK, nullptr),
155 162
 
156 163
   VPHELPER(VP_TEMP_ALL_OFF, nullptr, &DGUSScreenVariableHandler::HandleAllHeatersOff, nullptr),
157 164
 
158
-  VPHELPER(VP_MOVE_X, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
159
-  VPHELPER(VP_MOVE_Y, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
160
-  VPHELPER(VP_MOVE_Z, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
161
-  VPHELPER(VP_HOME_ALL, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
165
+  #if ENABLED(DUGS_UI_MOVE_DIS_OPTION)
166
+    VPHELPER(VP_MOVE_OPTION, &distanceToMove, &DGUSScreenVariableHandler::HandleManualMoveOption, nullptr),
167
+  #endif
168
+  #if ENABLED(DUGS_UI_MOVE_DIS_OPTION)
169
+    VPHELPER(VP_MOVE_X, &distanceToMove, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
170
+    VPHELPER(VP_MOVE_Y, &distanceToMove, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
171
+    VPHELPER(VP_MOVE_Z, &distanceToMove, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
172
+    VPHELPER(VP_HOME_ALL, &distanceToMove, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
173
+  #else
174
+    VPHELPER(VP_MOVE_X, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
175
+    VPHELPER(VP_MOVE_Y, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
176
+    VPHELPER(VP_MOVE_Z, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
177
+    VPHELPER(VP_HOME_ALL, nullptr, &DGUSScreenVariableHandler::HandleManualMove, nullptr),
178
+  #endif
179
+
180
+  VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &DGUSScreenVariableHandler::HandleMotorLockUnlock, nullptr),
181
+  #if ENABLED(POWER_LOSS_RECOVERY)
182
+    VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &DGUSScreenVariableHandler::HandlePowerLossRecovery, nullptr),
183
+  #endif
184
+  VPHELPER(VP_SETTINGS, nullptr, &DGUSScreenVariableHandler::HandleSettings, nullptr),
162 185
 
163 186
   { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&DGUSScreenVariableHandler::DGUSLCD_SendStringToDisplayPGM },
164 187
   // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
@@ -171,39 +194,82 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
171 194
     VPHELPER(VP_Flowrate_E0, nullptr, DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
172 195
     VPHELPER(VP_EPos, &destination.e, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>),
173 196
     VPHELPER(VP_MOVE_E0, nullptr, &DGUSScreenVariableHandler::HandleManualExtrude, nullptr),
197
+    VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &DGUSScreenVariableHandler::HandleHeaterControl, nullptr),
198
+    VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay),
199
+    #if ENABLED(DGUS_PREHEAT_UI)
200
+      VPHELPER(VP_E0_BED_PREHEAT, nullptr, &DGUSScreenVariableHandler::HandlePreheat, nullptr),
201
+    #endif
202
+    #if ENABLED(PIDTEMP)
203
+      VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, DGUSScreenVariableHandler::HandleTemperaturePIDChanged, DGUSScreenVariableHandler::DGUSLCD_SendTemperaturePID),
204
+      VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, DGUSScreenVariableHandler::HandleTemperaturePIDChanged, DGUSScreenVariableHandler::DGUSLCD_SendTemperaturePID),
205
+      VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, DGUSScreenVariableHandler::HandleTemperaturePIDChanged, DGUSScreenVariableHandler::DGUSLCD_SendTemperaturePID),
206
+      VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &DGUSScreenVariableHandler::HandlePIDAutotune, nullptr),
207
+    #endif
208
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
209
+      VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &DGUSScreenVariableHandler::HandleFilamentOption, &DGUSScreenVariableHandler::HandleFilamentLoadUnload),
210
+    #endif
174 211
   #endif
175 212
   #if HOTENDS >= 2
176
-    VPHELPER(VP_T_E1_I, &thermalManager.temp_hotend[1].celsius, nullptr, DGUSLCD_SendFloatAsLongValueToDisplay<0>),
177
-    VPHELPER(VP_T_E1_S, &thermalManager.temp_hotend[1].target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
213
+    VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, DGUSLCD_SendFloatAsLongValueToDisplay<0>),
214
+    VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
178 215
     VPHELPER(VP_Flowrate_E1, nullptr, DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
179 216
     VPHELPER(VP_MOVE_E1, nullptr, &DGUSScreenVariableHandler::HandleManualExtrude, nullptr),
180
-  #endif
181
-  #if HOTENDS >= 3
182
-    #error More than 2 Hotends currently not implemented on the Display UI design.
217
+    VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &DGUSScreenVariableHandler::HandleHeaterControl, nullptr),
218
+    VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay),
219
+    #if ENABLED(PIDTEMP)
220
+      VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, &DGUSScreenVariableHandler::HandlePIDAutotune, nullptr),
221
+    #endif
183 222
   #endif
184 223
   #if HAS_HEATED_BED
185 224
     VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<0>),
186 225
     VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
226
+    VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &DGUSScreenVariableHandler::HandleHeaterControl, nullptr),
227
+    VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay),
228
+    #if ENABLED(PIDTEMPBED)
229
+      VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, DGUSScreenVariableHandler::HandleTemperaturePIDChanged, DGUSScreenVariableHandler::DGUSLCD_SendTemperaturePID),
230
+      VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, DGUSScreenVariableHandler::HandleTemperaturePIDChanged, DGUSScreenVariableHandler::DGUSLCD_SendTemperaturePID),
231
+      VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, DGUSScreenVariableHandler::HandleTemperaturePIDChanged, DGUSScreenVariableHandler::DGUSLCD_SendTemperaturePID),
232
+    #endif
187 233
   #endif
188 234
 
189
-  // Fan Data.
190
-  #if FAN_COUNT > 0
191
-    VPHELPER(VP_Fan_Percentage, &thermalManager.fan_speed[0], DGUSScreenVariableHandler::DGUSLCD_PercentageToUint8, &DGUSScreenVariableHandler::DGUSLCD_SendPercentageToDisplay),
235
+  // Fan Data
236
+  #if FAN_COUNT
237
+    #define FAN_VPHELPER(N) \
238
+      VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], DGUSScreenVariableHandler::DGUSLCD_PercentageToUint8, &DGUSScreenVariableHandler::DGUSLCD_SendPercentageToDisplay), \
239
+      VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &DGUSScreenVariableHandler::HandleFanControl, nullptr), \
240
+      VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &DGUSScreenVariableHandler::DGUSLCD_SendFanStatusToDisplay),
241
+    REPEAT(FAN_COUNT, FAN_VPHELPER)
192 242
   #endif
193 243
 
194
-  // Feedrate.
244
+  // Feedrate
195 245
   VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, DGUSScreenVariableHandler::DGUSLCD_SetValueDirectly<int16_t>, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay ),
196 246
 
197
-  // Position Data.
247
+  // Position Data
198 248
   VPHELPER(VP_XPos, &current_position.x, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>),
199 249
   VPHELPER(VP_YPos, &current_position.y, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>),
200 250
   VPHELPER(VP_ZPos, &current_position.z, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>),
201 251
 
202
-  // Print Progress.
203
-  VPHELPER(VP_PrintProgress_Percentage, &ui.progress_override, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay ),
252
+  // Print Progress
253
+  #if ENABLED(LCD_SET_PROGRESS_MANUALLY)
254
+    VPHELPER(VP_PrintProgress_Percentage, &ui.progress_override, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay ),
255
+  #endif
204 256
 
205 257
   // Print Time
206 258
   VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendPrintTimeToDisplay ),
259
+  #if ENABLED(PRINTCOUNTER)
260
+    VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendPrintAccTimeToDisplay ),
261
+    VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendPrintsTotalToDisplay ),
262
+  #endif
263
+
264
+  VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], DGUSScreenVariableHandler::HandleStepPerMMChanged, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsIntValueToDisplay<1>),
265
+  VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], DGUSScreenVariableHandler::HandleStepPerMMChanged, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsIntValueToDisplay<1>),
266
+  VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], DGUSScreenVariableHandler::HandleStepPerMMChanged, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsIntValueToDisplay<1>),
267
+  #if HOTENDS >= 1
268
+    VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], DGUSScreenVariableHandler::HandleStepPerMMExtruderChanged, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsIntValueToDisplay<1>),
269
+  #endif
270
+  #if HOTENDS >= 2
271
+    VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], DGUSScreenVariableHandler::HandleStepPerMMExtruderChanged, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsIntValueToDisplay<1>),
272
+  #endif
207 273
 
208 274
   // SDCard File listing.
209 275
   #if ENABLED(SDSUPPORT)
@@ -217,6 +283,17 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
217 283
     VPHELPER_STR(VP_SD_FileName4,  nullptr, VP_SD_FileName_LEN, nullptr, DGUSScreenVariableHandler::DGUSLCD_SD_SendFilename ),
218 284
     VPHELPER(VP_SD_ResumePauseAbort, nullptr, DGUSScreenVariableHandler::DGUSLCD_SD_ResumePauseAbort, nullptr),
219 285
     VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, DGUSScreenVariableHandler::DGUSLCD_SD_ReallyAbort, nullptr),
286
+    VPHELPER(VP_SD_Print_Setting, nullptr, DGUSScreenVariableHandler::DGUSLCD_SD_PrintTune, nullptr),
287
+    #if HAS_BED_PROBE
288
+      VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe_offset.z, DGUSScreenVariableHandler::HandleProbeOffsetZChanged, &DGUSScreenVariableHandler::DGUSLCD_SendFloatAsIntValueToDisplay<2>),
289
+      #if ENABLED(BABYSTEPPING)
290
+        VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, DGUSScreenVariableHandler::HandleLiveAdjustZ, nullptr),
291
+      #endif
292
+    #endif
293
+  #endif
294
+
295
+  #if ENABLED(DGUS_UI_WAITING)
296
+    VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendWaitingStatusToDisplay),
220 297
   #endif
221 298
 
222 299
   // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
@@ -228,4 +305,4 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
228 305
   VPHELPER(0, 0, 0, 0)  // must be last entry.
229 306
 };
230 307
 
231
-#endif // DGUS_LCD
308
+#endif // DGUS_LCD_UI_ORIGIN

+ 280
- 0
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplayDefinitionOrigin.h View File

@@ -0,0 +1,280 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+enum DGUSLCD_Screens : uint8_t {
25
+  DGUSLCD_SCREEN_BOOT = 0,
26
+  DGUSLCD_SCREEN_MAIN = 10,
27
+  DGUSLCD_SCREEN_TEMPERATURE = 20,
28
+  DGUSLCD_SCREEN_STATUS = 30,
29
+  DGUSLCD_SCREEN_STATUS2 = 32,
30
+  DGUSLCD_SCREEN_MANUALMOVE = 40,
31
+  DGUSLCD_SCREEN_MANUALEXTRUDE=42,
32
+  DGUSLCD_SCREEN_FANANDFEEDRATE = 44,
33
+  DGUSLCD_SCREEN_FLOWRATES = 46,
34
+  DGUSLCD_SCREEN_SDFILELIST = 50,
35
+  DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52,
36
+  DGUSLCD_SCREEN_POWER_LOSS = 100,
37
+  DGUSLCD_SCREEN_PREHEAT=120,
38
+  DGUSLCD_SCREEN_UTILITY=110,
39
+  DGUSLCD_SCREEN_FILAMENT_HEATING=146,
40
+  DGUSLCD_SCREEN_FILAMENT_LOADING=148,
41
+  DGUSLCD_SCREEN_FILAMENT_UNLOADING=158,
42
+  DGUSLCD_SCREEN_SDPRINTTUNE = 170,
43
+  DGUSLCD_SCREEN_CONFIRM = 240,
44
+  DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")
45
+  DGUSLCD_SCREEN_WAITING = 251,
46
+  DGUSLCD_SCREEN_POPUP = 252,  ///< special target, popup screen will also return this code to say "return to previous screen"
47
+  DGUSLDC_SCREEN_UNUSED = 255
48
+};
49
+
50
+// Display Memory layout used (T5UID)
51
+// Except system variables this is arbitrary, just to organize stuff....
52
+
53
+// 0x0000 .. 0x0FFF  -- System variables and reserved by the display
54
+// 0x1000 .. 0x1FFF  -- Variables to never change location, regardless of UI Version
55
+// 0x2000 .. 0x2FFF  -- Controls (VPs that will trigger some action)
56
+// 0x3000 .. 0x4FFF  -- Marlin Data to be displayed
57
+// 0x5000 ..         -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
58
+
59
+// As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
60
+// so that we can keep variables nicely together in the address space.
61
+
62
+// UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
63
+constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000;  // Major -- incremented when incompatible
64
+constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001;  // Minor -- incremented on new features, but compatible
65
+constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002;  // Patch -- fixed which do not change functionality.
66
+constexpr uint16_t VP_UI_FLAVOUR       = 0x1010;  // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
67
+
68
+// Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
69
+constexpr uint16_t VP_MSGSTR1 = 0x1100;
70
+constexpr uint8_t VP_MSGSTR1_LEN = 0x20;  // might be more place for it...
71
+constexpr uint16_t VP_MSGSTR2 = 0x1140;
72
+constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
73
+constexpr uint16_t VP_MSGSTR3 = 0x1180;
74
+constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
75
+constexpr uint16_t VP_MSGSTR4 = 0x11C0;
76
+constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
77
+
78
+// Screenchange request for screens that only make sense when printer is idle.
79
+// e.g movement is only allowed if printer is not printing.
80
+// Marlin must confirm by setting the screen manually.
81
+constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
82
+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.
83
+constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002;   // Turn all heaters off. Value arbitrary ;)=
84
+constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
85
+
86
+constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
87
+
88
+// Buttons on the SD-Card File listing.
89
+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
90
+constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
91
+constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
92
+
93
+constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
94
+constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
95
+constexpr uint16_t VP_SD_Print_Setting = 0x2040;
96
+constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x2050; // Data: 0 down, 1 up
97
+
98
+// Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
99
+// (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)
100
+// 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
101
+// 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.
102
+constexpr uint16_t VP_MOVE_X = 0x2100;
103
+constexpr uint16_t VP_MOVE_Y = 0x2102;
104
+constexpr uint16_t VP_MOVE_Z = 0x2104;
105
+constexpr uint16_t VP_MOVE_E0 = 0x2110;
106
+constexpr uint16_t VP_MOVE_E1 = 0x2112;
107
+//constexpr uint16_t VP_MOVE_E2 = 0x2114;
108
+//constexpr uint16_t VP_MOVE_E3 = 0x2116;
109
+//constexpr uint16_t VP_MOVE_E4 = 0x2118;
110
+//constexpr uint16_t VP_MOVE_E5 = 0x211A;
111
+constexpr uint16_t VP_HOME_ALL = 0x2120;
112
+constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2130;
113
+
114
+// Power loss recovery
115
+constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x2180;
116
+
117
+// Fan Control Buttons , switch between "off" and "on"
118
+constexpr uint16_t VP_FAN0_CONTROL = 0x2200;
119
+constexpr uint16_t VP_FAN1_CONTROL = 0x2202;
120
+//constexpr uint16_t VP_FAN2_CONTROL = 0x2204;
121
+//constexpr uint16_t VP_FAN3_CONTROL = 0x2206;
122
+
123
+// Heater Control Buttons , triged between "cool down" and "heat PLA" state
124
+constexpr uint16_t VP_E0_CONTROL = 0x2210;
125
+constexpr uint16_t VP_E1_CONTROL = 0x2212;
126
+//constexpr uint16_t VP_E2_CONTROL = 0x2214;
127
+//constexpr uint16_t VP_E3_CONTROL = 0x2216;
128
+//constexpr uint16_t VP_E4_CONTROL = 0x2218;
129
+//constexpr uint16_t VP_E5_CONTROL = 0x221A;
130
+constexpr uint16_t VP_BED_CONTROL = 0x221C;
131
+
132
+// Preheat
133
+constexpr uint16_t VP_E0_BED_PREHEAT = 0x2220;
134
+constexpr uint16_t VP_E1_BED_CONTROL = 0x2222;
135
+//constexpr uint16_t VP_E2_BED_CONTROL = 0x2224;
136
+//constexpr uint16_t VP_E3_BED_CONTROL = 0x2226;
137
+//constexpr uint16_t VP_E4_BED_CONTROL = 0x2228;
138
+//constexpr uint16_t VP_E5_BED_CONTROL = 0x222A;
139
+
140
+// Filament load and unload
141
+constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2300;
142
+constexpr uint16_t VP_E1_FILAMENT_LOAD_UNLOAD = 0x2302;
143
+
144
+// Settings store , reset
145
+constexpr uint16_t VP_SETTINGS = 0x2400;
146
+
147
+// PID autotune
148
+constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x2410;
149
+//constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x2412;
150
+//constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x2414;
151
+//constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x2416;
152
+//constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x2418;
153
+//constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x241A;
154
+constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x2420;
155
+
156
+// Firmware version on the boot screen.
157
+constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
158
+constexpr uint8_t VP_MARLIN_VERSION_LEN = 16;   // there is more space on the display, if needed.
159
+
160
+// Place for status messages.
161
+constexpr uint16_t VP_M117 = 0x3020;
162
+constexpr uint8_t VP_M117_LEN = 0x20;
163
+
164
+// Temperatures.
165
+constexpr uint16_t VP_T_E0_Is = 0x3060;  // 4 Byte Integer
166
+constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
167
+constexpr uint16_t VP_T_E1_Is = 0x3064;  // 4 Byte Integer
168
+
169
+// reserved to support up to 6 Extruders:
170
+//constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
171
+//constexpr uint16_t VP_T_E2_Is = 0x3068;  // 4 Byte Integer
172
+//constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
173
+//constexpr uint16_t VP_T_E3_Is = 0x306C;  // 4 Byte Integer
174
+//constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
175
+//constexpr uint16_t VP_T_E4_Is = 0x3070;  // 4 Byte Integer
176
+//constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
177
+//constexpr uint16_t VP_T_E4_Is = 0x3074;  // 4 Byte Integer
178
+//constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
179
+//constexpr uint16_t VP_T_E5_Is = 0x3078;  // 4 Byte Integer
180
+//constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
181
+
182
+constexpr uint16_t VP_T_Bed_Is = 0x3080;  // 4 Byte Integer
183
+constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
184
+
185
+constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
186
+constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
187
+
188
+// reserved for up to 6 Extruders:
189
+//constexpr uint16_t VP_Flowrate_E2 = 0x3094;
190
+//constexpr uint16_t VP_Flowrate_E3 = 0x3096;
191
+//constexpr uint16_t VP_Flowrate_E4 = 0x3098;
192
+//constexpr uint16_t VP_Flowrate_E5 = 0x309A;
193
+
194
+constexpr uint16_t VP_Fan0_Percentage = 0x3100;  // 2 Byte Integer (0..100)
195
+//constexpr uint16_t VP_Fan1_Percentage = 0x33A2;  // 2 Byte Integer (0..100)
196
+//constexpr uint16_t VP_Fan2_Percentage = 0x33A4;  // 2 Byte Integer (0..100)
197
+//constexpr uint16_t VP_Fan3_Percentage = 0x33A6;  // 2 Byte Integer (0..100)
198
+
199
+constexpr uint16_t VP_Feedrate_Percentage = 0x3102; // 2 Byte Integer (0..100)
200
+constexpr uint16_t VP_PrintProgress_Percentage = 0x3104; // 2 Byte Integer (0..100)
201
+
202
+constexpr uint16_t VP_PrintTime = 0x3106;
203
+constexpr uint16_t VP_PrintTime_LEN = 10;
204
+
205
+constexpr uint16_t VP_PrintAccTime = 0x3160;
206
+constexpr uint16_t VP_PrintAccTime_LEN = 32;
207
+
208
+constexpr uint16_t VP_PrintsTotal = 0x3180;
209
+constexpr uint16_t VP_PrintsTotal_LEN = 16;
210
+
211
+// Actual Position
212
+constexpr uint16_t VP_XPos = 0x3110;  // 4 Byte Fixed point number; format xxx.yy
213
+constexpr uint16_t VP_YPos = 0x3112;  // 4 Byte Fixed point number; format xxx.yy
214
+constexpr uint16_t VP_ZPos = 0x3114;  // 4 Byte Fixed point number; format xxx.yy
215
+
216
+constexpr uint16_t VP_EPos = 0x3120;  // 4 Byte Fixed point number; format xxx.yy
217
+
218
+// SDCard File Listing
219
+constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
220
+constexpr uint16_t DGUS_SD_FILESPERSCREEN = 5; // FIXME move that info to the display and read it from there.
221
+constexpr uint16_t VP_SD_FileName0 = 0x3200;
222
+constexpr uint16_t VP_SD_FileName1 = 0x3220;
223
+constexpr uint16_t VP_SD_FileName2 = 0x3240;
224
+constexpr uint16_t VP_SD_FileName3 = 0x3260;
225
+constexpr uint16_t VP_SD_FileName4 = 0x3280;
226
+
227
+constexpr uint16_t VP_SD_Print_ProbeOffsetZ = 0x32A0; //
228
+constexpr uint16_t VP_SD_Print_Filename = 0x32C0; //
229
+
230
+// Fan status
231
+constexpr uint16_t VP_FAN0_STATUS = 0x3300;
232
+constexpr uint16_t VP_FAN1_STATUS = 0x3302;
233
+//constexpr uint16_t VP_FAN2_STATUS = 0x3304;
234
+//constexpr uint16_t VP_FAN3_STATUS = 0x3306;
235
+
236
+// Heater status
237
+constexpr uint16_t VP_E0_STATUS = 0x3310;
238
+//constexpr uint16_t VP_E1_STATUS = 0x3312;
239
+//constexpr uint16_t VP_E2_STATUS = 0x3314;
240
+//constexpr uint16_t VP_E3_STATUS = 0x3316;
241
+//constexpr uint16_t VP_E4_STATUS = 0x3318;
242
+//constexpr uint16_t VP_E5_STATUS = 0x331A;
243
+constexpr uint16_t VP_BED_STATUS = 0x331C;
244
+
245
+constexpr uint16_t VP_MOVE_OPTION = 0x3400;
246
+
247
+// Step per mm
248
+constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
249
+//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
250
+constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
251
+//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
252
+constexpr uint16_t VP_Z_STEP_PER_MM = 0x3608;
253
+//constexpr uint16_t VP_Z2_STEP_PER_MM = 0x360A;
254
+constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
255
+//constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
256
+//constexpr uint16_t VP_E2_STEP_PER_MM = 0x3614;
257
+//constexpr uint16_t VP_E3_STEP_PER_MM = 0x3616;
258
+//constexpr uint16_t VP_E4_STEP_PER_MM = 0x3618;
259
+//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
260
+
261
+// PIDs
262
+constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
263
+constexpr uint16_t VP_E0_PID_I = 0x3702;
264
+constexpr uint16_t VP_E0_PID_D = 0x3704;
265
+constexpr uint16_t VP_BED_PID_P = 0x3710;
266
+constexpr uint16_t VP_BED_PID_I = 0x3712;
267
+constexpr uint16_t VP_BED_PID_D = 0x3714;
268
+
269
+// Wating screen status
270
+constexpr uint16_t VP_WAITING_STATUS = 0x3800;
271
+
272
+// SPs for certain variables...
273
+// located at 0x5000 and up
274
+// Not used yet!
275
+// This can be used e.g to make controls / data display invisible
276
+constexpr uint16_t SP_T_E0_Is = 0x5000;
277
+constexpr uint16_t SP_T_E0_Set = 0x5010;
278
+constexpr uint16_t SP_T_E1_Is = 0x5020;
279
+constexpr uint16_t SP_T_Bed_Is = 0x5030;
280
+constexpr uint16_t SP_T_Bed_Set = 0x5040;

+ 7
- 0
Marlin/src/lcd/extensible_ui/ui_api.h View File

@@ -56,6 +56,7 @@ namespace ExtUI {
56 56
   enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5 };
57 57
   enum heater_t   : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER };
58 58
   enum fan_t      : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5 };
59
+  enum result_t   : uint8_t { PID_BAD_EXTRUDER_NUM, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE };
59 60
 
60 61
   constexpr uint8_t extruderCount = EXTRUDERS;
61 62
   constexpr uint8_t hotendCount   = HOTENDS;
@@ -318,6 +319,12 @@ namespace ExtUI {
318 319
   void onLoadSettings(const char *);
319 320
   void onConfigurationStoreWritten(bool success);
320 321
   void onConfigurationStoreRead(bool success);
322
+  #if ENABLED(POWER_LOSS_RECOVERY)
323
+    void OnPowerLossResume();
324
+  #endif
325
+  #if HAS_PID_HEATING
326
+    void OnPidTuning(const result_t rst);
327
+  #endif
321 328
 };
322 329
 
323 330
 /**

+ 66
- 5
Marlin/src/lcd/extui_dgus_lcd.cpp View File

@@ -28,7 +28,7 @@
28 28
 
29 29
 #include "../inc/MarlinConfigPre.h"
30 30
 
31
-#if ENABLED(DGUS_LCD)
31
+#if HAS_DGUS_LCD
32 32
 
33 33
 #include "extensible_ui/ui_api.h"
34 34
 #include "extensible_ui/lib/dgus/DGUSDisplay.h"
@@ -88,8 +88,69 @@ namespace ExtUI {
88 88
   void onStatusChanged(const char * const msg) { ScreenHandler.setstatusmessage(msg); }
89 89
 
90 90
   void onFactoryReset() {}
91
-  void onLoadSettings() {}
92
-  void onStoreSettings() {}
93
-}
91
+  void onStoreSettings(char *buff) {
92
+    // Called when saving to EEPROM (i.e. M500). If the ExtUI needs
93
+    // permanent data to be stored, it can write up to eeprom_data_size bytes
94
+    // into buff.
95
+
96
+    // Example:
97
+    //  static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size);
98
+    //  memcpy(buff, &myDataStruct, sizeof(myDataStruct));
99
+  }
100
+
101
+  void onLoadSettings(const char *buff) {
102
+    // Called while loading settings from EEPROM. If the ExtUI
103
+    // needs to retrieve data, it should copy up to eeprom_data_size bytes
104
+    // from buff
105
+
106
+    // Example:
107
+    //  static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size);
108
+    //  memcpy(&myDataStruct, buff, sizeof(myDataStruct));
109
+  }
110
+
111
+  void onConfigurationStoreWritten(bool success) {
112
+    // Called after the entire EEPROM has been written,
113
+    // whether successful or not.
114
+  }
115
+
116
+  void onConfigurationStoreRead(bool success) {
117
+    // Called after the entire EEPROM has been read,
118
+    // whether successful or not.
119
+  }
120
+
121
+  void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
122
+    // Called when any mesh points are updated
123
+  }
124
+
125
+  #if ENABLED(POWER_LOSS_RECOVERY)
126
+    void OnPowerLossResume() {
127
+      // Called on resume from power-loss
128
+      ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS);
129
+    }
130
+  #endif
94 131
 
95
-#endif // DGUS_LCD
132
+
133
+  #if HAS_PID_HEATING
134
+    void OnPidTuning(const result_t rst) {
135
+      // Called for temperature PID tuning result
136
+      SERIAL_ECHOLNPAIR("OnPidTuning:",rst);
137
+      switch(rst) {
138
+        case PID_BAD_EXTRUDER_NUM:
139
+          ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_BAD_EXTRUDER_NUM));
140
+          break;
141
+        case PID_TEMP_TOO_HIGH:
142
+          ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_TEMP_TOO_HIGH));
143
+          break;
144
+        case PID_TUNING_TIMEOUT:
145
+          ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_TIMEOUT));
146
+          break;
147
+        case PID_DONE:
148
+          ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_AUTOTUNE_FINISHED));
149
+          break;
150
+      }
151
+      ScreenHandler.GotoScreen(DGUSLCD_SCREEN_MAIN);
152
+    }
153
+  #endif
154
+
155
+}
156
+#endif // HAS_DGUS_LCD

+ 12
- 0
Marlin/src/lcd/extui_example.cpp View File

@@ -92,6 +92,18 @@ namespace ExtUI {
92 92
   void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
93 93
     // Called when any mesh points are updated
94 94
   }
95
+
96
+  #if ENABLED(POWER_LOSS_RECOVERY)
97
+    void OnPowerLossResume() {
98
+      // Called on resume from power-loss
99
+    }
100
+  #endif
101
+
102
+  #if HAS_PID_HEATING
103
+    void OnPidTuning(const result_t rst) {
104
+      // Called for temperature PID tuning result
105
+    }
106
+  #endif
95 107
 }
96 108
 
97 109
 #endif // EXTUI_EXAMPLE && EXTENSIBLE_UI

+ 18
- 0
Marlin/src/module/temperature.cpp View File

@@ -32,6 +32,9 @@
32 32
 #include "planner.h"
33 33
 #include "../core/language.h"
34 34
 #include "../HAL/shared/Delay.h"
35
+#if ENABLED(EXTENSIBLE_UI)
36
+  #include "../lcd/extensible_ui/ui_api.h"
37
+#endif
35 38
 
36 39
 #if ENABLED(MAX6675_IS_MAX31865)
37 40
   #include "Adafruit_MAX31865.h"
@@ -399,6 +402,9 @@ volatile bool Temperature::temp_meas_ready = false;
399 402
 
400 403
     if (target > GHV(BED_MAXTEMP - 10, temp_range[heater].maxtemp - 15)) {
401 404
       SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH);
405
+      #if ENABLED(EXTENSIBLE_UI)
406
+        ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
407
+      #endif
402 408
       return;
403 409
     }
404 410
 
@@ -512,6 +518,9 @@ volatile bool Temperature::temp_meas_ready = false;
512 518
       #endif
513 519
       if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) {
514 520
         SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH);
521
+        #if ENABLED(EXTENSIBLE_UI)
522
+          ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
523
+        #endif
515 524
         break;
516 525
       }
517 526
 
@@ -554,6 +563,9 @@ volatile bool Temperature::temp_meas_ready = false;
554 563
         #define MAX_CYCLE_TIME_PID_AUTOTUNE 20L
555 564
       #endif
556 565
       if (((ms - t1) + (ms - t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) {
566
+        #if ENABLED(EXTENSIBLE_UI)
567
+          ExtUI::OnPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT);
568
+        #endif
557 569
         SERIAL_ECHOLNPGM(MSG_PID_TIMEOUT);
558 570
         break;
559 571
       }
@@ -602,6 +614,9 @@ volatile bool Temperature::temp_meas_ready = false;
602 614
         #if ENABLED(PRINTER_EVENT_LEDS)
603 615
           printerEventLEDs.onPidTuningDone(color);
604 616
         #endif
617
+        #if ENABLED(EXTENSIBLE_UI)
618
+          ExtUI::OnPidTuning(ExtUI::result_t::PID_DONE);
619
+        #endif
605 620
 
606 621
         goto EXIT_M303;
607 622
       }
@@ -613,6 +628,9 @@ volatile bool Temperature::temp_meas_ready = false;
613 628
     #if ENABLED(PRINTER_EVENT_LEDS)
614 629
       printerEventLEDs.onPidTuningDone(color);
615 630
     #endif
631
+    #if ENABLED(EXTENSIBLE_UI)
632
+      ExtUI::OnPidTuning(ExtUI::result_t::PID_DONE);
633
+    #endif
616 634
 
617 635
     EXIT_M303:
618 636
       #if ENABLED(NO_FAN_SLOWING_IN_PID_TUNING)

+ 4
- 2
config/default/Configuration.h View File

@@ -2030,9 +2030,11 @@
2030 2030
 //=============================================================================
2031 2031
 
2032 2032
 //
2033
-// DGUS Touch Display with DWIN OS
2033
+// DGUS Touch Display with DWIN OS. (Choose one.)
2034 2034
 //
2035
-//#define DGUS_LCD
2035
+//#define DGUS_LCD_UI_ORIGIN
2036
+//#define DGUS_LCD_UI_FYSETC
2037
+//#define DGUS_LCD_UI_HIPRECY
2036 2038
 
2037 2039
 //
2038 2040
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/default/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/3DFabXYZ/Migbot/Configuration.h View File

@@ -2062,9 +2062,11 @@
2062 2062
 //=============================================================================
2063 2063
 
2064 2064
 //
2065
-// DGUS Touch Display with DWIN OS
2065
+// DGUS Touch Display with DWIN OS. (Choose one.)
2066 2066
 //
2067
-//#define DGUS_LCD
2067
+//#define DGUS_LCD_UI_ORIGIN
2068
+//#define DGUS_LCD_UI_FYSETC
2069
+//#define DGUS_LCD_UI_HIPRECY
2068 2070
 
2069 2071
 //
2070 2072
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/3DFabXYZ/Migbot/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/ADIMLab/Gantry v1/Configuration.h View File

@@ -2031,9 +2031,11 @@
2031 2031
 //=============================================================================
2032 2032
 
2033 2033
 //
2034
-// DGUS Touch Display with DWIN OS
2034
+// DGUS Touch Display with DWIN OS. (Choose one.)
2035 2035
 //
2036
-//#define DGUS_LCD
2036
+//#define DGUS_LCD_UI_ORIGIN
2037
+//#define DGUS_LCD_UI_FYSETC
2038
+//#define DGUS_LCD_UI_HIPRECY
2037 2039
 
2038 2040
 //
2039 2041
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/ADIMLab/Gantry v1/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/ADIMLab/Gantry v2/Configuration.h View File

@@ -2031,9 +2031,11 @@
2031 2031
 //=============================================================================
2032 2032
 
2033 2033
 //
2034
-// DGUS Touch Display with DWIN OS
2034
+// DGUS Touch Display with DWIN OS. (Choose one.)
2035 2035
 //
2036
-//#define DGUS_LCD
2036
+//#define DGUS_LCD_UI_ORIGIN
2037
+//#define DGUS_LCD_UI_FYSETC
2038
+//#define DGUS_LCD_UI_HIPRECY
2037 2039
 
2038 2040
 //
2039 2041
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/ADIMLab/Gantry v2/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/AlephObjects/TAZ4/Configuration.h View File

@@ -2050,9 +2050,11 @@
2050 2050
 //=============================================================================
2051 2051
 
2052 2052
 //
2053
-// DGUS Touch Display with DWIN OS
2053
+// DGUS Touch Display with DWIN OS. (Choose one.)
2054 2054
 //
2055
-//#define DGUS_LCD
2055
+//#define DGUS_LCD_UI_ORIGIN
2056
+//#define DGUS_LCD_UI_FYSETC
2057
+//#define DGUS_LCD_UI_HIPRECY
2056 2058
 
2057 2059
 //
2058 2060
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Alfawise/U20-bltouch/Configuration.h View File

@@ -2110,9 +2110,11 @@
2110 2110
 //=============================================================================
2111 2111
 
2112 2112
 //
2113
-// DGUS Touch Display with DWIN OS
2113
+// DGUS Touch Display with DWIN OS. (Choose one.)
2114 2114
 //
2115
-//#define DGUS_LCD
2115
+//#define DGUS_LCD_UI_ORIGIN
2116
+//#define DGUS_LCD_UI_FYSETC
2117
+//#define DGUS_LCD_UI_HIPRECY
2116 2118
 
2117 2119
 //
2118 2120
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Alfawise/U20-bltouch/Configuration_adv.h View File

@@ -1245,6 +1245,44 @@
1245 1245
 #endif // HAS_GRAPHICAL_LCD
1246 1246
 
1247 1247
 //
1248
+// Additional options for DGUS / DWIN displays
1249
+//
1250
+#if HAS_DGUS_LCD
1251
+  #define DGUS_SERIAL_PORT 2
1252
+  #define DGUS_BAUDRATE 115200
1253
+
1254
+  #define DGUS_RX_BUFFER_SIZE 128
1255
+  #define DGUS_TX_BUFFER_SIZE 48
1256
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1257
+
1258
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1259
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1260
+
1261
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1262
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1263
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1264
+
1265
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1266
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1267
+    #else
1268
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1269
+    #endif
1270
+
1271
+    #define DGUS_FILAMENT_LOADUNLOAD
1272
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1273
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1274
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1275
+    #endif
1276
+
1277
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1278
+    #if ENABLED(DGUS_UI_WAITING)
1279
+      #define DGUS_UI_WAITING_STATUS 10
1280
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1281
+    #endif
1282
+  #endif
1283
+#endif // HAS_DGUS_LCD
1284
+
1285
+//
1248 1286
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1249 1287
 //
1250 1288
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Alfawise/U20/Configuration.h View File

@@ -2109,9 +2109,11 @@
2109 2109
 //=============================================================================
2110 2110
 
2111 2111
 //
2112
-// DGUS Touch Display with DWIN OS
2112
+// DGUS Touch Display with DWIN OS. (Choose one.)
2113 2113
 //
2114
-//#define DGUS_LCD
2114
+//#define DGUS_LCD_UI_ORIGIN
2115
+//#define DGUS_LCD_UI_FYSETC
2116
+//#define DGUS_LCD_UI_HIPRECY
2115 2117
 
2116 2118
 //
2117 2119
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Alfawise/U20/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/AliExpress/CL-260/Configuration.h View File

@@ -2030,9 +2030,11 @@
2030 2030
 //=============================================================================
2031 2031
 
2032 2032
 //
2033
-// DGUS Touch Display with DWIN OS
2033
+// DGUS Touch Display with DWIN OS. (Choose one.)
2034 2034
 //
2035
-//#define DGUS_LCD
2035
+//#define DGUS_LCD_UI_ORIGIN
2036
+//#define DGUS_LCD_UI_FYSETC
2037
+//#define DGUS_LCD_UI_HIPRECY
2036 2038
 
2037 2039
 //
2038 2040
 // Touch-screen LCD for Malyan M200 printers

+ 4
- 2
config/examples/AliExpress/UM2pExt/Configuration.h View File

@@ -2041,9 +2041,11 @@
2041 2041
 //=============================================================================
2042 2042
 
2043 2043
 //
2044
-// DGUS Touch Display with DWIN OS
2044
+// DGUS Touch Display with DWIN OS. (Choose one.)
2045 2045
 //
2046
-//#define DGUS_LCD
2046
+//#define DGUS_LCD_UI_ORIGIN
2047
+//#define DGUS_LCD_UI_FYSETC
2048
+//#define DGUS_LCD_UI_HIPRECY
2047 2049
 
2048 2050
 //
2049 2051
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/AliExpress/UM2pExt/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Anet/A2/Configuration.h View File

@@ -2032,9 +2032,11 @@
2032 2032
 //=============================================================================
2033 2033
 
2034 2034
 //
2035
-// DGUS Touch Display with DWIN OS
2035
+// DGUS Touch Display with DWIN OS. (Choose one.)
2036 2036
 //
2037
-//#define DGUS_LCD
2037
+//#define DGUS_LCD_UI_ORIGIN
2038
+//#define DGUS_LCD_UI_FYSETC
2039
+//#define DGUS_LCD_UI_HIPRECY
2038 2040
 
2039 2041
 //
2040 2042
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Anet/A2/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Anet/A2plus/Configuration.h View File

@@ -2032,9 +2032,11 @@
2032 2032
 //=============================================================================
2033 2033
 
2034 2034
 //
2035
-// DGUS Touch Display with DWIN OS
2035
+// DGUS Touch Display with DWIN OS. (Choose one.)
2036 2036
 //
2037
-//#define DGUS_LCD
2037
+//#define DGUS_LCD_UI_ORIGIN
2038
+//#define DGUS_LCD_UI_FYSETC
2039
+//#define DGUS_LCD_UI_HIPRECY
2038 2040
 
2039 2041
 //
2040 2042
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Anet/A2plus/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Anet/A6/Configuration.h View File

@@ -2147,9 +2147,11 @@
2147 2147
 //=============================================================================
2148 2148
 
2149 2149
 //
2150
-// DGUS Touch Display with DWIN OS
2150
+// DGUS Touch Display with DWIN OS. (Choose one.)
2151 2151
 //
2152
-//#define DGUS_LCD
2152
+//#define DGUS_LCD_UI_ORIGIN
2153
+//#define DGUS_LCD_UI_FYSETC
2154
+//#define DGUS_LCD_UI_HIPRECY
2153 2155
 
2154 2156
 //
2155 2157
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Anet/A6/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Anet/A8/Configuration.h View File

@@ -2058,9 +2058,11 @@
2058 2058
 //=============================================================================
2059 2059
 
2060 2060
 //
2061
-// DGUS Touch Display with DWIN OS
2061
+// DGUS Touch Display with DWIN OS. (Choose one.)
2062 2062
 //
2063
-//#define DGUS_LCD
2063
+//#define DGUS_LCD_UI_ORIGIN
2064
+//#define DGUS_LCD_UI_FYSETC
2065
+//#define DGUS_LCD_UI_HIPRECY
2064 2066
 
2065 2067
 //
2066 2068
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Anet/A8/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Anet/A8plus/Configuration.h View File

@@ -2041,9 +2041,11 @@
2041 2041
 //=============================================================================
2042 2042
 
2043 2043
 //
2044
-// DGUS Touch Display with DWIN OS
2044
+// DGUS Touch Display with DWIN OS. (Choose one.)
2045 2045
 //
2046
-//#define DGUS_LCD
2046
+//#define DGUS_LCD_UI_ORIGIN
2047
+//#define DGUS_LCD_UI_FYSETC
2048
+//#define DGUS_LCD_UI_HIPRECY
2047 2049
 
2048 2050
 //
2049 2051
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Anet/A8plus/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Anet/E10/Configuration.h View File

@@ -2033,9 +2033,11 @@
2033 2033
 //=============================================================================
2034 2034
 
2035 2035
 //
2036
-// DGUS Touch Display with DWIN OS
2036
+// DGUS Touch Display with DWIN OS. (Choose one.)
2037 2037
 //
2038
-//#define DGUS_LCD
2038
+//#define DGUS_LCD_UI_ORIGIN
2039
+//#define DGUS_LCD_UI_FYSETC
2040
+//#define DGUS_LCD_UI_HIPRECY
2039 2041
 
2040 2042
 //
2041 2043
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Anet/E10/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Anet/E16/Configuration.h View File

@@ -2042,9 +2042,11 @@
2042 2042
 //=============================================================================
2043 2043
 
2044 2044
 //
2045
-// DGUS Touch Display with DWIN OS
2045
+// DGUS Touch Display with DWIN OS. (Choose one.)
2046 2046
 //
2047
-//#define DGUS_LCD
2047
+//#define DGUS_LCD_UI_ORIGIN
2048
+//#define DGUS_LCD_UI_FYSETC
2049
+//#define DGUS_LCD_UI_HIPRECY
2048 2050
 
2049 2051
 //
2050 2052
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Anet/E16/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/AnyCubic/i3/Configuration.h View File

@@ -2040,9 +2040,11 @@
2040 2040
 //=============================================================================
2041 2041
 
2042 2042
 //
2043
-// DGUS Touch Display with DWIN OS
2043
+// DGUS Touch Display with DWIN OS. (Choose one.)
2044 2044
 //
2045
-//#define DGUS_LCD
2045
+//#define DGUS_LCD_UI_ORIGIN
2046
+//#define DGUS_LCD_UI_FYSETC
2047
+//#define DGUS_LCD_UI_HIPRECY
2046 2048
 
2047 2049
 //
2048 2050
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/AnyCubic/i3/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/ArmEd/Configuration.h View File

@@ -2031,9 +2031,11 @@
2031 2031
 //=============================================================================
2032 2032
 
2033 2033
 //
2034
-// DGUS Touch Display with DWIN OS
2034
+// DGUS Touch Display with DWIN OS. (Choose one.)
2035 2035
 //
2036
-//#define DGUS_LCD
2036
+//#define DGUS_LCD_UI_ORIGIN
2037
+//#define DGUS_LCD_UI_FYSETC
2038
+//#define DGUS_LCD_UI_HIPRECY
2037 2039
 
2038 2040
 //
2039 2041
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/ArmEd/Configuration_adv.h View File

@@ -1248,6 +1248,44 @@
1248 1248
 #endif // HAS_GRAPHICAL_LCD
1249 1249
 
1250 1250
 //
1251
+// Additional options for DGUS / DWIN displays
1252
+//
1253
+#if HAS_DGUS_LCD
1254
+  #define DGUS_SERIAL_PORT 2
1255
+  #define DGUS_BAUDRATE 115200
1256
+
1257
+  #define DGUS_RX_BUFFER_SIZE 128
1258
+  #define DGUS_TX_BUFFER_SIZE 48
1259
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1260
+
1261
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1262
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1263
+
1264
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1265
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1266
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1267
+
1268
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1269
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1270
+    #else
1271
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1272
+    #endif
1273
+
1274
+    #define DGUS_FILAMENT_LOADUNLOAD
1275
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1276
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1277
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1278
+    #endif
1279
+
1280
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1281
+    #if ENABLED(DGUS_UI_WAITING)
1282
+      #define DGUS_UI_WAITING_STATUS 10
1283
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1284
+    #endif
1285
+  #endif
1286
+#endif // HAS_DGUS_LCD
1287
+
1288
+//
1251 1289
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1252 1290
 //
1253 1291
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Artillery/Genius/Configuration.h View File

@@ -2013,9 +2013,11 @@
2013 2013
 //=============================================================================
2014 2014
 
2015 2015
 //
2016
-// DGUS Touch Display with DWIN OS
2016
+// DGUS Touch Display with DWIN OS. (Choose one.)
2017 2017
 //
2018
-//#define DGUS_LCD
2018
+//#define DGUS_LCD_UI_ORIGIN
2019
+//#define DGUS_LCD_UI_FYSETC
2020
+//#define DGUS_LCD_UI_HIPRECY
2019 2021
 
2020 2022
 //
2021 2023
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Artillery/Genius/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Artillery/Sidewinder X1/Configuration.h View File

@@ -2035,9 +2035,11 @@
2035 2035
 //=============================================================================
2036 2036
 
2037 2037
 //
2038
-// DGUS Touch Display with DWIN OS
2038
+// DGUS Touch Display with DWIN OS. (Choose one.)
2039 2039
 //
2040
-//#define DGUS_LCD
2040
+//#define DGUS_LCD_UI_ORIGIN
2041
+//#define DGUS_LCD_UI_FYSETC
2042
+//#define DGUS_LCD_UI_HIPRECY
2041 2043
 
2042 2044
 //
2043 2045
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Artillery/Sidewinder X1/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Azteeg/X5GT/Configuration.h View File

@@ -2030,9 +2030,11 @@
2030 2030
 //=============================================================================
2031 2031
 
2032 2032
 //
2033
-// DGUS Touch Display with DWIN OS
2033
+// DGUS Touch Display with DWIN OS. (Choose one.)
2034 2034
 //
2035
-//#define DGUS_LCD
2035
+//#define DGUS_LCD_UI_ORIGIN
2036
+//#define DGUS_LCD_UI_FYSETC
2037
+//#define DGUS_LCD_UI_HIPRECY
2036 2038
 
2037 2039
 //
2038 2040
 // Touch-screen LCD for Malyan M200 printers

+ 4
- 2
config/examples/BIBO/TouchX/cyclops/Configuration.h View File

@@ -2030,9 +2030,11 @@
2030 2030
 //=============================================================================
2031 2031
 
2032 2032
 //
2033
-// DGUS Touch Display with DWIN OS
2033
+// DGUS Touch Display with DWIN OS. (Choose one.)
2034 2034
 //
2035
-//#define DGUS_LCD
2035
+//#define DGUS_LCD_UI_ORIGIN
2036
+//#define DGUS_LCD_UI_FYSETC
2037
+//#define DGUS_LCD_UI_HIPRECY
2036 2038
 
2037 2039
 //
2038 2040
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/BIBO/TouchX/default/Configuration.h View File

@@ -2030,9 +2030,11 @@
2030 2030
 //=============================================================================
2031 2031
 
2032 2032
 //
2033
-// DGUS Touch Display with DWIN OS
2033
+// DGUS Touch Display with DWIN OS. (Choose one.)
2034 2034
 //
2035
-//#define DGUS_LCD
2035
+//#define DGUS_LCD_UI_ORIGIN
2036
+//#define DGUS_LCD_UI_FYSETC
2037
+//#define DGUS_LCD_UI_HIPRECY
2036 2038
 
2037 2039
 //
2038 2040
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/BQ/Hephestos/Configuration.h View File

@@ -2018,9 +2018,11 @@
2018 2018
 //=============================================================================
2019 2019
 
2020 2020
 //
2021
-// DGUS Touch Display with DWIN OS
2021
+// DGUS Touch Display with DWIN OS. (Choose one.)
2022 2022
 //
2023
-//#define DGUS_LCD
2023
+//#define DGUS_LCD_UI_ORIGIN
2024
+//#define DGUS_LCD_UI_FYSETC
2025
+//#define DGUS_LCD_UI_HIPRECY
2024 2026
 
2025 2027
 //
2026 2028
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/BQ/Hephestos/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/BQ/Hephestos_2/Configuration.h View File

@@ -2031,9 +2031,11 @@
2031 2031
 //=============================================================================
2032 2032
 
2033 2033
 //
2034
-// DGUS Touch Display with DWIN OS
2034
+// DGUS Touch Display with DWIN OS. (Choose one.)
2035 2035
 //
2036
-//#define DGUS_LCD
2036
+//#define DGUS_LCD_UI_ORIGIN
2037
+//#define DGUS_LCD_UI_FYSETC
2038
+//#define DGUS_LCD_UI_HIPRECY
2037 2039
 
2038 2040
 //
2039 2041
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@@ -1252,6 +1252,44 @@
1252 1252
 #endif // HAS_GRAPHICAL_LCD
1253 1253
 
1254 1254
 //
1255
+// Additional options for DGUS / DWIN displays
1256
+//
1257
+#if HAS_DGUS_LCD
1258
+  #define DGUS_SERIAL_PORT 2
1259
+  #define DGUS_BAUDRATE 115200
1260
+
1261
+  #define DGUS_RX_BUFFER_SIZE 128
1262
+  #define DGUS_TX_BUFFER_SIZE 48
1263
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1264
+
1265
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1266
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1267
+
1268
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1269
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1270
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1271
+
1272
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1273
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1274
+    #else
1275
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1276
+    #endif
1277
+
1278
+    #define DGUS_FILAMENT_LOADUNLOAD
1279
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1280
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1281
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1282
+    #endif
1283
+
1284
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1285
+    #if ENABLED(DGUS_UI_WAITING)
1286
+      #define DGUS_UI_WAITING_STATUS 10
1287
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1288
+    #endif
1289
+  #endif
1290
+#endif // HAS_DGUS_LCD
1291
+
1292
+//
1255 1293
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1256 1294
 //
1257 1295
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/BQ/WITBOX/Configuration.h View File

@@ -2018,9 +2018,11 @@
2018 2018
 //=============================================================================
2019 2019
 
2020 2020
 //
2021
-// DGUS Touch Display with DWIN OS
2021
+// DGUS Touch Display with DWIN OS. (Choose one.)
2022 2022
 //
2023
-//#define DGUS_LCD
2023
+//#define DGUS_LCD_UI_ORIGIN
2024
+//#define DGUS_LCD_UI_FYSETC
2025
+//#define DGUS_LCD_UI_HIPRECY
2024 2026
 
2025 2027
 //
2026 2028
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/BQ/WITBOX/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/BigTreeTech/SKR Mini E3 1.0/Configuration.h View File

@@ -2022,9 +2022,11 @@
2022 2022
 //=============================================================================
2023 2023
 
2024 2024
 //
2025
-// DGUS Touch Display with DWIN OS
2025
+// DGUS Touch Display with DWIN OS. (Choose one.)
2026 2026
 //
2027
-//#define DGUS_LCD
2027
+//#define DGUS_LCD_UI_ORIGIN
2028
+//#define DGUS_LCD_UI_FYSETC
2029
+//#define DGUS_LCD_UI_HIPRECY
2028 2030
 
2029 2031
 //
2030 2032
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/BigTreeTech/SKR Mini E3 1.0/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/BigTreeTech/SKR Mini E3 1.2/Configuration.h View File

@@ -2023,9 +2023,11 @@
2023 2023
 //=============================================================================
2024 2024
 
2025 2025
 //
2026
-// DGUS Touch Display with DWIN OS
2026
+// DGUS Touch Display with DWIN OS. (Choose one.)
2027 2027
 //
2028
-//#define DGUS_LCD
2028
+//#define DGUS_LCD_UI_ORIGIN
2029
+//#define DGUS_LCD_UI_FYSETC
2030
+//#define DGUS_LCD_UI_HIPRECY
2029 2031
 
2030 2032
 //
2031 2033
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/BigTreeTech/SKR Mini E3 1.2/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Cartesio/Configuration.h View File

@@ -2029,9 +2029,11 @@
2029 2029
 //=============================================================================
2030 2030
 
2031 2031
 //
2032
-// DGUS Touch Display with DWIN OS
2032
+// DGUS Touch Display with DWIN OS. (Choose one.)
2033 2033
 //
2034
-//#define DGUS_LCD
2034
+//#define DGUS_LCD_UI_ORIGIN
2035
+//#define DGUS_LCD_UI_FYSETC
2036
+//#define DGUS_LCD_UI_HIPRECY
2035 2037
 
2036 2038
 //
2037 2039
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Cartesio/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Creality/CR-10/Configuration.h View File

@@ -2040,9 +2040,11 @@
2040 2040
 //=============================================================================
2041 2041
 
2042 2042
 //
2043
-// DGUS Touch Display with DWIN OS
2043
+// DGUS Touch Display with DWIN OS. (Choose one.)
2044 2044
 //
2045
-//#define DGUS_LCD
2045
+//#define DGUS_LCD_UI_ORIGIN
2046
+//#define DGUS_LCD_UI_FYSETC
2047
+//#define DGUS_LCD_UI_HIPRECY
2046 2048
 
2047 2049
 //
2048 2050
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Creality/CR-10/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Creality/CR-10S/Configuration.h View File

@@ -2031,9 +2031,11 @@
2031 2031
 //=============================================================================
2032 2032
 
2033 2033
 //
2034
-// DGUS Touch Display with DWIN OS
2034
+// DGUS Touch Display with DWIN OS. (Choose one.)
2035 2035
 //
2036
-//#define DGUS_LCD
2036
+//#define DGUS_LCD_UI_ORIGIN
2037
+//#define DGUS_LCD_UI_FYSETC
2038
+//#define DGUS_LCD_UI_HIPRECY
2037 2039
 
2038 2040
 //
2039 2041
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Creality/CR-10S/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Creality/CR-10_5S/Configuration.h View File

@@ -2033,9 +2033,11 @@
2033 2033
 //=============================================================================
2034 2034
 
2035 2035
 //
2036
-// DGUS Touch Display with DWIN OS
2036
+// DGUS Touch Display with DWIN OS. (Choose one.)
2037 2037
 //
2038
-//#define DGUS_LCD
2038
+//#define DGUS_LCD_UI_ORIGIN
2039
+//#define DGUS_LCD_UI_FYSETC
2040
+//#define DGUS_LCD_UI_HIPRECY
2039 2041
 
2040 2042
 //
2041 2043
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Creality/CR-10_5S/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Creality/CR-10mini/Configuration.h View File

@@ -2049,9 +2049,11 @@
2049 2049
 //=============================================================================
2050 2050
 
2051 2051
 //
2052
-// DGUS Touch Display with DWIN OS
2052
+// DGUS Touch Display with DWIN OS. (Choose one.)
2053 2053
 //
2054
-//#define DGUS_LCD
2054
+//#define DGUS_LCD_UI_ORIGIN
2055
+//#define DGUS_LCD_UI_FYSETC
2056
+//#define DGUS_LCD_UI_HIPRECY
2055 2057
 
2056 2058
 //
2057 2059
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Creality/CR-10mini/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Creality/CR-20 Pro/Configuration.h View File

@@ -2034,9 +2034,11 @@
2034 2034
 //=============================================================================
2035 2035
 
2036 2036
 //
2037
-// DGUS Touch Display with DWIN OS
2037
+// DGUS Touch Display with DWIN OS. (Choose one.)
2038 2038
 //
2039
-//#define DGUS_LCD
2039
+//#define DGUS_LCD_UI_ORIGIN
2040
+//#define DGUS_LCD_UI_FYSETC
2041
+//#define DGUS_LCD_UI_HIPRECY
2040 2042
 
2041 2043
 //
2042 2044
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Creality/CR-20 Pro/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Creality/CR-20/Configuration.h View File

@@ -2034,9 +2034,11 @@
2034 2034
 //=============================================================================
2035 2035
 
2036 2036
 //
2037
-// DGUS Touch Display with DWIN OS
2037
+// DGUS Touch Display with DWIN OS. (Choose one.)
2038 2038
 //
2039
-//#define DGUS_LCD
2039
+//#define DGUS_LCD_UI_ORIGIN
2040
+//#define DGUS_LCD_UI_FYSETC
2041
+//#define DGUS_LCD_UI_HIPRECY
2040 2042
 
2041 2043
 //
2042 2044
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Creality/CR-20/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 2
config/examples/Creality/CR-8/Configuration.h View File

@@ -2040,9 +2040,11 @@
2040 2040
 //=============================================================================
2041 2041
 
2042 2042
 //
2043
-// DGUS Touch Display with DWIN OS
2043
+// DGUS Touch Display with DWIN OS. (Choose one.)
2044 2044
 //
2045
-//#define DGUS_LCD
2045
+//#define DGUS_LCD_UI_ORIGIN
2046
+//#define DGUS_LCD_UI_FYSETC
2047
+//#define DGUS_LCD_UI_HIPRECY
2046 2048
 
2047 2049
 //
2048 2050
 // Touch-screen LCD for Malyan M200 printers

+ 38
- 0
config/examples/Creality/CR-8/Configuration_adv.h View File

@@ -1244,6 +1244,44 @@
1244 1244
 #endif // HAS_GRAPHICAL_LCD
1245 1245
 
1246 1246
 //
1247
+// Additional options for DGUS / DWIN displays
1248
+//
1249
+#if HAS_DGUS_LCD
1250
+  #define DGUS_SERIAL_PORT 2
1251
+  #define DGUS_BAUDRATE 115200
1252
+
1253
+  #define DGUS_RX_BUFFER_SIZE 128
1254
+  #define DGUS_TX_BUFFER_SIZE 48
1255
+  //#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS  // Fix Rx overrun situation (Currently only for AVR)
1256
+
1257
+  #define DGUS_UPDATE_INTERVAL_MS  500    // (ms) Interval between automatic screen updates
1258
+  #define BOOTSCREEN_TIMEOUT      3000    // (ms) Duration to display the boot screen
1259
+
1260
+  #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1261
+    #define DGUS_PRINT_FILENAME           // Display the filename during printing
1262
+    #define DGUS_PREHEAT_UI               // Display a preheat screen during heatup
1263
+
1264
+    #if ENABLED(DGUS_LCD_UI_FYSETC)
1265
+      //#define DUGS_UI_MOVE_DIS_OPTION   // Disabled by default for UI_FYSETC
1266
+    #else
1267
+      #define DUGS_UI_MOVE_DIS_OPTION     // Enabled by default for UI_HIPRECY
1268
+    #endif
1269
+
1270
+    #define DGUS_FILAMENT_LOADUNLOAD
1271
+    #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1272
+      #define DGUS_FILAMENT_PURGE_LENGTH 10
1273
+      #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1274
+    #endif
1275
+
1276
+    #define DGUS_UI_WAITING               // Show a "waiting" screen between some screens
1277
+    #if ENABLED(DGUS_UI_WAITING)
1278
+      #define DGUS_UI_WAITING_STATUS 10
1279
+      #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1280
+    #endif
1281
+  #endif
1282
+#endif // HAS_DGUS_LCD
1283
+
1284
+//
1247 1285
 // Touch UI for the FTDI Embedded Video Engine (EVE)
1248 1286
 //
1249 1287
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 0
- 0
config/examples/Creality/Ender-2/Configuration.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save