Browse Source

🚸 Better bed position

Scott Lahteine 3 years ago
parent
commit
ad38699c11
2 changed files with 15 additions and 16 deletions
  1. 10
    10
      Marlin/src/lcd/dogm/dogm_Statusscreen.h
  2. 5
    6
      Marlin/src/lcd/dogm/status/bed.h

+ 10
- 10
Marlin/src/lcd/dogm/dogm_Statusscreen.h View File

@@ -480,7 +480,7 @@
480 480
     #endif
481 481
 
482 482
     #ifndef STATUS_CUTTER_TEXT_X
483
-      #define STATUS_CUTTER_TEXT_X (STATUS_CUTTER_X -1)
483
+      #define STATUS_CUTTER_TEXT_X (STATUS_CUTTER_X - 1)
484 484
     #endif
485 485
 
486 486
     #ifndef STATUS_CUTTER_TEXT_Y
@@ -488,12 +488,12 @@
488 488
     #endif
489 489
 
490 490
     static_assert(
491
-      sizeof(status_cutter_bmp) == (STATUS_CUTTER_BYTEWIDTH) * (STATUS_CUTTER_HEIGHT(0)),
491
+      sizeof(status_cutter_bmp) == (STATUS_CUTTER_BYTEWIDTH) * STATUS_CUTTER_HEIGHT(0),
492 492
       "Status cutter bitmap (status_cutter_bmp) dimensions don't match data."
493 493
     );
494 494
     #ifdef STATUS_CUTTER_ANIM
495 495
       static_assert(
496
-        sizeof(status_cutter_on_bmp) == (STATUS_CUTTER_BYTEWIDTH) * (STATUS_CUTTER_HEIGHT(1)),
496
+        sizeof(status_cutter_on_bmp) == (STATUS_CUTTER_BYTEWIDTH) * STATUS_CUTTER_HEIGHT(1),
497 497
         "Status cutter bitmap (status_cutter_on_bmp) dimensions don't match data."
498 498
       );
499 499
     #endif
@@ -530,12 +530,12 @@
530 530
   #endif
531 531
 
532 532
   static_assert(
533
-    sizeof(status_chamber_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * (STATUS_CHAMBER_HEIGHT(0)),
533
+    sizeof(status_chamber_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * STATUS_CHAMBER_HEIGHT(0),
534 534
     "Status chamber bitmap (status_chamber_bmp) dimensions don't match data."
535 535
   );
536 536
   #ifdef STATUS_CHAMBER_ANIM
537 537
     static_assert(
538
-      sizeof(status_chamber_on_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * (STATUS_CHAMBER_HEIGHT(1)),
538
+      sizeof(status_chamber_on_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * STATUS_CHAMBER_HEIGHT(1),
539 539
       "Status chamber bitmap (status_chamber_on_bmp) dimensions don't match data."
540 540
     );
541 541
   #endif
@@ -565,12 +565,12 @@
565 565
     #endif
566 566
 
567 567
     static_assert(
568
-      sizeof(status_cooler_bmp1) == (STATUS_COOLER_BYTEWIDTH) * (STATUS_COOLER_HEIGHT(0)),
568
+      sizeof(status_cooler_bmp1) == (STATUS_COOLER_BYTEWIDTH) * STATUS_COOLER_HEIGHT(0),
569 569
       "Status cooler bitmap (status_cooler_bmp1) dimensions don't match data."
570 570
     );
571 571
     #ifdef STATUS_COOLER_ANIM
572 572
       static_assert(
573
-        sizeof(status_cooler_bmp2) == (STATUS_COOLER_BYTEWIDTH) * (STATUS_COOLER_HEIGHT(1)),
573
+        sizeof(status_cooler_bmp2) == (STATUS_COOLER_BYTEWIDTH) * STATUS_COOLER_HEIGHT(1),
574 574
         "Status cooler bitmap (status_cooler_bmp2) dimensions don't match data."
575 575
       );
576 576
     #endif
@@ -647,7 +647,7 @@
647 647
 #if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH
648 648
 
649 649
   #ifndef STATUS_BED_X
650
-    #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8)
650
+    #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8 - TERN0(STATUS_HEAT_PERCENT, 4))
651 651
   #endif
652 652
 
653 653
   #ifndef STATUS_BED_HEIGHT
@@ -667,12 +667,12 @@
667 667
   #endif
668 668
 
669 669
   static_assert(
670
-    sizeof(status_bed_bmp) == (STATUS_BED_BYTEWIDTH) * (STATUS_BED_HEIGHT(0)),
670
+    sizeof(status_bed_bmp) == (STATUS_BED_BYTEWIDTH) * STATUS_BED_HEIGHT(0),
671 671
     "Status bed bitmap (status_bed_bmp) dimensions don't match data."
672 672
   );
673 673
   #ifdef STATUS_BED_ANIM
674 674
     static_assert(
675
-      sizeof(status_bed_on_bmp) == (STATUS_BED_BYTEWIDTH) * (STATUS_BED_HEIGHT(1)),
675
+      sizeof(status_bed_on_bmp) == (STATUS_BED_BYTEWIDTH) * STATUS_BED_HEIGHT(1),
676 676
       "Status bed bitmap (status_bed_on_bmp) dimensions don't match data."
677 677
     );
678 678
   #endif

+ 5
- 6
Marlin/src/lcd/dogm/status/bed.h View File

@@ -29,9 +29,7 @@
29 29
 
30 30
   #define STATUS_BED_ANIM
31 31
   #define STATUS_BED_WIDTH  24
32
-  #ifndef STATUS_BED_X
33
-    #define STATUS_BED_X   (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
34
-  #endif
32
+
35 33
   #define STATUS_BED_TEXT_X (STATUS_BED_X + 11)
36 34
 
37 35
   const unsigned char status_bed_bmp[] PROGMEM = {
@@ -62,9 +60,6 @@
62 60
 #else
63 61
 
64 62
   #define STATUS_BED_WIDTH  21
65
-  #ifndef STATUS_BED_X
66
-    #define STATUS_BED_X   (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
67
-  #endif
68 63
 
69 64
   #ifdef STATUS_BED_ANIM
70 65
 
@@ -108,3 +103,7 @@
108 103
   #endif
109 104
 
110 105
 #endif
106
+
107
+#ifndef STATUS_BED_X
108
+  #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8 - TERN0(STATUS_HEAT_PERCENT, 4))
109
+#endif

Loading…
Cancel
Save