Ver código fonte

🎨 Misc. DGUS cleanup

Scott Lahteine 3 anos atrás
pai
commit
3d2b2ca790

+ 17
- 11
Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp Ver arquivo

46
 
46
 
47
 DGUSDisplay dgusdisplay;
47
 DGUSDisplay dgusdisplay;
48
 
48
 
49
+#ifdef DEBUG_DGUSLCD_COMM
50
+  #define DEBUGLCDCOMM_ECHOPGM DEBUG_ECHOPGM
51
+#else
52
+  #define DEBUGLCDCOMM_ECHOPGM(...) NOOP
53
+#endif
54
+
49
 // Preamble... 2 Bytes, usually 0x5A 0xA5, but configurable
55
 // Preamble... 2 Bytes, usually 0x5A 0xA5, but configurable
50
 constexpr uint8_t DGUS_HEADER1 = 0x5A;
56
 constexpr uint8_t DGUS_HEADER1 = 0x5A;
51
 constexpr uint8_t DGUS_HEADER2 = 0xA5;
57
 constexpr uint8_t DGUS_HEADER2 = 0xA5;
154
 
160
 
155
       case DGUS_IDLE: // Waiting for the first header byte
161
       case DGUS_IDLE: // Waiting for the first header byte
156
         receivedbyte = LCD_SERIAL.read();
162
         receivedbyte = LCD_SERIAL.read();
157
-        //DEBUG_ECHOPGM("< ",x);
163
+        //DEBUGLCDCOMM_ECHOPGM("< ", receivedbyte);
158
         if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN;
164
         if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN;
159
         break;
165
         break;
160
 
166
 
161
       case DGUS_HEADER1_SEEN: // Waiting for the second header byte
167
       case DGUS_HEADER1_SEEN: // Waiting for the second header byte
162
         receivedbyte = LCD_SERIAL.read();
168
         receivedbyte = LCD_SERIAL.read();
163
-        //DEBUG_ECHOPGM(" ",x);
169
+        //DEBUGLCDCOMM_ECHOPGM(" ", receivedbyte);
164
         rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE;
170
         rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE;
165
         break;
171
         break;
166
 
172
 
167
       case DGUS_HEADER2_SEEN: // Waiting for the length byte
173
       case DGUS_HEADER2_SEEN: // Waiting for the length byte
168
         rx_datagram_len = LCD_SERIAL.read();
174
         rx_datagram_len = LCD_SERIAL.read();
169
-        DEBUG_ECHOPGM(" (", rx_datagram_len, ") ");
175
+        //DEBUGLCDCOMM_ECHOPGM(" (", rx_datagram_len, ") ");
170
 
176
 
171
         // Telegram min len is 3 (command and one word of payload)
177
         // Telegram min len is 3 (command and one word of payload)
172
         rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE;
178
         rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE;
178
         Initialized = true; // We've talked to it, so we defined it as initialized.
184
         Initialized = true; // We've talked to it, so we defined it as initialized.
179
         uint8_t command = LCD_SERIAL.read();
185
         uint8_t command = LCD_SERIAL.read();
180
 
186
 
181
-        DEBUG_ECHOPGM("# ", command);
187
+        //DEBUGLCDCOMM_ECHOPGM("# ", command);
182
 
188
 
183
         uint8_t readlen = rx_datagram_len - 1;  // command is part of len.
189
         uint8_t readlen = rx_datagram_len - 1;  // command is part of len.
184
         unsigned char tmp[rx_datagram_len - 1];
190
         unsigned char tmp[rx_datagram_len - 1];
185
         unsigned char *ptmp = tmp;
191
         unsigned char *ptmp = tmp;
186
         while (readlen--) {
192
         while (readlen--) {
187
           receivedbyte = LCD_SERIAL.read();
193
           receivedbyte = LCD_SERIAL.read();
188
-          DEBUG_ECHOPGM(" ", receivedbyte);
194
+          //DEBUGLCDCOMM_ECHOPGM(" ", receivedbyte);
189
           *ptmp++ = receivedbyte;
195
           *ptmp++ = receivedbyte;
190
         }
196
         }
191
-        DEBUG_ECHOPGM(" # ");
197
+        //DEBUGLCDCOMM_ECHOPGM(" # ");
192
         // mostly we'll get this: 5A A5 03 82 4F 4B -- ACK on 0x82, so discard it.
198
         // mostly we'll get this: 5A A5 03 82 4F 4B -- ACK on 0x82, so discard it.
193
         if (command == DGUS_CMD_WRITEVAR && 'O' == tmp[0] && 'K' == tmp[1]) {
199
         if (command == DGUS_CMD_WRITEVAR && 'O' == tmp[0] && 'K' == tmp[1]) {
194
-          DEBUG_ECHOLNPGM(">");
200
+          //DEBUGLCDCOMM_ECHOPGM(">");
195
           rx_datagram_state = DGUS_IDLE;
201
           rx_datagram_state = DGUS_IDLE;
196
           break;
202
           break;
197
         }
203
         }
253
 
259
 
