Bläddra i källkod

🎨 Use ExtUI API where applicable

Desuuuu 2 år sedan
förälder
incheckning
23d10ceccb

+ 1
- 1
Marlin/Configuration.h Visa fil

@@ -2566,7 +2566,7 @@
2566 2566
 //  - Copy the downloaded DWIN_SET folder to the SD card.
2567 2567
 //
2568 2568
 // RELOADED (T5UID1)
2569
-//  - Download https://github.com/Desuuuu/DGUS-reloaded
2569
+//  - Download https://github.com/Desuuuu/DGUS-reloaded/releases
2570 2570
 //  - Copy the downloaded DWIN_SET folder to the SD card.
2571 2571
 //
2572 2572
 //#define DGUS_LCD_UI_ORIGIN

+ 6
- 15
Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp Visa fil

@@ -63,13 +63,13 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) {
63 63
   }
64 64
 
65 65
   if (vp.addr == DGUS_Addr::SCREENCHANGE_Idle
66
-      && (printingIsActive() || printingIsPaused())) {
66
+      && (ExtUI::isPrinting() || ExtUI::isPrintingPaused())) {
67 67
     dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while printing"));
68 68
     return;
69 69
   }
70 70
 
71 71
   if (vp.addr == DGUS_Addr::SCREENCHANGE_Printing
72
-      && (!printingIsActive() && !printingIsPaused())) {
72
+      && (!ExtUI::isPrinting() && !ExtUI::isPrintingPaused())) {
73 73
     dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while idle"));
74 74
     return;
75 75
   }
@@ -166,7 +166,7 @@ void DGUSRxHandler::PrintAbort(DGUS_VP &vp, void *data_ptr) {
166 166
     return;
167 167
   }
168 168
 
169
-  if (!printingIsActive() && !printingIsPaused()) {
169
+  if (!ExtUI::isPrinting() && !ExtUI::isPrintingPaused()) {
170 170
     dgus_screen_handler.TriggerFullUpdate();
171 171
     return;
172 172
   }
@@ -183,7 +183,7 @@ void DGUSRxHandler::PrintPause(DGUS_VP &vp, void *data_ptr) {
183 183
     return;
184 184
   }
185 185
 
186
-  if (!printingIsActive()) {
186
+  if (!ExtUI::isPrinting()) {
187 187
     dgus_screen_handler.TriggerFullUpdate();
188 188
     return;
189 189
   }
@@ -200,7 +200,7 @@ void DGUSRxHandler::PrintResume(DGUS_VP &vp, void *data_ptr) {
200 200
     return;
201 201
   }
202 202
 
203
-  if (!printingIsPaused()) {
203
+  if (!ExtUI::isPrintingPaused()) {
204 204
     dgus_screen_handler.TriggerFullUpdate();
205 205
     return;
206 206
   }
@@ -984,20 +984,11 @@ void DGUSRxHandler::WaitAbort(DGUS_VP &vp, void *data_ptr) {
984 984
     return;
985 985
   }
986 986
 
987
-  if (!printingIsPaused()
988
-      #if ENABLED(ADVANCED_PAUSE_FEATURE)
989
-        || !did_pause_print
990
-      #endif
991
-  ) {
987
+  if (!ExtUI::isPrintingPaused()) {
992 988
     dgus_screen_handler.TriggerFullUpdate();
993 989
     return;
994 990
   }
995 991
 
996
-  #if ENABLED(ADVANCED_PAUSE_FEATURE)
997
-    did_pause_print = 0;
998
-  #endif
999
-
1000
-  ExtUI::setUserConfirmed();
1001 992
   ExtUI::stopPrint();
1002 993
 
1003 994
   dgus_screen_handler.TriggerFullUpdate();

+ 2
- 2
Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp Visa fil

@@ -47,7 +47,7 @@
47 47
 #endif
48 48
 
49 49
 bool DGUSSetupHandler::PrintStatus() {
50
-  if (printingIsActive() || printingIsPaused()) {
50
+  if (ExtUI::isPrinting() || ExtUI::isPrintingPaused()) {
51 51
     return true;
52 52
   }
53 53
 
@@ -56,7 +56,7 @@ bool DGUSSetupHandler::PrintStatus() {
56 56
 }
57 57
 
58 58
 bool DGUSSetupHandler::PrintAdjust() {
59
-  if (printingIsActive() || printingIsPaused()) {
59
+  if (ExtUI::isPrinting() || ExtUI::isPrintingPaused()) {
60 60
     return true;
61 61
   }
62 62
 

+ 3
- 7
Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp Visa fil

@@ -214,7 +214,7 @@ void DGUSTxHandler::Percent(DGUS_VP &vp) {
214 214
 void DGUSTxHandler::StatusIcons(DGUS_VP &vp) {
215 215
   uint16_t icons = 0;
216 216
 
217
-  if (printingIsActive()) {
217
+  if (ExtUI::isPrinting()) {
218 218
     icons |= (uint16_t)DGUS_Data::StatusIcon::PAUSE;
219 219
 
220 220
     dgus_display.EnableControl(DGUS_Screen::PRINT_STATUS,
@@ -227,7 +227,7 @@ void DGUSTxHandler::StatusIcons(DGUS_VP &vp) {
227 227
                                 DGUS_Control::PAUSE);
228 228
   }
229 229
 
230
-  if (printingIsPaused()) {
230
+  if (ExtUI::isPrintingPaused()) {
231 231
     icons |= (uint16_t)DGUS_Data::StatusIcon::RESUME;
232 232
 
233 233
     dgus_display.EnableControl(DGUS_Screen::PRINT_STATUS,
@@ -561,11 +561,7 @@ void DGUSTxHandler::FilamentUsed(DGUS_VP &vp) {
561 561
 void DGUSTxHandler::WaitIcons(DGUS_VP &vp) {
562 562
   uint16_t icons = 0;
563 563
 
564
-  if (printingIsPaused()
565
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
566
-      && did_pause_print
567
-    #endif
568
-  ) {
564
+  if (ExtUI::isPrintingPaused()) {
569 565
     icons |= (uint16_t)DGUS_Data::WaitIcon::ABORT;
570 566
 
571 567
     dgus_display.EnableControl(DGUS_Screen::WAIT,

Laddar…
Avbryt
Spara