Browse Source

Add XYZ_NO_FRAME option

Scott Lahteine 5 years ago
parent
commit
9a6934874a

+ 2
- 1
Marlin/Configuration_adv.h View File

1259
   // Show SD percentage next to the progress bar
1259
   // Show SD percentage next to the progress bar
1260
   //#define DOGM_SD_PERCENT
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
   #define XYZ_HOLLOW_FRAME
1264
   #define XYZ_HOLLOW_FRAME
1264
 
1265
 
1265
   // Enable to save many cycles by drawing a hollow frame on Menu Screens
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
 #endif
104
 #endif
105
 
105
 
106
 #define PROGRESS_BAR_X 54
106
 #define PROGRESS_BAR_X 54
107
+#define PROGRESS_BAR_Y (EXTRAS_BASELINE + 2)
107
 #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
108
 #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
108
 
109
 
109
 FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, const uint8_t ty) {
110
 FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, const uint8_t ty) {
597
     //
598
     //
598
 
599
 
599
     if (PAGE_CONTAINS(49, 52))
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
     // Progress bar solid part
604
     // Progress bar solid part
638
 
639
 
639
         #if ENABLED(DOGM_SD_PERCENT)
640
         #if ENABLED(DOGM_SD_PERCENT)
640
           if (progress_string[0]) {
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
             lcd_put_wchar('%');
643
             lcd_put_wchar('%');
643
           }
644
           }
644
         #endif
645
         #endif
665
   // XYZ Coordinates
666
   // XYZ Coordinates
666
   //
667
   //
667
 
668
 
668
-  #if ENABLED(XYZ_HOLLOW_FRAME)
669
+  #if EITHER(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
669
     #define XYZ_FRAME_TOP 29
670
     #define XYZ_FRAME_TOP 29
670
     #define XYZ_FRAME_HEIGHT INFO_FONT_ASCENT + 3
671
     #define XYZ_FRAME_HEIGHT INFO_FONT_ASCENT + 3
671
   #else
672
   #else
675
 
676
 
676
   if (PAGE_CONTAINS(XYZ_FRAME_TOP, XYZ_FRAME_TOP + XYZ_FRAME_HEIGHT - 1)) {
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
     #endif
685
     #endif
683
 
686
 
684
     if (PAGE_CONTAINS(XYZ_BASELINE - (INFO_FONT_ASCENT - 1), XYZ_BASELINE)) {
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
         u8g.setColorIndex(0); // white on black
690
         u8g.setColorIndex(0); // white on black
688
       #endif
691
       #endif
689
 
692
 
722
 
725
 
723
       _draw_axis_value(Z_AXIS, zstring, blink);
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
         u8g.setColorIndex(1); // black on white
729
         u8g.setColorIndex(1); // black on white
727
       #endif
730
       #endif
728
     }
731
     }
770
         lcd_put_wchar(':');
773
         lcd_put_wchar(':');
771
         lcd_put_u8str(mstring);
774
         lcd_put_u8str(mstring);
772
         lcd_put_wchar('%');
775
         lcd_put_wchar('%');
776
+        return;
773
       }
777
       }
774
-      else
775
     #endif
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
 //
26
 //
27
 // Limit Switches
27
 // Limit Switches
28
 //
28
 //
29
-
30
 #define X_MIN_PIN                          P1_29
29
 #define X_MIN_PIN                          P1_29
31
 #define X_MAX_PIN                          P1_28
30
 #define X_MAX_PIN                          P1_28
32
 #define Y_MIN_PIN                          P1_27
31
 #define Y_MIN_PIN                          P1_27

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

39
 #endif
39
 #endif
40
 
40
 
41
 #define IS_RAMPS_13
41
 #define IS_RAMPS_13
42
+
42
 #include "pins_RAMPS.h"
43
 #include "pins_RAMPS.h"

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

44
 #endif
44
 #endif
45
 
45
 
46
 #define BOARD_INFO_NAME "RAMPS4DUE"
46
 #define BOARD_INFO_NAME "RAMPS4DUE"
47
+
47
 #define IS_RAMPS4DUE
48
 #define IS_RAMPS4DUE
48
 
49
 
49
 //
50
 //

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

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

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

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

Loading…
Cancel
Save