254
 rx_datagram_state_t DGUSDisplay::rx_datagram_state = DGUS_IDLE;
260
 rx_datagram_state_t DGUSDisplay::rx_datagram_state = DGUS_IDLE;
255
 uint8_t DGUSDisplay::rx_datagram_len = 0;
261
 uint8_t DGUSDisplay::rx_datagram_len = 0;
256
-bool DGUSDisplay::Initialized = false;
257
-bool DGUSDisplay::no_reentrance = false;
262
+bool DGUSDisplay::Initialized = false,
263
+     DGUSDisplay::no_reentrance = false;
258
 
264
 
259
 // A SW memory barrier, to ensure GCC does not overoptimize loops
265
 // A SW memory barrier, to ensure GCC does not overoptimize loops
260
 #define sw_barrier() asm volatile("": : :"memory");
266
 #define sw_barrier() asm volatile("": : :"memory");
261
 
267
 
262
 bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
268
 bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
263
-  // DEBUG_ECHOPGM("populate_VPVar ", VP);
269
+  //DEBUG_ECHOPGM("populate_VPVar ", VP);
264
   const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP);
270
   const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP);
265
-  // DEBUG_ECHOLNPGM(" pvp ", (uint16_t )pvp);
271
+  //DEBUG_ECHOLNPGM(" pvp ", (uint16_t )pvp);
266
   if (!pvp) return false;
272
   if (!pvp) return false;
267
   memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable));
273
   memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable));
268
   return true;
274
   return true;

+ 3
- 0
Marlin/src/lcd/extui/dgus/DGUSDisplay.h Ver arquivo

29
 
29
 
30
 #include <stdlib.h>    // size_t
30
 #include <stdlib.h>    // size_t
31
 
31
 
32
+//#define DEBUG_DGUSLCD
33
+//#define DEBUG_DGUSLCD_COMM
34
+
32
 #if HAS_BED_PROBE
35
 #if HAS_BED_PROBE
33
   #include "../../../module/probe.h"
36
   #include "../../../module/probe.h"
34
 #endif
37
 #endif

+ 10
- 7
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp Ver arquivo

55
 #if ENABLED(SDSUPPORT)
55
 #if ENABLED(SDSUPPORT)
56
   int16_t DGUSScreenHandler::top_file = 0,
56
   int16_t DGUSScreenHandler::top_file = 0,
57
           DGUSScreenHandler::file_to_print = 0;
57
           DGUSScreenHandler::file_to_print = 0;
58
-  static ExtUI::FileList filelist;
58
+  ExtUI::FileList filelist;
59
 #endif
59
 #endif
60
 
60
 
61
 #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
61
 #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
62
   filament_data_t filament_data;
62
   filament_data_t filament_data;
63
 #endif
63
 #endif
64
 
64
 
65
-void DGUSScreenHandler::sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) {
65
+void DGUSScreenHandler::sendinfoscreen(PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) {
66
   DGUS_VP_Variable ramcopy;
66
   DGUS_VP_Variable ramcopy;
67
   if (populate_VPVar(VP_MSGSTR1, &ramcopy)) {
67
   if (populate_VPVar(VP_MSGSTR1, &ramcopy)) {
68
     ramcopy.memadr = (void*) line1;
68
     ramcopy.memadr = (void*) line1;
76
     ramcopy.memadr = (void*) line3;
76
     ramcopy.memadr = (void*) line3;
77
     l3inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
77
     l3inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
78
   }
78
   }
79
-  if (populate_VPVar(VP_MSGSTR4, &ramcopy)) {
80
-    ramcopy.memadr = (void*) line4;
81
-    l4inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
82
-  }
79
+  #ifdef VP_MSGSTR4
80
+    if (populate_VPVar(VP_MSGSTR4, &ramcopy)) {
81
+      ramcopy.memadr = (void*) line4;
82
+      l4inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
83
+    }
84
+  #endif
83
 }
85
 }
84
 
86
 
85
-void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1, bool l2, bool l3, bool l4) {
87
+void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1, bool l2, bool l3, bool l4) {
86
   if (current_screen == DGUSLCD_SCREEN_CONFIRM) // Already showing a pop up, so we need to cancel that first.
88
   if (current_screen == DGUSLCD_SCREEN_CONFIRM) // Already showing a pop up, so we need to cancel that first.
87
     PopToOldScreen();
89
     PopToOldScreen();
88
 
90
 
344
     SetupConfirmAction(nullptr);
346
     SetupConfirmAction(nullptr);
345
     GotoScreen(DGUSLCD_SCREEN_POPUP);
347
     GotoScreen(DGUSLCD_SCREEN_POPUP);
346
   }
348
   }
349
+
347
 #endif // SDSUPPORT
350
 #endif // SDSUPPORT
348
 
351
 
