Browse Source

Add XYZ_NO_FRAME option

Scott Lahteine 5 years ago
parent
commit
9a6934874a

+ 2
- 1
Marlin/Configuration_adv.h View File

@@ -1259,7 +1259,8 @@
1259 1259
   // Show SD percentage next to the progress bar
1260 1260
   //#define DOGM_SD_PERCENT
1261 1261
 
1262
-  // Enable to save many cycles by drawing a hollow frame on the Info Screen
1262
+  // Save many cycles by drawing a hollow frame or no frame on the Info Screen
1263
+  //#define XYZ_NO_FRAME
1263 1264
   #define XYZ_HOLLOW_FRAME
1264 1265
 
1265 1266
   // Enable to save many cycles by drawing a hollow frame on Menu Screens

+ 15
- 11
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

@@ -104,6 +104,7 @@
104 104
 #endif
105 105
 
106 106
 #define PROGRESS_BAR_X 54
107
+#define PROGRESS_BAR_Y (EXTRAS_BASELINE + 2)
107 108
 #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
108 109
 
109 110
 FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, const uint8_t ty) {
@@ -597,7 +598,7 @@ void MarlinUI::draw_status_screen() {
597 598
     //
598 599
 
599 600
     if (PAGE_CONTAINS(49, 52))
600
-      u8g.drawFrame(PROGRESS_BAR_X, 49, PROGRESS_BAR_WIDTH, 4);
601
+      u8g.drawFrame(PROGRESS_BAR_X, PROGRESS_BAR_Y, PROGRESS_BAR_WIDTH, 4);
601 602
 
602 603
     //
603 604
     // Progress bar solid part
@@ -638,7 +639,7 @@ void MarlinUI::draw_status_screen() {
638 639
 
639 640
         #if ENABLED(DOGM_SD_PERCENT)
640 641
           if (progress_string[0]) {
641
-            lcd_put_u8str(55, 48, progress_string); // Percent complete
642
+            lcd_put_u8str(55, EXTRAS_BASELINE, progress_string); // Percent complete
642 643
             lcd_put_wchar('%');
643 644
           }
644 645
         #endif
@@ -665,7 +666,7 @@ void MarlinUI::draw_status_screen() {
665 666
   // XYZ Coordinates
666 667
   //
667 668
 
668
-  #if ENABLED(XYZ_HOLLOW_FRAME)
669
+  #if EITHER(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
669 670
     #define XYZ_FRAME_TOP 29
670 671
     #define XYZ_FRAME_HEIGHT INFO_FONT_ASCENT + 3
671 672
   #else
@@ -675,15 +676,17 @@ void MarlinUI::draw_status_screen() {
675 676
 
676 677
   if (PAGE_CONTAINS(XYZ_FRAME_TOP, XYZ_FRAME_TOP + XYZ_FRAME_HEIGHT - 1)) {
677 678
 
678
-    #if ENABLED(XYZ_HOLLOW_FRAME)
679
-      u8g.drawFrame(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 29-40  7: 29-39
680
-    #else
681
-      u8g.drawBox(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT);   // 8: 30-39  7: 30-37
679
+    #if DISABLED(XYZ_NO_FRAME)
680
+      #if ENABLED(XYZ_HOLLOW_FRAME)
681
+        u8g.drawFrame(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 29-40  7: 29-39
682
+      #else
683
+        u8g.drawBox(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT);   // 8: 30-39  7: 30-37
684
+      #endif
682 685
     #endif
683 686
 
684 687
     if (PAGE_CONTAINS(XYZ_BASELINE - (INFO_FONT_ASCENT - 1), XYZ_BASELINE)) {
685 688
 
686
-      #if DISABLED(XYZ_HOLLOW_FRAME)
689
+      #if NONE(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
687 690
         u8g.setColorIndex(0); // white on black
688 691
       #endif
689 692
 
@@ -722,7 +725,7 @@ void MarlinUI::draw_status_screen() {
722 725
 
723 726
       _draw_axis_value(Z_AXIS, zstring, blink);
724 727
 
725
-      #if DISABLED(XYZ_HOLLOW_FRAME)
728
+      #if NONE(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
726 729
         u8g.setColorIndex(1); // black on white
727 730
       #endif
728 731
     }
@@ -770,10 +773,11 @@ void MarlinUI::draw_status_screen() {
770 773
         lcd_put_wchar(':');
771 774
         lcd_put_u8str(mstring);
772 775
         lcd_put_wchar('%');
776
+        return;
773 777
       }
774
-      else
775 778
     #endif
776
-        draw_status_message(blink);
779
+
780
+    draw_status_message(blink);
777 781
   }
778 782
 }
779 783
 

+ 0
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h View File

@@ -26,7 +26,6 @@
26 26
 //
27 27
 // Limit Switches
28 28
 //
29
-
30 29
 #define X_MIN_PIN                          P1_29
31 30
 #define X_MAX_PIN                          P1_28
32 31
 #define Y_MIN_PIN                          P1_27

+ 1
- 0
Marlin/src/pins/ramps/pins_RAMPS_13.h View File

@@ -39,4 +39,5 @@
39 39
 #endif
40 40
 
41 41
 #define IS_RAMPS_13
42
+
42 43
 #include "pins_RAMPS.h"

+ 1
- 0
Marlin/src/pins/sam/pins_RAMPS4DUE.h View File

@@ -44,6 +44,7 @@
44 44
 #endif
45 45
 
46 46
 #define BOARD_INFO_NAME "RAMPS4DUE"
47
+
47 48
 #define IS_RAMPS4DUE
48 49
 
49 50
 //

+ 1
- 0
Marlin/src/pins/sam/pins_RAMPS_DUO.h View File

@@ -50,6 +50,7 @@
50 50
 #define BOARD_INFO_NAME "RAMPS Duo"
51 51
 
52 52
 #define IS_RAMPS_DUO
53
+
53 54
 #include "../ramps/pins_RAMPS.h"
54 55
 
55 56
 //

+ 0
- 1
Marlin/src/pins/sam/pins_RAMPS_SMART.h View File

@@ -65,7 +65,6 @@
65 65
 #endif
66 66
 
67 67
 #define BOARD_INFO_NAME "RAMPS-SMART"
68
-
69 68
 #define IS_RAMPS_SMART
70 69
 #include "../ramps/pins_RAMPS.h"
71 70
 

Loading…
Cancel
Save