Browse Source

Add heating progress bars (#12543)

Scott Lahteine 5 years ago
parent
commit
4f9ec9ab45
No account linked to committer's email address
66 changed files with 311 additions and 235 deletions
  1. 1
    0
      Marlin/Configuration_adv.h
  2. 1
    0
      Marlin/src/config/default/Configuration_adv.h
  3. 1
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 1
    0
      Marlin/src/config/examples/Anet/A2/Configuration_adv.h
  5. 1
    0
      Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
  6. 1
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  7. 1
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  8. 1
    0
      Marlin/src/config/examples/ArmEd/Configuration_adv.h
  9. 1
    0
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  10. 1
    0
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  11. 1
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  12. 1
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  13. 1
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  14. 1
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  15. 1
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  16. 1
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  17. 1
    0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  18. 1
    0
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  19. 1
    0
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  20. 1
    0
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  21. 1
    0
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  22. 1
    0
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  23. 1
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  24. 1
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  25. 1
    0
      Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
  26. 1
    0
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  27. 1
    0
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
  28. 1
    0
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
  29. 1
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  30. 1
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  31. 1
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  32. 1
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  33. 1
    0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  34. 1
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  35. 1
    0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  36. 1
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  37. 1
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  38. 1
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  39. 1
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  40. 1
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  41. 1
    0
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  42. 1
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  43. 1
    0
      Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
  44. 1
    0
      Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h
  45. 1
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  46. 1
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  47. 1
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  48. 1
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  49. 1
    0
      Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
  50. 1
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  51. 1
    0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  52. 1
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  53. 1
    0
      Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
  54. 1
    0
      Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h
  55. 1
    0
      Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h
  56. 1
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  57. 1
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  58. 1
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  59. 1
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  60. 1
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  61. 1
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  62. 1
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  63. 34
    15
      Marlin/src/lcd/dogm/dogm_Statusscreen.h
  64. 206
    218
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp
  65. 3
    2
      Marlin/src/lcd/dogm/ultralcd_DOGM.h
  66. 6
    0
      Marlin/src/lcd/ultralcd.cpp

+ 1
- 0
Marlin/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/default/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Anet/A2/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

@@ -816,6 +816,7 @@
816 816
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
817 817
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
818 818
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
819
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
819 820
 
820 821
 #endif // HAS_GRAPHICAL_LCD
821 822
 

+ 1
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/ArmEd/Configuration_adv.h View File

@@ -789,6 +789,7 @@
789 789
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
790 790
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
791 791
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
792
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
792 793
 
793 794
 #endif // HAS_GRAPHICAL_LCD
794 795
 

+ 1
- 0
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -816,6 +816,7 @@
816 816
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
817 817
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
818 818
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
819
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
819 820
 
820 821
 #endif // HAS_GRAPHICAL_LCD
821 822
 

+ 1
- 0
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@@ -825,6 +825,7 @@
825 825
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
826 826
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
827 827
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
828
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
828 829
 
829 830
 #endif // HAS_GRAPHICAL_LCD
830 831
 

+ 1
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Einstart-S/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h View File

@@ -821,6 +821,7 @@
821 821
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
822 822
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
823 823
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
824
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
824 825
 
825 826
 #endif // HAS_GRAPHICAL_LCD
826 827
 

+ 1
- 0
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h View File

@@ -822,6 +822,7 @@
822 822
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
823 823
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
824 824
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
825
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
825 826
 
826 827
 #endif // HAS_GRAPHICAL_LCD
827 828
 

+ 1
- 0
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h View File

@@ -825,6 +825,7 @@
825 825
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
826 826
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
827 827
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
828
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
828 829
 
829 830
 #endif // HAS_GRAPHICAL_LCD
830 831
 

+ 1
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/TheBorg/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h View File

@@ -830,6 +830,7 @@
830 830
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
831 831
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
832 832
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
833
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
833 834
 
834 835
 #endif // HAS_GRAPHICAL_LCD
835 836
 

+ 1
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h View File

@@ -819,6 +819,7 @@
819 819
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
820 820
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
821 821
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
822
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
822 823
 
823 824
 #endif // HAS_GRAPHICAL_LCD
824 825
 

+ 1
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h View File

@@ -817,6 +817,7 @@
817 817
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
818 818
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
819 819
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
820
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
820 821
 
821 822
 #endif // HAS_GRAPHICAL_LCD
822 823
 

+ 1
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h View File

@@ -818,6 +818,7 @@
818 818
   #define STATUS_BED_ANIM             // Use a second bitmap to indicate bed heating
819 819
   //#define STATUS_ALT_BED_BITMAP     // Use the alternative bed bitmap
820 820
   //#define STATUS_FAN_FRAMES 3       // :[0,1,2,3,4] Number of fan animation frames
821
+  //#define STATUS_HEAT_PERCENT       // Show heating in a progress bar
821 822
 
822 823
 #endif // HAS_GRAPHICAL_LCD
823 824
 

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

@@ -31,6 +31,8 @@
31 31
 
32 32
 #include "../../inc/MarlinConfig.h"
33 33
 
34
+#define BW(N) ((N + 7) / 8)
35
+
34 36
 #if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
35 37
 
36 38
   /**
@@ -49,13 +51,18 @@
49 51
 
50 52
 #endif
51 53
 
54
+#if ENABLED(STATUS_COMBINE_HEATERS)
55
+  #undef STATUS_HOTEND_ANIM
56
+  #undef STATUS_BED_ANIM
57
+#endif
58
+
52 59
 //
53 60
 // Default Status Screen Heater or Hotends bitmaps
54 61
 //
55 62
 
56 63
 #if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
57 64
 
58
-  #ifdef STATUS_COMBINE_HEATERS
65
+  #if ENABLED(STATUS_COMBINE_HEATERS)
59 66
 
60 67
     //
61 68
     // Status Screen Combined Heater bitmaps
@@ -67,6 +74,8 @@
67 74
 
68 75
     #if HAS_HEATED_BED && HOTENDS <= 3
69 76
 
77
+      #define STATUS_BED_WIDTH  18
78
+
70 79
       #if HOTENDS == 0
71 80
 
72 81
         #define STATUS_HEATERS_WIDTH  18
@@ -89,6 +98,7 @@
89 98
       #elif HOTENDS == 1
90 99
 
91 100
         #define STATUS_HEATERS_WIDTH  90
101
+        #define STATUS_BED_X 80
92 102
 
93 103
         const unsigned char status_heaters_bmp[] PROGMEM = {
94 104
           B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,
@@ -237,7 +247,7 @@
237 247
 
238 248
       #define STATUS_HOTEND1_WIDTH  12
239 249
 
240
-      #if HOTENDS == 1 || defined(STATUS_HOTEND_NUMBERLESS)
250
+      #if HOTENDS == 1 || ENABLED(STATUS_HOTEND_NUMBERLESS)
241 251
 
242 252
         const unsigned char status_hotend_a_bmp[] PROGMEM = {
243 253
           B00011111,B11100000,
@@ -563,9 +573,9 @@
563 573
 // Default Status Screen Bed bitmaps
564 574
 //
565 575
 
566
-#if !STATUS_BED_WIDTH && !defined(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS < 4
576
+#if !STATUS_BED_WIDTH && DISABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS < 4
567 577
 
568
-  #ifdef STATUS_ALT_BED_BITMAP
578
+  #if ENABLED(STATUS_ALT_BED_BITMAP)
569 579
 
570 580
     #define STATUS_BED_ANIM
571 581
     #define STATUS_BED_WIDTH  24
@@ -886,7 +896,7 @@
886 896
   #define STATUS_LOGO_WIDTH 0
887 897
 #endif
888 898
 #ifndef STATUS_LOGO_BYTEWIDTH
889
-  #define STATUS_LOGO_BYTEWIDTH ((STATUS_LOGO_WIDTH + 7) / 8)
899
+  #define STATUS_LOGO_BYTEWIDTH BW(STATUS_LOGO_WIDTH)
890 900
 #endif
891 901
 #if STATUS_LOGO_WIDTH
892 902
   #ifndef STATUS_LOGO_X
@@ -953,22 +963,22 @@
953 963
   #define STATUS_HOTEND_WIDTH(N) status_hotend_width[N]
954 964
 
955 965
   #ifndef STATUS_HOTEND1_BYTEWIDTH
956
-    #define STATUS_HOTEND1_BYTEWIDTH ((STATUS_HOTEND1_WIDTH + 7) / 8)
966
+    #define STATUS_HOTEND1_BYTEWIDTH BW(STATUS_HOTEND1_WIDTH)
957 967
   #endif
958 968
   #ifndef STATUS_HOTEND2_BYTEWIDTH
959
-    #define STATUS_HOTEND2_BYTEWIDTH ((STATUS_HOTEND2_WIDTH + 7) / 8)
969
+    #define STATUS_HOTEND2_BYTEWIDTH BW(STATUS_HOTEND2_WIDTH)
960 970
   #endif
961 971
   #ifndef STATUS_HOTEND3_BYTEWIDTH
962
-    #define STATUS_HOTEND3_BYTEWIDTH ((STATUS_HOTEND3_WIDTH + 7) / 8)
972
+    #define STATUS_HOTEND3_BYTEWIDTH BW(STATUS_HOTEND3_WIDTH)
963 973
   #endif
964 974
   #ifndef STATUS_HOTEND4_BYTEWIDTH
965
-    #define STATUS_HOTEND4_BYTEWIDTH ((STATUS_HOTEND4_WIDTH + 7) / 8)
975
+    #define STATUS_HOTEND4_BYTEWIDTH BW(STATUS_HOTEND4_WIDTH)
966 976
   #endif
967 977
   #ifndef STATUS_HOTEND5_BYTEWIDTH
968
-    #define STATUS_HOTEND5_BYTEWIDTH ((STATUS_HOTEND5_WIDTH + 7) / 8)
978
+    #define STATUS_HOTEND5_BYTEWIDTH BW(STATUS_HOTEND5_WIDTH)
969 979
   #endif
970 980
   #ifndef STATUS_HOTEND6_BYTEWIDTH
971
-    #define STATUS_HOTEND6_BYTEWIDTH ((STATUS_HOTEND6_WIDTH + 7) / 8)
981
+    #define STATUS_HOTEND6_BYTEWIDTH BW(STATUS_HOTEND6_WIDTH)
972 982
   #endif
973 983
 
974 984
   constexpr uint8_t status_hotend_bytewidth[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_BYTEWIDTH, STATUS_HOTEND2_BYTEWIDTH, STATUS_HOTEND3_BYTEWIDTH, STATUS_HOTEND4_BYTEWIDTH, STATUS_HOTEND5_BYTEWIDTH, STATUS_HOTEND6_BYTEWIDTH);
@@ -1054,11 +1064,20 @@
1054 1064
 
1055 1065
 #elif STATUS_HEATERS_WIDTH
1056 1066
 
1067
+  #ifndef STATUS_HEATERS_XSPACE
1068
+    #define STATUS_HEATERS_XSPACE 24
1069
+  #endif
1070
+  #ifndef STATUS_HOTEND_WIDTH
1071
+    #define STATUS_HOTEND_WIDTH(N) 10
1072
+  #endif
1073
+  #ifndef STATUS_HOTEND_X
1074
+    #define STATUS_HOTEND_X(N) (STATUS_HEATERS_X + 2 + (N) * (STATUS_HEATERS_XSPACE))
1075
+  #endif
1057 1076
   #ifndef STATUS_HOTEND_TEXT_X
1058 1077
     #define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
1059 1078
   #endif
1060 1079
   #ifndef STATUS_HEATERS_BYTEWIDTH
1061
-    #define STATUS_HEATERS_BYTEWIDTH ((STATUS_HEATERS_WIDTH + 7) / 8)
1080
+    #define STATUS_HEATERS_BYTEWIDTH BW(STATUS_HEATERS_WIDTH)
1062 1081
   #endif
1063 1082
   #ifndef STATUS_HEATERS_HEIGHT
1064 1083
     #define STATUS_HEATERS_HEIGHT (sizeof(status_heaters_bmp) / (STATUS_HEATERS_BYTEWIDTH))
@@ -1081,9 +1100,9 @@
1081 1100
   #define STATUS_BED_WIDTH 0
1082 1101
 #endif
1083 1102
 #ifndef STATUS_BED_BYTEWIDTH
1084
-  #define STATUS_BED_BYTEWIDTH ((STATUS_BED_WIDTH + 7) / 8)
1103
+  #define STATUS_BED_BYTEWIDTH BW(STATUS_BED_WIDTH)
1085 1104
 #endif
1086
-#if STATUS_BED_WIDTH
1105
+#if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH
1087 1106
 
1088 1107
   #ifndef STATUS_BED_X
1089 1108
     #define STATUS_BED_X (128 - (STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8)
@@ -1125,7 +1144,7 @@
1125 1144
   #define STATUS_FAN_WIDTH 0
1126 1145
 #endif
1127 1146
 #ifndef STATUS_FAN_BYTEWIDTH
1128
-  #define STATUS_FAN_BYTEWIDTH ((STATUS_FAN_WIDTH + 7) / 8)
1147
+  #define STATUS_FAN_BYTEWIDTH BW(STATUS_FAN_WIDTH)
1129 1148
 #endif
1130 1149
 #if STATUS_FAN_FRAMES
1131 1150
   #ifndef STATUS_FAN_X

+ 206
- 218
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

@@ -51,87 +51,151 @@
51 51
   #include "../../module/printcounter.h"
52 52
 #endif
53 53
 
54
-FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) {
54
+FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, const uint8_t ty) {
55 55
   const char *str = itostr3(temp);
56 56
   const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1;
57
-  lcd_moveto(x - len * (INFO_FONT_WIDTH) / 2 + 1, y);
57
+  lcd_moveto(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty);
58 58
   lcd_put_u8str(&str[3-len]);
59 59
   lcd_put_wchar(LCD_STR_DEGREE[0]);
60 60
 }
61 61
 
62
-#if ENABLED(MARLIN_DEV_MODE)
63
-  #define SHOW_ON_STATE READ(X_MIN_PIN)
62
+#define DO_DRAW_BED (HAS_HEATED_BED && STATUS_BED_WIDTH && HOTENDS <= 3 && DISABLED(STATUS_COMBINE_HEATERS))
63
+#define DO_DRAW_FAN (HAS_FAN0 && STATUS_FAN_WIDTH && STATUS_FAN_FRAMES)
64
+#define ANIM_HOTEND (HOTENDS && ENABLED(STATUS_HOTEND_ANIM))
65
+#define ANIM_BED (DO_DRAW_BED && ENABLED(STATUS_BED_ANIM))
66
+
67
+#if ANIM_HOTEND || ANIM_BED
68
+  uint8_t heat_bits;
69
+#endif
70
+#if ANIM_HOTEND
71
+  #define HOTEND_ALT(N) TEST(heat_bits, N)
72
+#else
73
+  #define HOTEND_ALT(N) false
74
+#endif
75
+#if ANIM_BED
76
+  #define BED_ALT() TEST(heat_bits, 7)
64 77
 #else
65
-  #define SHOW_ON_STATE false
78
+  #define BED_ALT() false
66 79
 #endif
67 80
 
68
-FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) {
81
+#define MAX_HOTEND_DRAW MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
82
+#define STATUS_HEATERS_BOT (STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)
83
+
84
+FORCE_INLINE void _draw_heater_status(const int8_t heater, const bool blink) {
69 85
   #if !HEATER_IDLE_HANDLER
70 86
     UNUSED(blink);
71 87
   #endif
72 88
 
73 89
   #if HAS_HEATED_BED
74 90
     const bool isBed = heater < 0;
91
+    #define IFBED(A,B) (isBed ? (A) : (B))
75 92
   #else
76
-    constexpr bool isBed = false;
93
+    #define IFBED(A,B) (B)
77 94
   #endif
78 95
 
79
-  if (PAGE_UNDER(7)) {
80
-    #if HEATER_IDLE_HANDLER
81
-      const bool is_idle = (
82
-        #if HAS_HEATED_BED
83
-          isBed ? thermalManager.is_bed_idle() :
84
-        #endif
85
-        thermalManager.is_heater_idle(heater)
86
-      );
96
+  const bool isHeat = IFBED(BED_ALT(), HOTEND_ALT(heater));
97
+  const uint8_t ix = IFBED(STATUS_BED_X, STATUS_HOTEND_X(heater)),
98
+                tx = IFBED(STATUS_BED_TEXT_X, STATUS_HOTEND_TEXT_X(heater));
99
+  const float temp = IFBED(thermalManager.degBed(), thermalManager.degHotend(heater)),
100
+              target = IFBED(thermalManager.degTargetBed(), thermalManager.degTargetHotend(heater));
87 101
 
88
-      if (blink || !is_idle)
89
-    #endif
90
-        _draw_centered_temp(0.5 + (
91
-            #if HAS_HEATED_BED
92
-              isBed ? thermalManager.degTargetBed() :
93
-            #endif
94
-            thermalManager.degTargetHotend(heater)
95
-          ), x, 7
96
-        );
97
-  }
102
+  #if DISABLED(STATUS_HOTEND_ANIM)
103
+    #define STATIC_HOTEND true
104
+    #define HOTEND_DOT    isHeat
105
+  #else
106
+    #define STATIC_HOTEND false
107
+    #define HOTEND_DOT    false
108
+  #endif
98 109
 
99
-  if (PAGE_CONTAINS(21, 28))
100
-    _draw_centered_temp(0.5f + (
101
-        #if HAS_HEATED_BED
102
-          isBed ? thermalManager.degBed() :
103
-        #endif
104
-        thermalManager.degHotend(heater)
105
-      ), x, 28
106
-    );
110
+  #if HAS_HEATED_BED && DISABLED(STATUS_BED_ANIM)
111
+    #define STATIC_BED    true
112
+    #define BED_DOT       isHeat
113
+  #else
114
+    #define STATIC_BED    false
115
+    #define BED_DOT       false
116
+  #endif
107 117
 
108
-  #ifndef STATUS_HOTEND_ANIM
109
-    #define INDICATE_HOTEND    true
110
-    #define INDICATE_HOTEND_ON (thermalManager.isHeatingHotend(heater) ^ SHOW_ON_STATE)
118
+  #if ANIM_HOTEND && ENABLED(STATUS_HOTEND_INVERTED)
119
+    #define OFF_BMP(N) status_hotend##N##_b_bmp
120
+    #define ON_BMP(N)  status_hotend##N##_a_bmp
111 121
   #else
112
-    #define INDICATE_HOTEND    false
113
-    #define INDICATE_HOTEND_ON false
122
+    #define OFF_BMP(N) status_hotend##N##_a_bmp
123
+    #define ON_BMP(N)  status_hotend##N##_b_bmp
114 124
   #endif
115 125
 
116
-  #if HAS_HEATED_BED && !defined(STATUS_BED_ANIM)
117
-    #define INDICATE_BED    true
118
-    #define INDICATE_BED_ON (thermalManager.isHeatingBed() ^ SHOW_ON_STATE)
126
+  #if STATUS_HOTEND_BITMAPS > 1
127
+    static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, OFF_BMP(1), OFF_BMP(2), OFF_BMP(3), OFF_BMP(4), OFF_BMP(5), OFF_BMP(6));
128
+    #if ANIM_HOTEND
129
+      static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, ON_BMP(1), ON_BMP(2), ON_BMP(3), ON_BMP(4), ON_BMP(5), ON_BMP(6));
130
+      #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr((S) ? &status_hotend_on_gfx[(N) % (STATUS_HOTEND_BITMAPS)] : &status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
131
+    #else
132
+      #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr(&status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
133
+    #endif
134
+  #elif ANIM_HOTEND
135
+    #define HOTEND_BITMAP(N,S) ((S) ? ON_BMP() : OFF_BMP())
119 136
   #else
120
-    #define INDICATE_BED    false
121
-    #define INDICATE_BED_ON false
137
+    #define HOTEND_BITMAP(N,S) status_hotend_a_bmp
122 138
   #endif
123 139
 
124
-  if (isBed ? INDICATE_BED : INDICATE_HOTEND) {
125
-    if (PAGE_CONTAINS(17, 20)) {
126
-      const uint8_t y = 20 - (isBed ? 2 : 3);
127
-      if (isBed ? INDICATE_BED_ON : INDICATE_HOTEND_ON) {
128
-        u8g.setColorIndex(0); // set to white on black
129
-        u8g.drawBox(x, y, 2, 2);
130
-        u8g.setColorIndex(1); // restore black on white
140
+  if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) {
141
+
142
+    #define BAR_TALL (STATUS_HEATERS_HEIGHT - 2)
143
+
144
+    const float prop = target - 20,
145
+                perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0;
146
+    uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f);
147
+    NOMORE(tall, BAR_TALL);
148
+
149
+    #ifdef STATUS_HOTEND_ANIM
150
+      // Draw hotend bitmap, either whole or split by the heating percent
151
+      if (IFBED(0, 1)) {
152
+        const uint8_t hx = STATUS_HOTEND_X(heater), bw = STATUS_HOTEND_BYTEWIDTH(heater);
153
+        #if ENABLED(STATUS_HEAT_PERCENT)
154
+          if (isHeat && tall <= BAR_TALL) {
155
+            const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
156
+            u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(heater, false));
157
+            u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(heater, true) + ph * bw);
158
+          }
159
+          else
160
+        #endif
161
+            u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(heater, isHeat));
131 162
       }
132
-      else
133
-        u8g.drawBox(x, y, 2, 2);
134
-    }
163
+    #endif
164
+
165
+    // Draw a heating progress bar, if specified
166
+    #if ENABLED(STATUS_HEAT_PERCENT)
167
+
168
+      if (IFBED(true, STATIC_HOTEND) && isHeat) {
169
+        const uint8_t bx = ix + IFBED(STATUS_BED_WIDTH, STATUS_HOTEND_WIDTH(heater)) + 1;
170
+        u8g.drawFrame(bx, STATUS_HEATERS_Y, 3, STATUS_HEATERS_HEIGHT);
171
+        if (tall) {
172
+          const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
173
+          if (PAGE_OVER(STATUS_HEATERS_Y + ph))
174
+            u8g.drawVLine(bx + 1, STATUS_HEATERS_Y + ph, tall);
175
+        }
176
+      }
177
+
178
+    #endif
179
+
180
+  } // PAGE_CONTAINS
181
+
182
+  if (PAGE_UNDER(7)) {
183
+    #if HEATER_IDLE_HANDLER
184
+      const bool is_idle = IFBED(thermalManager.is_bed_idle(), thermalManager.is_heater_idle(heater)),
185
+                 dodraw = (blink || !is_idle);
186
+    #else
187
+      constexpr bool dodraw = true;
188
+    #endif
189
+    if (dodraw) _draw_centered_temp(target + 0.5, tx, 7);
190
+  }
191
+
192
+  if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))
193
+    _draw_centered_temp(temp + 0.5f, tx, 28);
194
+
195
+  if (IFBED(STATIC_BED && BED_DOT, STATIC_HOTEND && HOTEND_DOT) && PAGE_CONTAINS(17, 19)) {
196
+    u8g.setColorIndex(0); // set to white on black
197
+    u8g.drawBox(tx, IFBED(20-2, 20-3), 2, 2);
198
+    u8g.setColorIndex(1); // restore black on white
135 199
   }
136 200
 
137 201
 }
@@ -158,94 +222,8 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
158 222
   }
159 223
 }
160 224
 
161
-void MarlinUI::draw_status_message(const bool blink) {
162
-
163
-  // Get the UTF8 character count of the string
164
-  uint8_t slen = utf8_strlen(status_message);
165
-
166
-  #if ENABLED(STATUS_MESSAGE_SCROLLING)
167
-
168
-    static bool last_blink = false;
169
-
170
-    if (slen <= LCD_WIDTH) {
171
-      // The string fits within the line. Print with no scrolling
172
-      lcd_put_u8str(status_message);
173
-      for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
174
-    }
175
-    else {
176
-      // String is longer than the available space
177
-
178
-      // Get a pointer to the next valid UTF8 character
179
-      const char *stat = status_message + status_scroll_offset;
180
-
181
-      // Get the string remaining length
182
-      const uint8_t rlen = utf8_strlen(stat);
183
-
184
-      if (rlen >= LCD_WIDTH) {
185
-        // The remaining string fills the screen - Print it
186
-        lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH);
187
-      }
188
-      else {
189
-        // The remaining string does not completely fill the screen
190
-        lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH);         // The string leaves space
191
-        uint8_t chars = LCD_WIDTH - rlen;                 // Amount of space left in characters
192
-
193
-        lcd_put_wchar('.');                               // Always at 1+ spaces left, draw a dot
194
-        if (--chars) {                                    // Draw a second dot if there's space
195
-          lcd_put_wchar('.');
196
-          if (--chars) {
197
-            // Print a second copy of the message
198
-            lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH - (rlen + 2) * (MENU_FONT_WIDTH));
199
-          }
200
-        }
201
-      }
202
-      if (last_blink != blink) {
203
-        last_blink = blink;
204
-
205
-        // Adjust by complete UTF8 characters
206
-        if (status_scroll_offset < slen) {
207
-          status_scroll_offset++;
208
-          while (!START_OF_UTF8_CHAR(status_message[status_scroll_offset]))
209
-            status_scroll_offset++;
210
-        }
211
-        else
212
-          status_scroll_offset = 0;
213
-      }
214
-    }
215
-
216
-  #else // !STATUS_MESSAGE_SCROLLING
217
-
218
-    UNUSED(blink);
219
-
220
-    // Just print the string to the LCD
221
-    lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH);
222
-
223
-    // Fill the rest with spaces
224
-    for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
225
-
226
-  #endif // !STATUS_MESSAGE_SCROLLING
227
-}
228
-
229 225
 void MarlinUI::draw_status_screen() {
230 226
 
231
-  #define DO_DRAW_BED (HAS_HEATED_BED && STATUS_BED_WIDTH)
232
-  #define DO_DRAW_FAN (HAS_FAN0 && STATUS_FAN_WIDTH && STATUS_FAN_FRAMES)
233
-  #define ANIM_END (HOTENDS && defined(STATUS_HOTEND_ANIM))
234
-  #define ANIM_BED (DO_DRAW_BED && defined(STATUS_BED_ANIM))
235
-  #if ANIM_END || ANIM_BED
236
-    static uint8_t heat_bits;
237
-  #endif
238
-  #if ANIM_END
239
-    #define HOTEND_ALT(N) TEST(heat_bits, N)
240
-  #else
241
-    #define HOTEND_ALT(N) false
242
-  #endif
243
-  #if ANIM_BED
244
-    #define BED_ALT TEST(heat_bits, 7)
245
-  #else
246
-    #define BED_ALT false
247
-  #endif
248
-
249 227
   static char xstring[5], ystring[5], zstring[8];
250 228
   #if ENABLED(FILAMENT_LCD_DISPLAY)
251 229
     static char wstring[5], mstring[4];
@@ -253,14 +231,15 @@ void MarlinUI::draw_status_screen() {
253 231
 
254 232
   // At the first page, generate new display values
255 233
   if (first_page) {
256
-    #if ANIM_END || ANIM_BED
257
-      heat_bits = 0;
258
-      #if ANIM_END
259
-        HOTEND_LOOP() if (thermalManager.isHeatingHotend(e) ^ SHOW_ON_STATE) SBI(heat_bits, e);
234
+    #if ANIM_HOTEND || ANIM_BED
235
+      uint8_t new_bits = 0;
236
+      #if ANIM_HOTEND
237
+        HOTEND_LOOP() if (thermalManager.isHeatingHotend(e)) SBI(new_bits, e);
260 238
       #endif
261 239
       #if ANIM_BED
262
-        if (thermalManager.isHeatingBed() ^ SHOW_ON_STATE) SBI(heat_bits, 7);
240
+        if (thermalManager.isHeatingBed()) SBI(new_bits, 7);
263 241
       #endif
242
+      heat_bits = new_bits;
264 243
     #endif
265 244
     strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])));
266 245
     strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
@@ -283,65 +262,13 @@ void MarlinUI::draw_status_screen() {
283 262
 
284 263
   #if STATUS_LOGO_WIDTH
285 264
     if (PAGE_CONTAINS(STATUS_LOGO_Y, STATUS_LOGO_Y + STATUS_LOGO_HEIGHT - 1))
286
-      u8g.drawBitmapP(
287
-        STATUS_LOGO_X, STATUS_LOGO_Y,
288
-        STATUS_LOGO_BYTEWIDTH, STATUS_LOGO_HEIGHT,
289
-        status_logo_bmp
290
-      );
265
+      u8g.drawBitmapP(STATUS_LOGO_X, STATUS_LOGO_Y, STATUS_LOGO_BYTEWIDTH, STATUS_LOGO_HEIGHT, status_logo_bmp);
291 266
   #endif
292 267
 
293
-  #if STATUS_HEATERS_WIDTH || STATUS_HOTEND1_WIDTH
294
-
295
-    if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)) {
296
-
297
-      #if STATUS_HEATERS_WIDTH
298
-
299
-        // Draw all heaters (and maybe the bed) in one go
300
-        u8g.drawBitmapP(
301
-          STATUS_HEATERS_X, STATUS_HEATERS_Y,
302
-          STATUS_HEATERS_BYTEWIDTH, STATUS_HEATERS_HEIGHT,
303
-          status_heaters_bmp
304
-        );
305
-
306
-      #else
307
-
308
-        #if ANIM_END && defined(STATUS_HOTEND_INVERTED)
309
-          #define OFF_BMP(N) status_hotend##N##_b_bmp
310
-          #define ON_BMP(N)  status_hotend##N##_a_bmp
311
-        #else
312
-          #define OFF_BMP(N) status_hotend##N##_a_bmp
313
-          #define ON_BMP(N)  status_hotend##N##_b_bmp
314
-        #endif
315
-
316
-        #if STATUS_HOTEND_BITMAPS > 1
317
-          static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, OFF_BMP(1), OFF_BMP(2), OFF_BMP(3), OFF_BMP(4), OFF_BMP(5), OFF_BMP(6));
318
-          #if ANIM_END
319
-            static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, ON_BMP(1), ON_BMP(2), ON_BMP(3), ON_BMP(4), ON_BMP(5), ON_BMP(6));
320
-            #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr((S) ? &status_hotend_on_gfx[(N) % (STATUS_HOTEND_BITMAPS)] : &status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
321
-          #else
322
-            #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr(&status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
323
-          #endif
324
-        #elif ANIM_END
325
-          #define HOTEND_BITMAP(N,S) ((S) ? ON_BMP() : OFF_BMP())
326
-        #else
327
-          #define HOTEND_BITMAP(N,S) status_hotend_a_bmp
328
-        #endif
329
-
330
-        #define MAX_HOTEND_DRAW MIN(HOTENDS, ((128 - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
331
-
332
-        // Draw hotends from one or more individual hotend bitmaps
333
-        for (uint8_t h = 0; h < MAX_HOTEND_DRAW; ++h) {
334
-          u8g.drawBitmapP(
335
-            STATUS_HOTEND_X(h), STATUS_HEATERS_Y,
336
-            STATUS_HOTEND_BYTEWIDTH(h), STATUS_HEATERS_HEIGHT,
337
-            HOTEND_BITMAP(h, HOTEND_ALT(h))
338
-          );
339
-        }
340
-
341
-      #endif
342
-
343
-    } // PAGE_CONTAINS
344
-
268
+  #if STATUS_HEATERS_WIDTH
269
+    // Draw all heaters (and maybe the bed) in one go
270
+    if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1))
271
+      u8g.drawBitmapP(STATUS_HEATERS_X, STATUS_HEATERS_Y, STATUS_HEATERS_BYTEWIDTH, STATUS_HEATERS_HEIGHT, status_heaters_bmp);
345 272
   #endif
346 273
 
347 274
   #if DO_DRAW_BED
@@ -350,14 +277,9 @@ void MarlinUI::draw_status_screen() {
350 277
     #else
351 278
       #define BED_BITMAP(S) status_bed_bmp
352 279
     #endif
353
-    const uint8_t bedy = STATUS_BED_Y(BED_ALT), bedh = STATUS_BED_HEIGHT(BED_ALT);
354
-    if (PAGE_CONTAINS(bedy, bedy + bedh - 1)) {
355
-      u8g.drawBitmapP(
356
-        STATUS_BED_X, bedy,
357
-        STATUS_BED_BYTEWIDTH, bedh,
358
-        BED_BITMAP(BED_ALT)
359
-      );
360
-    }
280
+    const uint8_t bedy = STATUS_BED_Y(BED_ALT()), bedh = STATUS_BED_HEIGHT(BED_ALT());
281
+    if (PAGE_CONTAINS(bedy, bedy + bedh - 1))
282
+      u8g.drawBitmapP(STATUS_BED_X, bedy, STATUS_BED_BYTEWIDTH, bedh, BED_BITMAP(BED_ALT()));
361 283
   #endif
362 284
 
363 285
   #if DO_DRAW_FAN
@@ -390,13 +312,14 @@ void MarlinUI::draw_status_screen() {
390 312
   // Temperature Graphics and Info
391 313
   //
392 314
 
393
-  if (PAGE_UNDER(28)) {
315
+  if (PAGE_UNDER(6 + 1 + 12 + 1 + 6 + 1)) {
394 316
     // Extruders
395
-    HOTEND_LOOP() _draw_heater_status(STATUS_HOTEND_TEXT_X(e), e, blink);
317
+    for (uint8_t e = 0; e < MAX_HOTEND_DRAW; ++e)
318
+      _draw_heater_status(e, blink);
396 319
 
397 320
     // Heated bed
398
-    #if HOTENDS < 4 && HAS_HEATED_BED
399
-      _draw_heater_status(STATUS_BED_TEXT_X, -1, blink);
321
+    #if HAS_HEATED_BED && HOTENDS < 4
322
+      _draw_heater_status(-1, blink);
400 323
     #endif
401 324
 
402 325
     // Fan, if a bitmap was provided
@@ -435,11 +358,8 @@ void MarlinUI::draw_status_screen() {
435 358
     #define PROGRESS_BAR_X 54
436 359
     #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
437 360
 
438
-    if (PAGE_CONTAINS(49, 52))       // 49-52 (or 49-51)
439
-      u8g.drawFrame(
440
-        PROGRESS_BAR_X, 49,
441
-        PROGRESS_BAR_WIDTH, 4
442
-      );
361
+    if (PAGE_CONTAINS(49, 52))
362
+      u8g.drawFrame(PROGRESS_BAR_X, 49, PROGRESS_BAR_WIDTH, 4);
443 363
 
444 364
     const uint8_t progress = get_progress();
445 365
 
@@ -601,4 +521,72 @@ void MarlinUI::draw_status_screen() {
601 521
   }
602 522
 }
603 523
 
524
+void MarlinUI::draw_status_message(const bool blink) {
525
+
526
+  // Get the UTF8 character count of the string
527
+  uint8_t slen = utf8_strlen(status_message);
528
+
529
+  #if ENABLED(STATUS_MESSAGE_SCROLLING)
530
+
531
+    static bool last_blink = false;
532
+
533
+    if (slen <= LCD_WIDTH) {
534
+      // The string fits within the line. Print with no scrolling
535
+      lcd_put_u8str(status_message);
536
+      for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
537
+    }
538
+    else {
539
+      // String is longer than the available space
540
+
541
+      // Get a pointer to the next valid UTF8 character
542
+      const char *stat = status_message + status_scroll_offset;
543
+
544
+      // Get the string remaining length
545
+      const uint8_t rlen = utf8_strlen(stat);
546
+
547
+      if (rlen >= LCD_WIDTH) {
548
+        // The remaining string fills the screen - Print it
549
+        lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH);
550
+      }
551
+      else {
552
+        // The remaining string does not completely fill the screen
553
+        lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH);         // The string leaves space
554
+        uint8_t chars = LCD_WIDTH - rlen;                 // Amount of space left in characters
555
+
556
+        lcd_put_wchar('.');                               // Always at 1+ spaces left, draw a dot
557
+        if (--chars) {                                    // Draw a second dot if there's space
558
+          lcd_put_wchar('.');
559
+          if (--chars) {
560
+            // Print a second copy of the message
561
+            lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH - (rlen + 2) * (MENU_FONT_WIDTH));
562
+          }
563
+        }
564
+      }
565
+      if (last_blink != blink) {
566
+        last_blink = blink;
567
+
568
+        // Adjust by complete UTF8 characters
569
+        if (status_scroll_offset < slen) {
570
+          status_scroll_offset++;
571
+          while (!START_OF_UTF8_CHAR(status_message[status_scroll_offset]))
572
+            status_scroll_offset++;
573
+        }
574
+        else
575
+          status_scroll_offset = 0;
576
+      }
577
+    }
578
+
579
+  #else // !STATUS_MESSAGE_SCROLLING
580
+
581
+    UNUSED(blink);
582
+
583
+    // Just print the string to the LCD
584
+    lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH);
585
+
586
+    // Fill the rest with spaces
587
+    for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
588
+
589
+  #endif // !STATUS_MESSAGE_SCROLLING
590
+}
591
+
604 592
 #endif // HAS_GRAPHICAL_LCD && !LIGHTWEIGHT_UI

+ 3
- 2
Marlin/src/lcd/dogm/ultralcd_DOGM.h View File

@@ -133,8 +133,9 @@
133 133
 #endif
134 134
 
135 135
 // For selective rendering within a Y range
136
-#define PAGE_UNDER(yb) (u8g.getU8g()->current_page.y0 <= (yb))
137
-#define PAGE_CONTAINS(ya, yb) (PAGE_UNDER(yb) && u8g.getU8g()->current_page.y1 >= (ya))
136
+#define PAGE_OVER(ya)         ((ya) <= u8g.getU8g()->current_page.y1) // Does the current page follow a region top?
137
+#define PAGE_UNDER(yb)        ((yb) >= u8g.getU8g()->current_page.y0) // Does the current page precede a region bottom?
138
+#define PAGE_CONTAINS(ya, yb) ((yb) >= u8g.getU8g()->current_page.y0 && (ya) <= u8g.getU8g()->current_page.y1) // Do two vertical regions overlap?
138 139
 
139 140
 // Only Western languages support big / small fonts
140 141
 #if DISABLED(DISPLAY_CHARSET_ISO10646_1)

+ 6
- 0
Marlin/src/lcd/ultralcd.cpp View File

@@ -257,6 +257,12 @@ void MarlinUI::init() {
257 257
   #if HAS_ENCODER_ACTION
258 258
     encoderDiff = 0;
259 259
   #endif
260
+
261
+  #if ENABLED(MARLIN_DEV_MODE)
262
+    // Start timer 5 at full speed
263
+    SET_CS(5, PRESCALER_1);
264
+    SET_COM(5, A, NORMAL);
265
+  #endif
260 266
 }
261 267
 
262 268
 bool MarlinUI::get_blink() {

Loading…
Cancel
Save