349
 void DGUSScreenHandler::ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr) {
352
 void DGUSScreenHandler::ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr) {

+ 1
- 1
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp Ver arquivo

42
 
42
 
43
 #if ENABLED(SDSUPPORT)
43
 #if ENABLED(SDSUPPORT)
44
 
44
 
45
-  static ExtUI::FileList filelist;
45
+  extern ExtUI::FileList filelist;
46
 
46
 
47
   void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
47
   void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
48
     uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;
48
     uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;

+ 3
- 3
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h Ver arquivo

37
 
37
 
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39
   // The bools specifying whether the strings are in RAM or FLASH.
39
   // The bools specifying whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
-  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
40
+  static void sendinfoscreen(PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
+  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
43
   }
43
   }
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
46
   }
46
   }
47
 
47
 
48
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
48
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
49
 
49
 
50
   // "M117" Message -- msg is a RAM ptr.
50
   // "M117" Message -- msg is a RAM ptr.
51
   static void setstatusmessage(const char *msg);
51
   static void setstatusmessage(const char *msg);

+ 1
- 1
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp Ver arquivo

42
 
42
 
43
 #if ENABLED(SDSUPPORT)
43
 #if ENABLED(SDSUPPORT)
44
 
44
 
45
-  static ExtUI::FileList filelist;
45
+  extern ExtUI::FileList filelist;
46
 
46
 
47
   void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
47
   void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
48
     uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;
48
     uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;

+ 3
- 3
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h Ver arquivo

37
 
37
 
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39
   // The bools specifying whether the strings are in RAM or FLASH.
39
   // The bools specifying whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
-  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
40
+  static void sendinfoscreen(PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
+  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
43
   }
43
   }
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
46
   }
46
   }
47
 
47
 
48
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
48
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
49
 
49
 
50
   // "M117" Message -- msg is a RAM ptr.
50
   // "M117" Message -- msg is a RAM ptr.
51
   static void setstatusmessage(const char *msg);
51
   static void setstatusmessage(const char *msg);

+ 2
- 2
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp Ver arquivo

48
 #endif
48
 #endif
49
 
49
 
50
 #if ENABLED(SDSUPPORT)
50
 #if ENABLED(SDSUPPORT)
51
-  static ExtUI::FileList filelist;
51
+  extern ExtUI::FileList filelist;
52
 #endif
52
 #endif
53
 
53
 
54
 bool DGUSAutoTurnOff = false;
54
 bool DGUSAutoTurnOff = false;
65
   dgusdisplay.WriteVariable(VP_MSGSTR4, line4, 32, true);
65
   dgusdisplay.WriteVariable(VP_MSGSTR4, line4, 32, true);
66
 }
66
 }
67
 
67
 
68
-void DGUSScreenHandler::sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) {
68
+void DGUSScreenHandler::sendinfoscreen_en_mks(PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4) {
69
   dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true);
69
   dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true);
70
   dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true);
70
   dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true);
71
   dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true);
71
   dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true);

+ 4
- 4
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h Ver arquivo

37
 
37
 
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39
   // The bools specifying whether the strings are in RAM or FLASH.
39
   // The bools specifying whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
-  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
40
+  static void sendinfoscreen(PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
+  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
43
   }
43
   }
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
46
   }
46
   }
47
 
47
 
48
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
48
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
49
 
49
 
50
   #if 0
50
   #if 0
51
   static void sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4);
51
   static void sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4);
52
-  static void sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) ;
52
+  static void sendinfoscreen_en_mks(PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4);
53
   static void sendinfoscreen_mks(const void *line1, const void *line2, const void *line3, const void *line4, uint16_t language);
53
   static void sendinfoscreen_mks(const void *line1, const void *line2, const void *line3, const void *line4, uint16_t language);
54
   #endif
54
   #endif
55
 
55
 

+ 1
- 1
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp Ver arquivo

42
 
42
 
43
 #if ENABLED(SDSUPPORT)
43
 #if ENABLED(SDSUPPORT)
44
 
44
 
45
-  static ExtUI::FileList filelist;
45
+  extern ExtUI::FileList filelist;
46
 
46
 
47
   void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
47
   void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
48
     uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;
48
     uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;

+ 3
- 3
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h Ver arquivo

37
 
37
 
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39
   // The bools specifying whether the strings are in RAM or FLASH.
39
   // The bools specifying whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
-  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
40
+  static void sendinfoscreen(PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41
+  static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
42
     sendinfoscreen(FTOP(line1), FTOP(line2), line3, line4, l1inflash, l2inflash, l3inflash, liinflash);
43
   }
43
   }
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
44
   static void sendinfoscreen(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, FSTR_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash) {
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
45
     sendinfoscreen(FTOP(line1), FTOP(line2), FTOP(line3), FTOP(line4), l1inflash, l2inflash, l3inflash, liinflash);
46
   }
46
   }
47
 
47
 
48
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
48
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, PGM_P const line1, PGM_P const line2, PGM_P const line3, PGM_P const line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
49
 
49
 
50
   // "M117" Message -- msg is a RAM ptr.
50
   // "M117" Message -- msg is a RAM ptr.
51
   static void setstatusmessage(const char *msg);
51
   static void setstatusmessage(const char *msg);

Carregando…
Cancelar
Salvar