Browse Source

Fix MKS H43 compile (#21240)

Sola 4 years ago
parent
commit
0afa4cc957
No account linked to committer's email address

+ 12
- 4
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp View File

@@ -49,12 +49,18 @@
49 49
   #include "../../../../../feature/powerloss.h"
50 50
 #endif
51 51
 
52
+#if ENABLED(SDSUPPORT)
53
+  static ExtUI::FileList filelist;
54
+#endif
55
+
52 56
 bool DGUSAutoTurnOff = false;
53 57
 uint8_t DGUSLanguageSwitch = 0; // Switch language for MKS DGUS
54 58
 
55 59
 // endianness swap
56 60
 uint32_t swap32(const uint32_t value) { return (value & 0x000000FFU) << 24U | (value & 0x0000FF00U) << 8U | (value & 0x00FF0000U) >> 8U | (value & 0xFF000000U) >> 24U; }
57 61
 
62
+#if 0
63
+
58 64
 void DGUSScreenHandler::sendinfoscreen_ch_mks(const uint16_t* line1, const uint16_t* line2, const uint16_t* line3, const uint16_t* line4) {
59 65
   dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true);
60 66
   dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true);
@@ -76,6 +82,8 @@ void DGUSScreenHandler::sendinfoscreen_mks(const void* line1, const void* line2,
76 82
     DGUSScreenHandler::sendinfoscreen_ch_mks((uint16_t *)line1, (uint16_t *)line2, (uint16_t *)line3, (uint16_t *)line4);
77 83
 }
78 84
 
85
+#endif
86
+
79 87
 void DGUSScreenHandler::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) {
80 88
   if (var.memadr) {
81 89
     //DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP);
@@ -256,7 +264,7 @@ void DGUSScreenHandler::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) {
256 264
 
257 265
   void DGUSScreenHandler::SDPrintingFinished() {
258 266
     if (DGUSAutoTurnOff) {
259
-      while (queue.length) queue.advance();
267
+      while(!queue.ring_buffer.empty()) queue.advance();
260 268
       gcode.process_subcommands_now_P(PSTR("M81"));
261 269
     }
262 270
     GotoScreen(MKSLCD_SCREEN_PrintDone);
@@ -786,7 +794,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
786 794
 
787 795
   DEBUG_ECHOLNPAIR("QUEUE LEN:", queue.length);
788 796
 
789
-  if (!print_job_timer.isPaused() && queue.length >= BUFSIZE)
797
+  if (!print_job_timer.isPaused() && queue.ring_buffer.full(1))
790 798
     return;
791 799
 
792 800
   char axiscode;
@@ -1778,7 +1786,7 @@ void DGUSScreenHandler::DGUS_LanguageDisplay(uint8_t var) {
1778 1786
     dgusdisplay.WriteVariable(VP_PrintAcc_Dis, PrintAcc_buf_en, 32, true);
1779 1787
 
1780 1788
     const char FAN_Speed_buf_en[] = "FAN_Speed";
1781
-    dgusdisplay.WriteVariable(VP_FAN_Speed_Dis, FAN_Speed_buf_en, 32, true);
1789
+    dgusdisplay.WriteVariable(VP_Fan_Speed_Dis, FAN_Speed_buf_en, 32, true);
1782 1790
 
1783 1791
     const char Printing_buf_en[] = "Printing";
1784 1792
     dgusdisplay.WriteVariable(VP_Printing_Dis, Printing_buf_en, 32, true);
@@ -2033,7 +2041,7 @@ void DGUSScreenHandler::DGUS_LanguageDisplay(uint8_t var) {
2033 2041
     dgusdisplay.WriteVariable(VP_PrintAcc_Dis, PrintAcc_buf_ch, 16, true);
2034 2042
 
2035 2043
     const uint16_t FAN_Speed_buf_ch[] = { 0xE7B7, 0xC8C9, 0xD9CB, 0xC8B6, 0x2000 };
2036
-    dgusdisplay.WriteVariable(VP_FAN_Speed_Dis, FAN_Speed_buf_ch, 16, true);
2044
+    dgusdisplay.WriteVariable(VP_Fan_Speed_Dis, FAN_Speed_buf_ch, 16, true);
2037 2045
 
2038 2046
     const uint16_t Printing_buf_ch[] = { 0xF2B4, 0xA1D3, 0xD0D6, 0x2000 };
2039 2047
     dgusdisplay.WriteVariable(VP_Printing_Dis, Printing_buf_ch, 16, true);

+ 2
- 0
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.h View File

@@ -41,9 +41,11 @@ public:
41 41
 
42 42
   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);
43 43
 
44
+  #if 0
44 45
   static void sendinfoscreen_ch_mks(const uint16_t* line1, const uint16_t* line2, const uint16_t* line3, const uint16_t* line4);
45 46
   static void sendinfoscreen_en_mks(const char* line1, const char* line2, const char* line3, const char* line4) ;
46 47
   static void sendinfoscreen_mks(const void* line1, const void* line2, const void* line3, const void* line4,uint16_t language);
48
+  #endif
47 49
 
48 50
   // "M117" Message -- msg is a RAM ptr.
49 51
   static void setstatusmessage(const char* msg);

Loading…
Cancel
Save