Przeglądaj źródła

Proposed changes to ST7920 lightweight status screen

Scott Lahteine 7 lat temu
rodzic
commit
79272f98fc
73 zmienionych plików z 1633 dodań i 1200 usunięć
  1. 1
    1
      .travis.yml
  2. 0
    11
      Marlin/Configuration.h
  3. 16
    0
      Marlin/Configuration_adv.h
  4. 0
    11
      Marlin/src/config/default/Configuration.h
  5. 16
    0
      Marlin/src/config/default/Configuration_adv.h
  6. 16
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  7. 0
    11
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  8. 1
    10
      Marlin/src/config/examples/Anet/A6/Configuration.h
  9. 16
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  10. 0
    13
      Marlin/src/config/examples/Anet/A8/Configuration.h
  11. 16
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  12. 16
    0
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  13. 16
    0
      Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h
  14. 0
    11
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  15. 0
    11
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  16. 16
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  17. 16
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  18. 16
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  19. 16
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  20. 16
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  21. 16
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  22. 16
    0
      Marlin/src/config/examples/Creality/Ender/Configuration_adv.h
  23. 16
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  24. 0
    11
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  25. 16
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  26. 0
    11
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  27. 16
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  28. 0
    11
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  29. 16
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  30. 16
    0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  31. 16
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  32. 16
    0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  33. 16
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  34. 16
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  35. 0
    12
      Marlin/src/config/examples/RigidBot/Configuration.h
  36. 16
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  37. 16
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  38. 0
    11
      Marlin/src/config/examples/STM32F10/Configuration.h
  39. 0
    11
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  40. 16
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  41. 16
    0
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  42. 16
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  43. 0
    11
      Marlin/src/config/examples/Tronxy/X1/Configuration.h
  44. 0
    11
      Marlin/src/config/examples/Tronxy/X5S/Configuration.h
  45. 16
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  46. 0
    11
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  47. 16
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  48. 0
    11
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  49. 16
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  50. 0
    11
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  51. 16
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  52. 16
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  53. 16
    0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  54. 16
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  55. 16
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  56. 0
    11
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  57. 16
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  58. 16
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  59. 16
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  60. 0
    11
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  61. 16
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  62. 0
    11
      Marlin/src/config/examples/makibox/Configuration.h
  63. 16
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  64. 16
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  65. 16
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  66. 442
    0
      Marlin/src/lcd/dogm/status_screen_DOGM.h
  67. 371
    276
      Marlin/src/lcd/dogm/status_screen_lite_ST7920.h
  68. 108
    0
      Marlin/src/lcd/dogm/status_screen_lite_ST7920_class.h
  69. 5
    5
      Marlin/src/lcd/dogm/status_screen_lite_ST7920_spi.h
  70. 0
    247
      Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h
  71. 2
    4
      Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp
  72. 8
    12
      Marlin/src/lcd/ultralcd.cpp
  73. 7
    422
      Marlin/src/lcd/ultralcd_impl_DOGM.h

+ 1
- 1
.travis.yml Wyświetl plik

@@ -236,7 +236,7 @@ script:
236 236
   #
237 237
   - restore_configs
238 238
   - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
239
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
239
+  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES LIGHTWEIGHT_UI
240 240
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
241 241
   #
242 242
   # REPRAPWORLD_KEYPAD

+ 0
- 11
Marlin/Configuration.h Wyświetl plik

@@ -1513,18 +1513,7 @@
1513 1513
 // RepRapDiscount FULL GRAPHIC Smart Controller
1514 1514
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1515 1515
 //
1516
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1517
-// light-weight status screen will be used that takes advantage of
1518
-// the ST7920 character-generator to conserve MCU resources.
1519
-//
1520
-// Since the lightweight status screen can only show a status
1521
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1522
-// to the number of seconds until the position is revealed after a new
1523
-// status message is drawn.
1524
-
1525 1516
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1526
-//#define USE_ST7920_LIGHTWEIGHT_UI
1527
-//#define DELAY_TO_SHOW_POSITION 20
1528 1517
 
1529 1518
 //
1530 1519
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/default/Configuration.h Wyświetl plik

@@ -1513,18 +1513,7 @@
1513 1513
 // RepRapDiscount FULL GRAPHIC Smart Controller
1514 1514
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1515 1515
 //
1516
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1517
-// light-weight status screen will be used that takes advantage of
1518
-// the ST7920 character-generator to conserve MCU resources.
1519
-//
1520
-// Since the lightweight status screen can only show a status
1521
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1522
-// to the number of seconds until the position is revealed after a new
1523
-// status message is drawn.
1524
-
1525 1516
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1526
-//#define USE_ST7920_LIGHTWEIGHT_UI
1527
-//#define DELAY_TO_SHOW_POSITION 20
1528 1517
 
1529 1518
 //
1530 1519
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/default/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h Wyświetl plik

@@ -1513,18 +1513,7 @@
1513 1513
 // RepRapDiscount FULL GRAPHIC Smart Controller
1514 1514
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1515 1515
 //
1516
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1517
-// light-weight status screen will be used that takes advantage of
1518
-// the ST7920 character-generator to conserve MCU resources.
1519
-//
1520
-// Since the lightweight status screen can only show a status
1521
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1522
-// to the number of seconds until the position is revealed after a new
1523
-// status message is drawn.
1524
-
1525 1516
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1526
-//#define USE_ST7920_LIGHTWEIGHT_UI
1527
-//#define DELAY_TO_SHOW_POSITION 20
1528 1517
 
1529 1518
 //
1530 1519
 // MakerLab Mini Panel with graphic

+ 1
- 10
Marlin/src/config/examples/Anet/A6/Configuration.h Wyświetl plik

@@ -1661,18 +1661,9 @@
1661 1661
 // RepRapDiscount FULL GRAPHIC Smart Controller
1662 1662
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1663 1663
 //
1664
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1665
-// light-weight status screen will be used that takes advantage of
1666
-// the ST7920 character-generator to conserve MCU resources.
1664
+// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
1667 1665
 //
1668
-// Since the lightweight status screen can only show a status
1669
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1670
-// to the number of seconds until the position is revealed after a new
1671
-// status message is drawn.
1672
-
1673 1666
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1674
-//#define USE_ST7920_LIGHTWEIGHT_UI
1675
-//#define DELAY_TO_SHOW_POSITION 20
1676 1667
 
1677 1668
 //
1678 1669
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 13
Marlin/src/config/examples/Anet/A8/Configuration.h Wyświetl plik

@@ -1516,7 +1516,6 @@
1516 1516
 //
1517 1517
 //#define G3D_PANEL
1518 1518
 
1519
-
1520 1519
 //
1521 1520
 // RepRapDiscount FULL GRAPHIC Smart Controller
1522 1521
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
@@ -1525,18 +1524,6 @@
1525 1524
 //
1526 1525
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1527 1526
 
1528
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1529
-// light-weight status screen will be used that takes advantage of
1530
-// the ST7920 character-generator to conserve MCU resources.
1531
-//
1532
-// Since the lightweight status screen can only show a status
1533
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1534
-// to the number of seconds until the position is revealed after a new
1535
-// status message is drawn.
1536
-
1537
-//#define USE_ST7920_LIGHTWEIGHT_UI
1538
-//#define DELAY_TO_SHOW_POSITION 20
1539
-
1540 1527
 //
1541 1528
 // MakerLab Mini Panel with graphic
1542 1529
 // controller and SD support - http://reprap.org/wiki/Mini_panel

+ 16
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h Wyświetl plik

@@ -646,6 +646,22 @@
646 646
   // Swap the CW/CCW indicators in the graphics overlay
647 647
   //#define OVERLAY_GFX_REVERSE
648 648
 
649
+  #if ENABLED(U8GLIB_ST7920)
650
+    /**
651
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
652
+     * the ST7920 character-generator for very fast screen updates.
653
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
654
+     *
655
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
656
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
657
+     * length of time to display the status message before clearing.
658
+     */
659
+    //#define LIGHTWEIGHT_UI
660
+    #if ENABLED(LIGHTWEIGHT_UI)
661
+      #define STATUS_EXPIRE_SECONDS 20
662
+    #endif
663
+  #endif
664
+
649 665
 #endif // DOGLCD
650 666
 
651 667
 // @section safety

+ 16
- 0
Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h Wyświetl plik

@@ -1513,18 +1513,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1513 1513
 // RepRapDiscount FULL GRAPHIC Smart Controller
1514 1514
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1515 1515
 //
1516
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1517
-// light-weight status screen will be used that takes advantage of
1518
-// the ST7920 character-generator to conserve MCU resources.
1519
-//
1520
-// Since the lightweight status screen can only show a status
1521
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1522
-// to the number of seconds until the position is revealed after a new
1523
-// status message is drawn.
1524
-
1525 1516
 #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1526
-//#define USE_ST7920_LIGHTWEIGHT_UI
1527
-//#define DELAY_TO_SHOW_POSITION 20
1528 1517
 
1529 1518
 //
1530 1519
 // MakerLab Mini Panel with graphic

+ 0
- 11
Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h Wyświetl plik

@@ -1513,18 +1513,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1513 1513
 // RepRapDiscount FULL GRAPHIC Smart Controller
1514 1514
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1515 1515
 //
1516
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1517
-// light-weight status screen will be used that takes advantage of
1518
-// the ST7920 character-generator to conserve MCU resources.
1519
-//
1520
-// Since the lightweight status screen can only show a status
1521
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1522
-// to the number of seconds until the position is revealed after a new
1523
-// status message is drawn.
1524
-
1525 1516
 #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1526
-//#define USE_ST7920_LIGHTWEIGHT_UI
1527
-//#define DELAY_TO_SHOW_POSITION 20
1528 1517
 
1529 1518
 //
1530 1519
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Creality/Ender/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h Wyświetl plik

@@ -1519,18 +1519,7 @@
1519 1519
 // RepRapDiscount FULL GRAPHIC Smart Controller
1520 1520
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1521 1521
 //
1522
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1523
-// light-weight status screen will be used that takes advantage of
1524
-// the ST7920 character-generator to conserve MCU resources.
1525
-//
1526
-// Since the lightweight status screen can only show a status
1527
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1528
-// to the number of seconds until the position is revealed after a new
1529
-// status message is drawn.
1530
-
1531 1522
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1532
-//#define USE_ST7920_LIGHTWEIGHT_UI
1533
-//#define DELAY_TO_SHOW_POSITION 20
1534 1523
 
1535 1524
 //
1536 1525
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h Wyświetl plik

@@ -1517,18 +1517,7 @@
1517 1517
 // RepRapDiscount FULL GRAPHIC Smart Controller
1518 1518
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1519 1519
 //
1520
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1521
-// light-weight status screen will be used that takes advantage of
1522
-// the ST7920 character-generator to conserve MCU resources.
1523
-//
1524
-// Since the lightweight status screen can only show a status
1525
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1526
-// to the number of seconds until the position is revealed after a new
1527
-// status message is drawn.
1528
-
1529 1520
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1530
-//#define USE_ST7920_LIGHTWEIGHT_UI
1531
-//#define DELAY_TO_SHOW_POSITION 20
1532 1521
 
1533 1522
 //
1534 1523
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/JGAurora/A5/Configuration.h Wyświetl plik

@@ -1524,18 +1524,7 @@
1524 1524
 // RepRapDiscount FULL GRAPHIC Smart Controller
1525 1525
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1526 1526
 //
1527
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1528
-// light-weight status screen will be used that takes advantage of
1529
-// the ST7920 character-generator to conserve MCU resources.
1530
-//
1531
-// Since the lightweight status screen can only show a status
1532
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1533
-// to the number of seconds until the position is revealed after a new
1534
-// status message is drawn.
1535
-
1536 1527
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1537
-//#define USE_ST7920_LIGHTWEIGHT_UI
1538
-//#define DELAY_TO_SHOW_POSITION 20
1539 1528
 
1540 1529
 //
1541 1530
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h Wyświetl plik

@@ -653,6 +653,22 @@
653 653
     #define DOGLCD_MOSI MOSI_PIN
654 654
   #endif
655 655
 
656
+  #if ENABLED(U8GLIB_ST7920)
657
+    /**
658
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
659
+     * the ST7920 character-generator for very fast screen updates.
660
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
661
+     *
662
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
663
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
664
+     * length of time to display the status message before clearing.
665
+     */
666
+    //#define LIGHTWEIGHT_UI
667
+    #if ENABLED(LIGHTWEIGHT_UI)
668
+      #define STATUS_EXPIRE_SECONDS 20
669
+    #endif
670
+  #endif
671
+
656 672
 #endif // DOGLCD
657 673
 
658 674
 // @section safety

+ 0
- 12
Marlin/src/config/examples/RigidBot/Configuration.h Wyświetl plik

@@ -1515,18 +1515,6 @@
1515 1515
 //
1516 1516
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1517 1517
 
1518
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1519
-// light-weight status screen will be used that takes advantage of
1520
-// the ST7920 character-generator to conserve MCU resources.
1521
-//
1522
-// Since the lightweight status screen can only show a status
1523
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1524
-// to the number of seconds until the position is revealed after a new
1525
-// status message is drawn.
1526
-
1527
-//#define USE_ST7920_LIGHTWEIGHT_UI
1528
-//#define DELAY_TO_SHOW_POSITION 20
1529
-
1530 1518
 //
1531 1519
 // MakerLab Mini Panel with graphic
1532 1520
 // controller and SD support - http://reprap.org/wiki/Mini_panel

+ 16
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/STM32F10/Configuration.h Wyświetl plik

@@ -1516,18 +1516,7 @@
1516 1516
 // RepRapDiscount FULL GRAPHIC Smart Controller
1517 1517
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1518 1518
 //
1519
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1520
-// light-weight status screen will be used that takes advantage of
1521
-// the ST7920 character-generator to conserve MCU resources.
1522
-//
1523
-// Since the lightweight status screen can only show a status
1524
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1525
-// to the number of seconds until the position is revealed after a new
1526
-// status message is drawn.
1527
-
1528 1519
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1529
-//#define USE_ST7920_LIGHTWEIGHT_UI
1530
-//#define DELAY_TO_SHOW_POSITION 20
1531 1520
 
1532 1521
 //
1533 1522
 // MakerLab Mini Panel with graphic

+ 0
- 11
Marlin/src/config/examples/Sanguinololu/Configuration.h Wyświetl plik

@@ -1544,18 +1544,7 @@
1544 1544
 // RepRapDiscount FULL GRAPHIC Smart Controller
1545 1545
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1546 1546
 //
1547
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1548
-// light-weight status screen will be used that takes advantage of
1549
-// the ST7920 character-generator to conserve MCU resources.
1550
-//
1551
-// Since the lightweight status screen can only show a status
1552
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1553
-// to the number of seconds until the position is revealed after a new
1554
-// status message is drawn.
1555
-
1556 1547
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1557
-//#define USE_ST7920_LIGHTWEIGHT_UI
1558
-//#define DELAY_TO_SHOW_POSITION 20
1559 1548
 
1560 1549
 //
1561 1550
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/TheBorg/Configuration_adv.h Wyświetl plik

@@ -642,6 +642,22 @@
642 642
   // Swap the CW/CCW indicators in the graphics overlay
643 643
   //#define OVERLAY_GFX_REVERSE
644 644
 
645
+  #if ENABLED(U8GLIB_ST7920)
646
+    /**
647
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
648
+     * the ST7920 character-generator for very fast screen updates.
649
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
650
+     *
651
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
652
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
653
+     * length of time to display the status message before clearing.
654
+     */
655
+    //#define LIGHTWEIGHT_UI
656
+    #if ENABLED(LIGHTWEIGHT_UI)
657
+      #define STATUS_EXPIRE_SECONDS 20
658
+    #endif
659
+  #endif
660
+
645 661
 #endif // DOGLCD
646 662
 
647 663
 // @section safety

+ 16
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/Tronxy/X1/Configuration.h Wyświetl plik

@@ -1498,18 +1498,7 @@
1498 1498
 // RepRapDiscount FULL GRAPHIC Smart Controller
1499 1499
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1500 1500
 //
1501
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1502
-// light-weight status screen will be used that takes advantage of
1503
-// the ST7920 character-generator to conserve MCU resources.
1504
-//
1505
-// Since the lightweight status screen can only show a status
1506
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1507
-// to the number of seconds until the position is revealed after a new
1508
-// status message is drawn.
1509
-
1510 1501
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1511
-//#define USE_ST7920_LIGHTWEIGHT_UI
1512
-//#define DELAY_TO_SHOW_POSITION 20
1513 1502
 
1514 1503
 //
1515 1504
 // MakerLab Mini Panel with graphic

+ 0
- 11
Marlin/src/config/examples/Tronxy/X5S/Configuration.h Wyświetl plik

@@ -1513,18 +1513,7 @@
1513 1513
 // RepRapDiscount FULL GRAPHIC Smart Controller
1514 1514
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1515 1515
 //
1516
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1517
-// light-weight status screen will be used that takes advantage of
1518
-// the ST7920 character-generator to conserve MCU resources.
1519
-//
1520
-// Since the lightweight status screen can only show a status
1521
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1522
-// to the number of seconds until the position is revealed after a new
1523
-// status message is drawn.
1524
-
1525 1516
 #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1526
-//#define USE_ST7920_LIGHTWEIGHT_UI
1527
-//#define DELAY_TO_SHOW_POSITION 20
1528 1517
 
1529 1518
 //
1530 1519
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/Velleman/K8200/Configuration.h Wyświetl plik

@@ -1546,18 +1546,7 @@
1546 1546
 // RepRapDiscount FULL GRAPHIC Smart Controller
1547 1547
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1548 1548
 //
1549
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1550
-// light-weight status screen will be used that takes advantage of
1551
-// the ST7920 character-generator to conserve MCU resources.
1552
-//
1553
-// Since the lightweight status screen can only show a status
1554
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1555
-// to the number of seconds until the position is revealed after a new
1556
-// status message is drawn.
1557
-
1558 1549
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1559
-//#define USE_ST7920_LIGHTWEIGHT_UI
1560
-//#define DELAY_TO_SHOW_POSITION 20
1561 1550
 
1562 1551
 //
1563 1552
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h Wyświetl plik

@@ -658,6 +658,22 @@
658 658
   // Swap the CW/CCW indicators in the graphics overlay
659 659
   //#define OVERLAY_GFX_REVERSE
660 660
 
661
+  #if ENABLED(U8GLIB_ST7920)
662
+    /**
663
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
664
+     * the ST7920 character-generator for very fast screen updates.
665
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
666
+     *
667
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
668
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
669
+     * length of time to display the status message before clearing.
670
+     */
671
+    //#define LIGHTWEIGHT_UI
672
+    #if ENABLED(LIGHTWEIGHT_UI)
673
+      #define STATUS_EXPIRE_SECONDS 20
674
+    #endif
675
+  #endif
676
+
661 677
 #endif // DOGLCD
662 678
 
663 679
 // @section safety

+ 0
- 11
Marlin/src/config/examples/Velleman/K8400/Configuration.h Wyświetl plik

@@ -1513,18 +1513,7 @@
1513 1513
 // RepRapDiscount FULL GRAPHIC Smart Controller
1514 1514
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1515 1515
 //
1516
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1517
-// light-weight status screen will be used that takes advantage of
1518
-// the ST7920 character-generator to conserve MCU resources.
1519
-//
1520
-// Since the lightweight status screen can only show a status
1521
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1522
-// to the number of seconds until the position is revealed after a new
1523
-// status message is drawn.
1524
-
1525 1516
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1526
-//#define USE_ST7920_LIGHTWEIGHT_UI
1527
-//#define DELAY_TO_SHOW_POSITION 20
1528 1517
 
1529 1518
 //
1530 1519
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h Wyświetl plik

@@ -1507,18 +1507,7 @@
1507 1507
 // RepRapDiscount FULL GRAPHIC Smart Controller
1508 1508
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1509 1509
 //
1510
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1511
-// light-weight status screen will be used that takes advantage of
1512
-// the ST7920 character-generator to conserve MCU resources.
1513
-//
1514
-// Since the lightweight status screen can only show a status
1515
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1516
-// to the number of seconds until the position is revealed after a new
1517
-// status message is drawn.
1518
-
1519 1510
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1520
-//#define USE_ST7920_LIGHTWEIGHT_UI
1521
-//#define DELAY_TO_SHOW_POSITION 20
1522 1511
 
1523 1512
 //
1524 1513
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h Wyświetl plik

@@ -647,6 +647,22 @@
647 647
   // Swap the CW/CCW indicators in the graphics overlay
648 648
   //#define OVERLAY_GFX_REVERSE
649 649
 
650
+  #if ENABLED(U8GLIB_ST7920)
651
+    /**
652
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
653
+     * the ST7920 character-generator for very fast screen updates.
654
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
655
+     *
656
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
657
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
658
+     * length of time to display the status message before clearing.
659
+     */
660
+    //#define LIGHTWEIGHT_UI
661
+    #if ENABLED(LIGHTWEIGHT_UI)
662
+      #define STATUS_EXPIRE_SECONDS 20
663
+    #endif
664
+  #endif
665
+
650 666
 #endif // DOGLCD
651 667
 
652 668
 // @section safety

+ 16
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h Wyświetl plik

@@ -647,6 +647,22 @@
647 647
   // Swap the CW/CCW indicators in the graphics overlay
648 648
   //#define OVERLAY_GFX_REVERSE
649 649
 
650
+  #if ENABLED(U8GLIB_ST7920)
651
+    /**
652
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
653
+     * the ST7920 character-generator for very fast screen updates.
654
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
655
+     *
656
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
657
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
658
+     * length of time to display the status message before clearing.
659
+     */
660
+    //#define LIGHTWEIGHT_UI
661
+    #if ENABLED(LIGHTWEIGHT_UI)
662
+      #define STATUS_EXPIRE_SECONDS 20
663
+    #endif
664
+  #endif
665
+
650 666
 #endif // DOGLCD
651 667
 
652 668
 // @section safety

+ 16
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h Wyświetl plik

@@ -647,6 +647,22 @@
647 647
   // Swap the CW/CCW indicators in the graphics overlay
648 648
   //#define OVERLAY_GFX_REVERSE
649 649
 
650
+  #if ENABLED(U8GLIB_ST7920)
651
+    /**
652
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
653
+     * the ST7920 character-generator for very fast screen updates.
654
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
655
+     *
656
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
657
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
658
+     * length of time to display the status message before clearing.
659
+     */
660
+    //#define LIGHTWEIGHT_UI
661
+    #if ENABLED(LIGHTWEIGHT_UI)
662
+      #define STATUS_EXPIRE_SECONDS 20
663
+    #endif
664
+  #endif
665
+
650 666
 #endif // DOGLCD
651 667
 
652 668
 // @section safety

+ 16
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h Wyświetl plik

@@ -647,6 +647,22 @@
647 647
   // Swap the CW/CCW indicators in the graphics overlay
648 648
   //#define OVERLAY_GFX_REVERSE
649 649
 
650
+  #if ENABLED(U8GLIB_ST7920)
651
+    /**
652
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
653
+     * the ST7920 character-generator for very fast screen updates.
654
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
655
+     *
656
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
657
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
658
+     * length of time to display the status message before clearing.
659
+     */
660
+    //#define LIGHTWEIGHT_UI
661
+    #if ENABLED(LIGHTWEIGHT_UI)
662
+      #define STATUS_EXPIRE_SECONDS 20
663
+    #endif
664
+  #endif
665
+
650 666
 #endif // DOGLCD
651 667
 
652 668
 // @section safety

+ 16
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h Wyświetl plik

@@ -647,6 +647,22 @@
647 647
   // Swap the CW/CCW indicators in the graphics overlay
648 648
   //#define OVERLAY_GFX_REVERSE
649 649
 
650
+  #if ENABLED(U8GLIB_ST7920)
651
+    /**
652
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
653
+     * the ST7920 character-generator for very fast screen updates.
654
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
655
+     *
656
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
657
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
658
+     * length of time to display the status message before clearing.
659
+     */
660
+    //#define LIGHTWEIGHT_UI
661
+    #if ENABLED(LIGHTWEIGHT_UI)
662
+      #define STATUS_EXPIRE_SECONDS 20
663
+    #endif
664
+  #endif
665
+
650 666
 #endif // DOGLCD
651 667
 
652 668
 // @section safety

+ 0
- 11
Marlin/src/config/examples/delta/kossel_mini/Configuration.h Wyświetl plik

@@ -1637,18 +1637,7 @@
1637 1637
 // RepRapDiscount FULL GRAPHIC Smart Controller
1638 1638
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1639 1639
 //
1640
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1641
-// light-weight status screen will be used that takes advantage of
1642
-// the ST7920 character-generator to conserve MCU resources.
1643
-//
1644
-// Since the lightweight status screen can only show a status
1645
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1646
-// to the number of seconds until the position is revealed after a new
1647
-// status message is drawn.
1648
-
1649 1640
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1650
-//#define USE_ST7920_LIGHTWEIGHT_UI
1651
-//#define DELAY_TO_SHOW_POSITION 20
1652 1641
 
1653 1642
 //
1654 1643
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h Wyświetl plik

@@ -647,6 +647,22 @@
647 647
   // Swap the CW/CCW indicators in the graphics overlay
648 648
   //#define OVERLAY_GFX_REVERSE
649 649
 
650
+  #if ENABLED(U8GLIB_ST7920)
651
+    /**
652
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
653
+     * the ST7920 character-generator for very fast screen updates.
654
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
655
+     *
656
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
657
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
658
+     * length of time to display the status message before clearing.
659
+     */
660
+    //#define LIGHTWEIGHT_UI
661
+    #if ENABLED(LIGHTWEIGHT_UI)
662
+      #define STATUS_EXPIRE_SECONDS 20
663
+    #endif
664
+  #endif
665
+
650 666
 #endif // DOGLCD
651 667
 
652 668
 // @section safety

+ 16
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h Wyświetl plik

@@ -652,6 +652,22 @@
652 652
   // Swap the CW/CCW indicators in the graphics overlay
653 653
   //#define OVERLAY_GFX_REVERSE
654 654
 
655
+  #if ENABLED(U8GLIB_ST7920)
656
+    /**
657
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
658
+     * the ST7920 character-generator for very fast screen updates.
659
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
660
+     *
661
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
662
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
663
+     * length of time to display the status message before clearing.
664
+     */
665
+    //#define LIGHTWEIGHT_UI
666
+    #if ENABLED(LIGHTWEIGHT_UI)
667
+      #define STATUS_EXPIRE_SECONDS 20
668
+    #endif
669
+  #endif
670
+
655 671
 #endif // DOGLCD
656 672
 
657 673
 // @section safety

+ 16
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h Wyświetl plik

@@ -647,6 +647,22 @@
647 647
   // Swap the CW/CCW indicators in the graphics overlay
648 648
   //#define OVERLAY_GFX_REVERSE
649 649
 
650
+  #if ENABLED(U8GLIB_ST7920)
651
+    /**
652
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
653
+     * the ST7920 character-generator for very fast screen updates.
654
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
655
+     *
656
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
657
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
658
+     * length of time to display the status message before clearing.
659
+     */
660
+    //#define LIGHTWEIGHT_UI
661
+    #if ENABLED(LIGHTWEIGHT_UI)
662
+      #define STATUS_EXPIRE_SECONDS 20
663
+    #endif
664
+  #endif
665
+
650 666
 #endif // DOGLCD
651 667
 
652 668
 // @section safety

+ 0
- 11
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h Wyświetl plik

@@ -1527,18 +1527,7 @@
1527 1527
 // RepRapDiscount FULL GRAPHIC Smart Controller
1528 1528
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1529 1529
 //
1530
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1531
-// light-weight status screen will be used that takes advantage of
1532
-// the ST7920 character-generator to conserve MCU resources.
1533
-//
1534
-// Since the lightweight status screen can only show a status
1535
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1536
-// to the number of seconds until the position is revealed after a new
1537
-// status message is drawn.
1538
-
1539 1530
 #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1540
-//#define USE_ST7920_LIGHTWEIGHT_UI
1541
-//#define DELAY_TO_SHOW_POSITION 20
1542 1531
 
1543 1532
 //
1544 1533
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 0
- 11
Marlin/src/config/examples/makibox/Configuration.h Wyświetl plik

@@ -1516,18 +1516,7 @@
1516 1516
 // RepRapDiscount FULL GRAPHIC Smart Controller
1517 1517
 // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1518 1518
 //
1519
-// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative
1520
-// light-weight status screen will be used that takes advantage of
1521
-// the ST7920 character-generator to conserve MCU resources.
1522
-//
1523
-// Since the lightweight status screen can only show a status
1524
-// message or the position, but not both, set DELAY_TO_SHOW_POSITION
1525
-// to the number of seconds until the position is revealed after a new
1526
-// status message is drawn.
1527
-
1528 1519
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1529
-//#define USE_ST7920_LIGHTWEIGHT_UI
1530
-//#define DELAY_TO_SHOW_POSITION 20
1531 1520
 
1532 1521
 //
1533 1522
 // MakerLab Mini Panel with graphic

+ 16
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h Wyświetl plik

@@ -645,6 +645,22 @@
645 645
   // Swap the CW/CCW indicators in the graphics overlay
646 646
   //#define OVERLAY_GFX_REVERSE
647 647
 
648
+  #if ENABLED(U8GLIB_ST7920)
649
+    /**
650
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
651
+     * the ST7920 character-generator for very fast screen updates.
652
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
653
+     *
654
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
655
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
656
+     * length of time to display the status message before clearing.
657
+     */
658
+    //#define LIGHTWEIGHT_UI
659
+    #if ENABLED(LIGHTWEIGHT_UI)
660
+      #define STATUS_EXPIRE_SECONDS 20
661
+    #endif
662
+  #endif
663
+
648 664
 #endif // DOGLCD
649 665
 
650 666
 // @section safety

+ 16
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h Wyświetl plik

@@ -646,6 +646,22 @@
646 646
   // Swap the CW/CCW indicators in the graphics overlay
647 647
   //#define OVERLAY_GFX_REVERSE
648 648
 
649
+  #if ENABLED(U8GLIB_ST7920)
650
+    /**
651
+     * ST7920-based LCDs can emulate a 16 x 4 character display using
652
+     * the ST7920 character-generator for very fast screen updates.
653
+     * Enable LIGHTWEIGHT_UI to use this special display mode.
654
+     *
655
+     * Since LIGHTWEIGHT_UI has limited space, the position and status
656
+     * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
657
+     * length of time to display the status message before clearing.
658
+     */
659
+    //#define LIGHTWEIGHT_UI
660
+    #if ENABLED(LIGHTWEIGHT_UI)
661
+      #define STATUS_EXPIRE_SECONDS 20
662
+    #endif
663
+  #endif
664
+
649 665
 #endif // DOGLCD
650 666
 
651 667
 // @section safety

+ 442
- 0
Marlin/src/lcd/dogm/status_screen_DOGM.h Wyświetl plik

@@ -0,0 +1,442 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * status_screen_DOGM.h
25
+ *
26
+ * Standard Status Screen for Graphical Display
27
+ */
28
+
29
+#ifndef ULTRALCD_IMPL_STATUS_SCREEN_DOGM_H
30
+#define ULTRALCD_IMPL_STATUS_SCREEN_DOGM_H
31
+
32
+FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) {
33
+  const char * const str = itostr3(temp);
34
+  u8g.setPrintPos(x - (str[0] != ' ' ? 0 : str[1] != ' ' ? 1 : 2) * DOG_CHAR_WIDTH / 2, y);
35
+  lcd_print(str);
36
+  lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
37
+}
38
+
39
+#ifndef HEAT_INDICATOR_X
40
+  #define HEAT_INDICATOR_X 8
41
+#endif
42
+
43
+FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) {
44
+  #if !HEATER_IDLE_HANDLER
45
+    UNUSED(blink);
46
+  #endif
47
+
48
+  #if HAS_TEMP_BED
49
+    const bool isBed = heater < 0;
50
+  #else
51
+    constexpr bool isBed = false;
52
+  #endif
53
+
54
+  if (PAGE_UNDER(7)) {
55
+    #if HEATER_IDLE_HANDLER
56
+      const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
57
+        #if HAS_TEMP_BED
58
+          thermalManager.is_bed_idle()
59
+        #else
60
+          false
61
+        #endif
62
+      );
63
+
64
+      if (blink || !is_idle)
65
+    #endif
66
+    _draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); }
67
+
68
+  if (PAGE_CONTAINS(21, 28))
69
+    _draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28);
70
+
71
+  if (PAGE_CONTAINS(17, 20)) {
72
+    const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X,
73
+                  y = isBed ? 18 : 17;
74
+    if (isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater)) {
75
+      u8g.setColorIndex(0); // white on black
76
+      u8g.drawBox(x + h, y, 2, 2);
77
+      u8g.setColorIndex(1); // black on white
78
+    }
79
+    else {
80
+      u8g.drawBox(x + h, y, 2, 2);
81
+    }
82
+  }
83
+}
84
+
85
+FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, const bool blink) {
86
+  if (blink)
87
+    lcd_printPGM(pstr);
88
+  else {
89
+    if (!axis_homed[axis])
90
+      u8g.print('?');
91
+    else {
92
+      #if DISABLED(HOME_AFTER_DEACTIVATE) && DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
93
+        if (!axis_known_position[axis])
94
+          u8g.print(' ');
95
+        else
96
+      #endif
97
+          lcd_printPGM(pstr);
98
+    }
99
+  }
100
+}
101
+
102
+inline void lcd_implementation_status_message(const bool blink) {
103
+  #if ENABLED(STATUS_MESSAGE_SCROLLING)
104
+    static bool last_blink = false;
105
+    const uint8_t slen = lcd_strlen(lcd_status_message);
106
+    const char *stat = lcd_status_message + status_scroll_pos;
107
+    if (slen <= LCD_WIDTH)
108
+      lcd_print_utf(stat);                                      // The string isn't scrolling
109
+    else {
110
+      if (status_scroll_pos <= slen - LCD_WIDTH)
111
+        lcd_print_utf(stat);                                    // The string fills the screen
112
+      else {
113
+        uint8_t chars = LCD_WIDTH;
114
+        if (status_scroll_pos < slen) {                         // First string still visible
115
+          lcd_print_utf(stat);                                  // The string leaves space
116
+          chars -= slen - status_scroll_pos;                    // Amount of space left
117
+        }
118
+        u8g.print('.');                                         // Always at 1+ spaces left, draw a dot
119
+        if (--chars) {
120
+          if (status_scroll_pos < slen + 1)                     // Draw a second dot if there's space
121
+            --chars, u8g.print('.');
122
+          if (chars) lcd_print_utf(lcd_status_message, chars);  // Print a second copy of the message
123
+        }
124
+      }
125
+      if (last_blink != blink) {
126
+        last_blink = blink;
127
+        // Skip any non-printing bytes
128
+        if (status_scroll_pos < slen) while (!PRINTABLE(lcd_status_message[status_scroll_pos])) status_scroll_pos++;
129
+        if (++status_scroll_pos >= slen + 2) status_scroll_pos = 0;
130
+      }
131
+    }
132
+  #else
133
+    UNUSED(blink);
134
+    lcd_print_utf(lcd_status_message);
135
+  #endif
136
+}
137
+
138
+static void lcd_implementation_status_screen() {
139
+
140
+  const bool blink = lcd_blink();
141
+
142
+  #if FAN_ANIM_FRAMES > 2
143
+    static bool old_blink;
144
+    static uint8_t fan_frame;
145
+    if (old_blink != blink) {
146
+      old_blink = blink;
147
+      if (!fanSpeeds[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0;
148
+    }
149
+  #endif
150
+
151
+  // Status Menu Font
152
+  lcd_setFont(FONT_STATUSMENU);
153
+
154
+  //
155
+  // Fan Animation
156
+  //
157
+  // Draws the whole heading image as a B/W bitmap rather than
158
+  // drawing the elements separately.
159
+  // This was done as an optimization, as it was slower to draw
160
+  // multiple parts compared to a single bitmap.
161
+  //
162
+  // The bitmap:
163
+  // - May be offset in X
164
+  // - Includes all nozzle(s), bed(s), and the fan.
165
+  //
166
+  // TODO:
167
+  //
168
+  // - Only draw the whole header on the first
169
+  //   entry to the status screen. Nozzle, bed, and
170
+  //   fan outline bits don't change.
171
+  //
172
+  if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) {
173
+
174
+    u8g.drawBitmapP(
175
+      STATUS_SCREEN_X, STATUS_SCREEN_Y,
176
+      (STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT,
177
+      #if HAS_FAN0
178
+        #if FAN_ANIM_FRAMES > 2
179
+          fan_frame == 1 ? status_screen1_bmp :
180
+          fan_frame == 2 ? status_screen2_bmp :
181
+          #if FAN_ANIM_FRAMES > 3
182
+            fan_frame == 3 ? status_screen3_bmp :
183
+          #endif
184
+        #else
185
+          blink && fanSpeeds[0] ? status_screen1_bmp :
186
+        #endif
187
+      #endif
188
+      status_screen0_bmp
189
+    );
190
+
191
+  }
192
+
193
+  //
194
+  // Temperature Graphics and Info
195
+  //
196
+
197
+  if (PAGE_UNDER(28)) {
198
+    // Extruders
199
+    HOTEND_LOOP() _draw_heater_status(STATUS_SCREEN_HOTEND_TEXT_X(e), e, blink);
200
+
201
+    // Heated bed
202
+    #if HOTENDS < 4 && HAS_TEMP_BED
203
+      _draw_heater_status(STATUS_SCREEN_BED_TEXT_X, -1, blink);
204
+    #endif
205
+
206
+    #if HAS_FAN0
207
+      if (PAGE_CONTAINS(20, 27)) {
208
+        // Fan
209
+        const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
210
+        if (per) {
211
+          u8g.setPrintPos(STATUS_SCREEN_FAN_TEXT_X, STATUS_SCREEN_FAN_TEXT_Y);
212
+          lcd_print(itostr3(per));
213
+          u8g.print('%');
214
+        }
215
+      }
216
+    #endif
217
+  }
218
+
219
+  #if ENABLED(SDSUPPORT)
220
+    //
221
+    // SD Card Symbol
222
+    //
223
+    if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) {
224
+      // Upper box
225
+      u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7);     // 42-48 (or 41-47)
226
+      // Right edge
227
+      u8g.drawBox(50, 44 - (TALL_FONT_CORRECTION), 2, 5);     // 44-48 (or 43-47)
228
+      // Bottom hollow box
229
+      u8g.drawFrame(42, 49 - (TALL_FONT_CORRECTION), 10, 4);  // 49-52 (or 48-51)
230
+      // Corner pixel
231
+      u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION));         // 43 (or 42)
232
+    }
233
+  #endif // SDSUPPORT
234
+
235
+  #if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
236
+    //
237
+    // Progress bar frame
238
+    //
239
+    #define PROGRESS_BAR_X 54
240
+    #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
241
+
242
+    if (PAGE_CONTAINS(49, 52 - (TALL_FONT_CORRECTION)))       // 49-52 (or 49-51)
243
+      u8g.drawFrame(
244
+        PROGRESS_BAR_X, 49,
245
+        PROGRESS_BAR_WIDTH, 4 - (TALL_FONT_CORRECTION)
246
+      );
247
+
248
+    #if DISABLED(LCD_SET_PROGRESS_MANUALLY)
249
+      const uint8_t progress_bar_percent = card.percentDone();
250
+    #endif
251
+
252
+    if (progress_bar_percent > 1) {
253
+
254
+      //
255
+      // Progress bar solid part
256
+      //
257
+
258
+      if (PAGE_CONTAINS(50, 51 - (TALL_FONT_CORRECTION)))     // 50-51 (or just 50)
259
+        u8g.drawBox(
260
+          PROGRESS_BAR_X + 1, 50,
261
+          (uint16_t)((PROGRESS_BAR_WIDTH - 2) * progress_bar_percent * 0.01), 2 - (TALL_FONT_CORRECTION)
262
+        );
263
+
264
+      //
265
+      // SD Percent Complete
266
+      //
267
+
268
+      #if ENABLED(DOGM_SD_PERCENT)
269
+        if (PAGE_CONTAINS(41, 48)) {
270
+          // Percent complete
271
+          u8g.setPrintPos(55, 48);
272
+          u8g.print(itostr3(progress_bar_percent));
273
+          u8g.print('%');
274
+        }
275
+      #endif
276
+    }
277
+
278
+    //
279
+    // Elapsed Time
280
+    //
281
+
282
+    #if DISABLED(DOGM_SD_PERCENT)
283
+      #define SD_DURATION_X (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH / 2) - len * (DOG_CHAR_WIDTH / 2))
284
+    #else
285
+      #define SD_DURATION_X (LCD_PIXEL_WIDTH - len * DOG_CHAR_WIDTH)
286
+    #endif
287
+
288
+    if (PAGE_CONTAINS(41, 48)) {
289
+      char buffer[10];
290
+      duration_t elapsed = print_job_timer.duration();
291
+      bool has_days = (elapsed.value >= 60*60*24L);
292
+      uint8_t len = elapsed.toDigital(buffer, has_days);
293
+      u8g.setPrintPos(SD_DURATION_X, 48);
294
+      lcd_print(buffer);
295
+    }
296
+
297
+  #endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
298
+
299
+  //
300
+  // XYZ Coordinates
301
+  //
302
+
303
+  #if ENABLED(USE_SMALL_INFOFONT)
304
+    #define INFO_FONT_HEIGHT 7
305
+  #else
306
+    #define INFO_FONT_HEIGHT 8
307
+  #endif
308
+
309
+  #define XYZ_BASELINE (30 + INFO_FONT_HEIGHT)
310
+
311
+  #define X_LABEL_POS  3
312
+  #define X_VALUE_POS 11
313
+  #define XYZ_SPACING 40
314
+
315
+  #if ENABLED(XYZ_HOLLOW_FRAME)
316
+    #define XYZ_FRAME_TOP 29
317
+    #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 3
318
+  #else
319
+    #define XYZ_FRAME_TOP 30
320
+    #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 1
321
+  #endif
322
+
323
+  // Before homing the axis letters are blinking 'X' <-> '?'.
324
+  // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '.
325
+  // When everything is ok you see a constant 'X'.
326
+
327
+  static char xstring[5], ystring[5], zstring[7];
328
+  #if ENABLED(FILAMENT_LCD_DISPLAY)
329
+    static char wstring[5], mstring[4];
330
+  #endif
331
+
332
+  // At the first page, regenerate the XYZ strings
333
+  if (page.page == 0) {
334
+    strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])));
335
+    strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
336
+    strcpy(zstring, ftostr52sp(FIXFLOAT(LOGICAL_Z_POSITION(current_position[Z_AXIS]))));
337
+    #if ENABLED(FILAMENT_LCD_DISPLAY)
338
+      strcpy(wstring, ftostr12ns(filament_width_meas));
339
+      strcpy(mstring, itostr3(100.0 * (
340
+          parser.volumetric_enabled
341
+            ? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
342
+            : planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
343
+        )
344
+      ));
345
+    #endif
346
+  }
347
+
348
+  if (PAGE_CONTAINS(XYZ_FRAME_TOP, XYZ_FRAME_TOP + XYZ_FRAME_HEIGHT - 1)) {
349
+
350
+    #if ENABLED(XYZ_HOLLOW_FRAME)
351
+      u8g.drawFrame(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 29-40  7: 29-39
352
+    #else
353
+      u8g.drawBox(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT);   // 8: 30-39  7: 30-37
354
+    #endif
355
+
356
+    if (PAGE_CONTAINS(XYZ_BASELINE - (INFO_FONT_HEIGHT - 1), XYZ_BASELINE)) {
357
+
358
+      #if DISABLED(XYZ_HOLLOW_FRAME)
359
+        u8g.setColorIndex(0); // white on black
360
+      #endif
361
+
362
+      u8g.setPrintPos(0 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE);
363
+      _draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
364
+      u8g.setPrintPos(0 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE);
365
+      lcd_print(xstring);
366
+
367
+      u8g.setPrintPos(1 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE);
368
+      _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
369
+      u8g.setPrintPos(1 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE);
370
+      lcd_print(ystring);
371
+
372
+      u8g.setPrintPos(2 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE);
373
+      _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
374
+      u8g.setPrintPos(2 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE);
375
+      lcd_print(zstring);
376
+
377
+      #if DISABLED(XYZ_HOLLOW_FRAME)
378
+        u8g.setColorIndex(1); // black on white
379
+      #endif
380
+    }
381
+  }
382
+
383
+  //
384
+  // Feedrate
385
+  //
386
+
387
+  if (PAGE_CONTAINS(51 - INFO_FONT_HEIGHT, 49)) {
388
+    lcd_setFont(FONT_MENU);
389
+    u8g.setPrintPos(3, 50);
390
+    lcd_print(LCD_STR_FEEDRATE[0]);
391
+
392
+    lcd_setFont(FONT_STATUSMENU);
393
+    u8g.setPrintPos(12, 50);
394
+    lcd_print(itostr3(feedrate_percentage));
395
+    u8g.print('%');
396
+
397
+    //
398
+    // Filament sensor display if SD is disabled
399
+    //
400
+    #if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT)
401
+      u8g.setPrintPos(56, 50);
402
+      lcd_print(wstring);
403
+      u8g.setPrintPos(102, 50);
404
+      lcd_print(mstring);
405
+      u8g.print('%');
406
+      lcd_setFont(FONT_MENU);
407
+      u8g.setPrintPos(47, 50);
408
+      lcd_print(LCD_STR_FILAM_DIA);
409
+      u8g.setPrintPos(93, 50);
410
+      lcd_print(LCD_STR_FILAM_MUL);
411
+    #endif
412
+  }
413
+
414
+  //
415
+  // Status line
416
+  //
417
+
418
+  #define STATUS_BASELINE (55 + INFO_FONT_HEIGHT)
419
+
420
+  if (PAGE_CONTAINS(STATUS_BASELINE - (INFO_FONT_HEIGHT - 1), STATUS_BASELINE)) {
421
+    u8g.setPrintPos(0, STATUS_BASELINE);
422
+
423
+    #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
424
+      if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) {  //Display both Status message line and Filament display on the last line
425
+        lcd_implementation_status_message(blink);
426
+      }
427
+      else {
428
+        lcd_printPGM(PSTR(LCD_STR_FILAM_DIA));
429
+        u8g.print(':');
430
+        lcd_print(wstring);
431
+        lcd_printPGM(PSTR("  " LCD_STR_FILAM_MUL));
432
+        u8g.print(':');
433
+        lcd_print(mstring);
434
+        u8g.print('%');
435
+      }
436
+    #else
437
+      lcd_implementation_status_message(blink);
438
+    #endif
439
+  }
440
+}
441
+
442
+#endif // ULTRALCD_IMPL_STATUS_SCREEN_DOGM_H

Marlin/src/lcd/dogm/status_screen_lite_ST7920.h
Plik diff jest za duży
Wyświetl plik


+ 108
- 0
Marlin/src/lcd/dogm/status_screen_lite_ST7920_class.h Wyświetl plik

@@ -0,0 +1,108 @@
1
+/**
2
+ * Lightweight Status Screen for the RepRapDiscount Full
3
+ * Graphics Smart Controller (ST7920-based 128x64 LCD)
4
+ *
5
+ * (c) 2017 Aleph Objects, Inc.
6
+ *
7
+ * The code in this page is free software: you can
8
+ * redistribute it and/or modify it under the terms of the GNU
9
+ * General Public License (GNU GPL) as published by the Free Software
10
+ * Foundation, either version 3 of the License, or (at your option)
11
+ * any later version.  The code is distributed WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS
13
+ * FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
14
+ *
15
+ */
16
+
17
+#ifndef STATUS_SCREEN_LITE_ST7920_CLASS_H
18
+#define STATUS_SCREEN_LITE_ST7920_CLASS_H
19
+
20
+#include "../../core/macros.h"
21
+
22
+typedef const __FlashStringHelper *progmem_str;
23
+
24
+class ST7920_Lite_Status_Screen {
25
+  private:
26
+    static struct st7920_state_t {
27
+      uint8_t synced   : 1; // Whether a sync has been sent
28
+      uint8_t cmd      : 1; // Whether the sync was cmd or data
29
+      uint8_t extended : 1;
30
+      uint8_t graphics : 1;
31
+      uint8_t sa       : 1;
32
+    } current_bits;
33
+
34
+    static void cs();
35
+    static void ncs();
36
+    static void sync_cmd();
37
+    static void sync_dat();
38
+    static void write_byte(const uint8_t w);
39
+
40
+    FORCE_INLINE static void write_word(const uint16_t w) {
41
+      write_byte((w >> 8) & 0xFF);
42
+      write_byte((w >> 0) & 0xFF);
43
+    }
44
+
45
+    static void cmd(const uint8_t cmd);
46
+    static void begin_data();
47
+
48
+    static void write_str(const char *str);
49
+    static void write_str(const char *str, const uint8_t len);
50
+    static void write_str_P(const char * const str);
51
+    static void write_str(progmem_str str);
52
+    static void write_number(const uint8_t value, const uint8_t digits=3);
53
+
54
+    static void _extended_function_set(const bool extended, const bool graphics);
55
+    static void _scroll_or_addr_select(const bool sa);
56
+    static void reset_state_from_unknown();
57
+
58
+    static void home();
59
+    static void display_status(const bool display_on, const bool cursor_on, const bool blink_on);
60
+    static void extended_function_set(const bool extended);
61
+    static void graphics(const bool graphics);
62
+    static void entry_mode_select(const bool ac_increase, const bool shift);
63
+    static void scroll_or_addr_select(const bool sa);
64
+    static void set_ddram_address(const uint8_t addr);
65
+    static void set_cgram_address(const uint8_t addr);
66
+    static void set_gdram_address(const uint8_t x, const uint8_t y);
67
+
68
+    static void clear();
69
+    static void clear_ddram();
70
+    static void clear_gdram();
71
+
72
+    static void load_cgram_icon(const uint16_t addr, const void *data);
73
+    static void draw_gdram_icon(uint8_t x, uint8_t y, const void *data);
74
+
75
+    static uint8_t string_checksum(const char *str);
76
+
77
+  protected:
78
+    static void draw_static_elements();
79
+    static void draw_progress_bar(const uint8_t value);
80
+    static void draw_fan_icon(const bool whichIcon);
81
+    static void draw_heat_icon(const bool whichIcon, const bool heating);
82
+    static void draw_extruder_1_temp(const uint8_t temp, const uint8_t target);
83
+    static void draw_extruder_2_temp(const uint8_t temp, const uint8_t target);
84
+    static void draw_bed_temp(const uint8_t temp, const uint8_t target);
85
+    static void draw_fan_speed(const uint8_t value);
86
+    static void draw_print_time(const uint32_t elapsed);
87
+    static void draw_feedrate_percentage(const uint8_t percentage);
88
+    static void draw_status_message(const char *str);
89
+    static void draw_position(const float x, const float y, const float z, bool position_known = true);
90
+
91
+    static bool indicators_changed();
92
+    static bool position_changed();
93
+    static bool blink_changed();
94
+    static bool status_changed();
95
+
96
+    static void update_indicators(const bool forceUpdate);
97
+    static void update_position(const bool forceUpdate, bool resetChecksum);
98
+    static void update_status_or_position(bool forceUpdate);
99
+    static void update_progress(const bool forceUpdate);
100
+
101
+  public:
102
+    static void update(const bool forceUpdate);
103
+    static void on_entry();
104
+    static void on_exit();
105
+    static void clear_text_buffer();
106
+};
107
+
108
+#endif // STATUS_SCREEN_LITE_ST7920_CLASS_H

Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h → Marlin/src/lcd/dogm/status_screen_lite_ST7920_spi.h Wyświetl plik

@@ -1,4 +1,4 @@
1
-/*
1
+/**
2 2
  * Lightweight Status Screen for the RepRapDiscount Full
3 3
  * Graphics Smart Controller (ST7920-based 128x64 LCD)
4 4
  *
@@ -14,7 +14,7 @@
14 14
  *
15 15
  */
16 16
 
17
-#include "ultralcd_impl_st7920_lite_status_screen.h"
17
+#include "status_screen_lite_ST7920_class.h"
18 18
 
19 19
 void ST7920_Lite_Status_Screen::cs() {
20 20
   ST7920_CS();
@@ -34,6 +34,6 @@ void ST7920_Lite_Status_Screen::sync_dat() {
34 34
   ST7920_SET_DAT();
35 35
 }
36 36
 
37
-void ST7920_Lite_Status_Screen::write_byte(uint8_t data) {
38
-  ST7920_WRITE_NIBBLES(data);
39
-}
37
+void ST7920_Lite_Status_Screen::write_byte(const uint8_t data) {
38
+  ST7920_WRITE_BYTE(data);
39
+}

+ 0
- 247
Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h Wyświetl plik

@@ -1,247 +0,0 @@
1
-/*
2
- * Lightweight Status Screen for the RepRapDiscount Full
3
- * Graphics Smart Controller (ST7920-based 128x64 LCD)
4
- *
5
- * (c) 2017 Aleph Objects, Inc.
6
- *
7
- * The code in this page is free software: you can
8
- * redistribute it and/or modify it under the terms of the GNU
9
- * General Public License (GNU GPL) as published by the Free Software
10
- * Foundation, either version 3 of the License, or (at your option)
11
- * any later version.  The code is distributed WITHOUT ANY WARRANTY;
12
- * without even the implied warranty of MERCHANTABILITY or FITNESS
13
- * FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
14
- *
15
- */
16
-
17
-#ifndef ULTRALCD_ST7920_LITE_STATUS_H
18
-#define ULTRALCD_ST7920_LITE_STATUS_H
19
-
20
-class ST7920_Lite_Status_Screen {
21
-  private:
22
-    static struct st7920_state_t {
23
-      uint8_t synced   : 1; // Whether a sync has been sent
24
-      uint8_t cmd      : 1; // Whether the sync was cmd or data
25
-      uint8_t extended : 1;
26
-      uint8_t graphics : 1;
27
-      uint8_t sa       : 1;
28
-    } current_bits;
29
-
30
-    static void cs();
31
-    static void ncs();
32
-    static void sync_cmd();
33
-    static void sync_dat();
34
-    static void write_byte(uint8_t w);
35
-
36
-    static void cmd(uint8_t cmd);
37
-    static void begin_data();
38
-    static void write_word(uint16_t w);
39
-    static void write_str(const char *str);
40
-    static void write_str(const char *str, uint8_t len);
41
-    static void write_str_P(const char *str);
42
-    static void write_str(progmem_str str);
43
-    static void write_number(uint8_t value, uint8_t digits=3);
44
-
45
-    static void _extended_function_set(bool extended, bool graphics);
46
-    static void _scroll_or_addr_select(bool sa);
47
-    static void reset_state_from_unknown();
48
-
49
-    static void home();
50
-    static void display_status(bool display_on, bool cursor_on, bool blink_on);
51
-    static void extended_function_set(bool extended);
52
-    static void graphics(bool graphics);
53
-    static void entry_mode_select(bool ac_increase, bool shift);
54
-    static void scroll_or_addr_select(bool sa);
55
-    static void set_ddram_address(uint8_t addr);
56
-    static void set_cgram_address(uint8_t addr);
57
-    static void set_gdram_address(uint8_t x, uint8_t y);
58
-
59
-    static void clear();
60
-    static void clear_ddram();
61
-    static void clear_gdram();
62
-
63
-    static void load_cgram_icon(uint16_t addr, const void *data);
64
-    static void draw_gdram_icon(uint8_t x, uint8_t y, const void *data);
65
-
66
-    static uint8_t string_checksum(const char *str);
67
-
68
-  protected:
69
-    static void draw_static_elements();
70
-    static void draw_progress_bar(uint8_t value);
71
-    static void draw_fan_icon(bool whichIcon);
72
-    static void draw_heat_icon(bool whichIcon, bool heating);
73
-    static void draw_extruder_1_temp(uint8_t temp, uint8_t target);
74
-    static void draw_extruder_2_temp(uint8_t temp, uint8_t target);
75
-    static void draw_bed_temp(uint8_t temp, uint8_t target);
76
-    static void draw_fan_speed(uint8_t value);
77
-    static void draw_print_time(uint32_t elapsed);
78
-    static void draw_feedrate_percentage(uint8_t percentage);
79
-    static void draw_status_message(const char *str);
80
-    static void draw_position(const float x, const float y, const float z, bool position_known = true);
81
-
82
-    static bool indicators_changed();
83
-    static bool position_changed();
84
-    static bool blink_changed();
85
-    static bool status_changed();
86
-
87
-    static void update_indicators(bool forceUpdate);
88
-    static void update_position(bool forceUpdate, bool resetChecksum);
89
-    static void update_status_or_position(bool forceUpdate);
90
-    static void update_progress(bool forceUpdate);
91
-
92
-  public:
93
-    static void update(bool forceUpdate);
94
-    static void on_entry();
95
-    static void on_exit();
96
-    static void clear_text_buffer();
97
-};
98
-
99
-/************************** ICON DEFINITIONS *************************************/
100
-
101
-#define CGRAM_ICON_1_ADDR 0x00
102
-#define CGRAM_ICON_2_ADDR 0x10
103
-#define CGRAM_ICON_3_ADDR 0x20
104
-#define CGRAM_ICON_4_ADDR 0x30
105
-
106
-#define CGRAM_ICON_1_WORD 0x00
107
-#define CGRAM_ICON_2_WORD 0x02
108
-#define CGRAM_ICON_3_WORD 0x04
109
-#define CGRAM_ICON_4_WORD 0x06
110
-
111
-PROGMEM const uint16_t nozzle_icon[] = {
112
-  0b0000000000000000,
113
-  0b0000000000000000,
114
-  0b0000111111110000,
115
-  0b0001111111111000,
116
-  0b0001111111111000,
117
-  0b0001111111111000,
118
-  0b0000111111110000,
119
-  0b0000111111110000,
120
-  0b0001111111111000,
121
-  0b0001111111111000,
122
-  0b0001111111111000,
123
-  0b0000011111100000,
124
-  0b0000001111000000,
125
-  0b0000000110000000,
126
-  0b0000000000000000,
127
-  0b0000000000000000
128
-};
129
-
130
-PROGMEM const uint16_t bed_icon[] = {
131
-  0b0000000000000000,
132
-  0b0000000000000000,
133
-  0b0000000000000000,
134
-  0b0000000000000000,
135
-  0b0000000000000000,
136
-  0b0000000000000000,
137
-  0b0000000000000000,
138
-  0b0000000000000000,
139
-  0b0000000000000000,
140
-  0b0000000000000000,
141
-  0b0000000000000000,
142
-  0b0000000000000000,
143
-  0b0111111111111110,
144
-  0b0111111111111110,
145
-  0b0000000000000000,
146
-  0b0000000000000000
147
-};
148
-
149
-PROGMEM const uint16_t heat1_icon[] = {
150
-  0b0000000000000000,
151
-  0b0000000000000000,
152
-  0b0010001000100000,
153
-  0b0001000100010000,
154
-  0b0000100010001000,
155
-  0b0000100010001000,
156
-  0b0001000100010000,
157
-  0b0010001000100000,
158
-  0b0010001000100000,
159
-  0b0001000100010000,
160
-  0b0000100010001000,
161
-  0b0000000000000000,
162
-  0b0000000000000000,
163
-  0b0000000000000000,
164
-  0b0000000000000000,
165
-  0b0000000000000000
166
-};
167
-
168
-PROGMEM const uint16_t heat2_icon[] = {
169
-  0b0000000000000000,
170
-  0b0000000000000000,
171
-  0b0000100010001000,
172
-  0b0000100010001000,
173
-  0b0001000100010000,
174
-  0b0010001000100000,
175
-  0b0010001000100000,
176
-  0b0001000100010000,
177
-  0b0000100010001000,
178
-  0b0000100010001000,
179
-  0b0001000100010000,
180
-  0b0000000000000000,
181
-  0b0000000000000000,
182
-  0b0000000000000000,
183
-  0b0000000000000000,
184
-  0b0000000000000000
185
-};
186
-
187
-PROGMEM const uint16_t fan1_icon[] = {
188
-  0b0000000000000000,
189
-  0b0111111111111110,
190
-  0b0111000000001110,
191
-  0b0110001111000110,
192
-  0b0100001111000010,
193
-  0b0100000110000010,
194
-  0b0101100000011010,
195
-  0b0101110110111010,
196
-  0b0101100000011010,
197
-  0b0100000110000010,
198
-  0b0100001111000010,
199
-  0b0110001111000110,
200
-  0b0111000000001110,
201
-  0b0111111111111110,
202
-  0b0000000000000000,
203
-  0b0000000000000000
204
-};
205
-
206
-PROGMEM const uint16_t fan2_icon[] = {
207
-  0b0000000000000000,
208
-  0b0111111111111110,
209
-  0b0111000000001110,
210
-  0b0110010000100110,
211
-  0b0100111001110010,
212
-  0b0101111001111010,
213
-  0b0100110000110010,
214
-  0b0100000110000010,
215
-  0b0100110000110010,
216
-  0b0101111001111010,
217
-  0b0100111001110010,
218
-  0b0110010000100110,
219
-  0b0111000000001110,
220
-  0b0111111111111110,
221
-  0b0000000000000000,
222
-  0b0000000000000000
223
-};
224
-
225
-PROGMEM const uint16_t feedrate_icon[] = {
226
-  0b0000000000000000,
227
-  0b0111111000000000,
228
-  0b0100000000000000,
229
-  0b0100000000000000,
230
-  0b0100000000000000,
231
-  0b0111111011111000,
232
-  0b0100000010000100,
233
-  0b0100000010000100,
234
-  0b0100000010000100,
235
-  0b0100000011111000,
236
-  0b0000000010001000,
237
-  0b0000000010000100,
238
-  0b0000000010000100,
239
-  0b0000000010000010,
240
-  0b0000000000000000,
241
-  0b0000000000000000
242
-};
243
-
244
-static void lcd_implementation_status_screen();
245
-static void lcd_in_status(bool inStatus);
246
-
247
-#endif // ULTRALCD_ST7920_LITE_STATUS_H

+ 2
- 4
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp Wyświetl plik

@@ -183,12 +183,10 @@ uint8_t   u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U
183 183
 u8g_pb_t  u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0}, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf};
184 184
 u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn};
185 185
 
186
-#if ENABLED(USE_ST7920_LIGHTWEIGHT_UI)
187
-  typedef const __FlashStringHelper *progmem_str;
188
-
186
+#if ENABLED(LIGHTWEIGHT_UI)
189 187
   // We have to include the code for the lightweight UI here
190 188
   // as it relies on macros that are only defined in this file.
191
-  #include "ultralcd_impl_st7920_lite_status_screen_impl_spi.h"
189
+  #include "status_screen_lite_ST7920_spi.h"
192 190
 #endif
193 191
 
194 192
 #pragma GCC reset_options

+ 8
- 12
Marlin/src/lcd/ultralcd.cpp Wyświetl plik

@@ -5116,23 +5116,19 @@ void lcd_update() {
5116 5116
       #endif
5117 5117
 
5118 5118
       #if ENABLED(DOGLCD)
5119
-        #if defined(USE_ST7920_LIGHTWEIGHT_UI)
5119
+        #if ENABLED(LIGHTWEIGHT_UI)
5120 5120
           #if ENABLED(ULTIPANEL)
5121
-            bool do_U8G_loop = true;
5122
-            lcd_in_status(currentScreen == lcd_status_screen);
5123
-            if(currentScreen == lcd_status_screen) {
5124
-              lcd_status_screen();
5125
-              do_U8G_loop = false;
5126
-            }
5121
+            const bool in_status = currentScreen == lcd_status_screen;
5127 5122
           #else
5128
-            const bool do_U8G_loop = false;
5129
-            lcd_in_status(true);
5130
-            lcd_status_screen();
5123
+            constexpr bool in_status = true;
5131 5124
           #endif
5125
+          const bool do_u8g_loop = !in_status;
5126
+          lcd_in_status(in_status);
5127
+          if (in_status) lcd_status_screen();
5132 5128
         #else
5133
-          const bool do_U8G_loop = true;
5129
+          constexpr bool do_u8g_loop = true;
5134 5130
         #endif
5135
-        if(do_U8G_loop) {
5131
+        if (do_u8g_loop) {
5136 5132
           if (!drawing_screen) {                        // If not already drawing pages
5137 5133
             u8g.firstPage();                            // Start the first page
5138 5134
             drawing_screen = 1;                         // Flag as drawing pages

+ 7
- 422
Marlin/src/lcd/ultralcd_impl_DOGM.h Wyświetl plik

@@ -54,11 +54,6 @@
54 54
 
55 55
 #include "dogm/dogm_bitmaps.h"
56 56
 
57
-#if ENABLED(USE_ST7920_LIGHTWEIGHT_UI)
58
-  typedef const __FlashStringHelper *progmem_str;
59
-  #include "dogm/ultralcd_impl_st7920_lite_status_screen_impl.h"
60
-#endif
61
-
62 57
 #if ENABLED(SDSUPPORT)
63 58
   #include "../libs/duration_t.h"
64 59
 #endif
@@ -348,6 +343,12 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
348 343
 
349 344
 #endif // SHOW_BOOTSCREEN
350 345
 
346
+#if ENABLED(LIGHTWEIGHT_UI)
347
+  #include "dogm/status_screen_lite_ST7920.h"
348
+#else
349
+  #include "dogm/status_screen_DOGM.h"
350
+#endif
351
+
351 352
 // Initialize or re-initialize the LCD
352 353
 static void lcd_implementation_init() {
353 354
 
@@ -378,7 +379,7 @@ static void lcd_implementation_init() {
378 379
 
379 380
 // The kill screen is displayed for unrecoverable conditions
380 381
 void lcd_kill_screen() {
381
-  #if ENABLED(USE_ST7920_LIGHTWEIGHT_UI)
382
+  #if ENABLED(LIGHTWEIGHT_UI)
382 383
     ST7920_Lite_Status_Screen::clear_text_buffer();
383 384
   #endif
384 385
   const uint8_t h4 = u8g.getHeight() / 4;
@@ -396,422 +397,6 @@ void lcd_kill_screen() {
396 397
 
397 398
 void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
398 399
 
399
-//
400
-// Status Screen
401
-//
402
-
403
-FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) {
404
-  const char * const str = itostr3(temp);
405
-  u8g.setPrintPos(x - (str[0] != ' ' ? 0 : str[1] != ' ' ? 1 : 2) * DOG_CHAR_WIDTH / 2, y);
406
-  lcd_print(str);
407
-  lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
408
-}
409
-
410
-#ifndef HEAT_INDICATOR_X
411
-  #define HEAT_INDICATOR_X 8
412
-#endif
413
-
414
-FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) {
415
-  #if !HEATER_IDLE_HANDLER
416
-    UNUSED(blink);
417
-  #endif
418
-
419
-  #if HAS_TEMP_BED
420
-    const bool isBed = heater < 0;
421
-  #else
422
-    constexpr bool isBed = false;
423
-  #endif
424
-
425
-  if (PAGE_UNDER(7)) {
426
-    #if HEATER_IDLE_HANDLER
427
-      const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
428
-        #if HAS_TEMP_BED
429
-          thermalManager.is_bed_idle()
430
-        #else
431
-          false
432
-        #endif
433
-      );
434
-
435
-      if (blink || !is_idle)
436
-    #endif
437
-    _draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); }
438
-
439
-  if (PAGE_CONTAINS(21, 28))
440
-    _draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28);
441
-
442
-  if (PAGE_CONTAINS(17, 20)) {
443
-    const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X,
444
-                  y = isBed ? 18 : 17;
445
-    if (isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater)) {
446
-      u8g.setColorIndex(0); // white on black
447
-      u8g.drawBox(x + h, y, 2, 2);
448
-      u8g.setColorIndex(1); // black on white
449
-    }
450
-    else {
451
-      u8g.drawBox(x + h, y, 2, 2);
452
-    }
453
-  }
454
-}
455
-
456
-FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, const bool blink) {
457
-  if (blink)
458
-    lcd_printPGM(pstr);
459
-  else {
460
-    if (!axis_homed[axis])
461
-      u8g.print('?');
462
-    else {
463
-      #if DISABLED(HOME_AFTER_DEACTIVATE) && DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
464
-        if (!axis_known_position[axis])
465
-          u8g.print(' ');
466
-        else
467
-      #endif
468
-          lcd_printPGM(pstr);
469
-    }
470
-  }
471
-}
472
-
473
-inline void lcd_implementation_status_message(const bool blink) {
474
-  #if ENABLED(STATUS_MESSAGE_SCROLLING)
475
-    static bool last_blink = false;
476
-    const uint8_t slen = lcd_strlen(lcd_status_message);
477
-    const char *stat = lcd_status_message + status_scroll_pos;
478
-    if (slen <= LCD_WIDTH)
479
-      lcd_print_utf(stat);                                      // The string isn't scrolling
480
-    else {
481
-      if (status_scroll_pos <= slen - LCD_WIDTH)
482
-        lcd_print_utf(stat);                                    // The string fills the screen
483
-      else {
484
-        uint8_t chars = LCD_WIDTH;
485
-        if (status_scroll_pos < slen) {                         // First string still visible
486
-          lcd_print_utf(stat);                                  // The string leaves space
487
-          chars -= slen - status_scroll_pos;                    // Amount of space left
488
-        }
489
-        u8g.print('.');                                         // Always at 1+ spaces left, draw a dot
490
-        if (--chars) {
491
-          if (status_scroll_pos < slen + 1)                     // Draw a second dot if there's space
492
-            --chars, u8g.print('.');
493
-          if (chars) lcd_print_utf(lcd_status_message, chars);  // Print a second copy of the message
494
-        }
495
-      }
496
-      if (last_blink != blink) {
497
-        last_blink = blink;
498
-        // Skip any non-printing bytes
499
-        if (status_scroll_pos < slen) while (!PRINTABLE(lcd_status_message[status_scroll_pos])) status_scroll_pos++;
500
-        if (++status_scroll_pos >= slen + 2) status_scroll_pos = 0;
501
-      }
502
-    }
503
-  #else
504
-    UNUSED(blink);
505
-    lcd_print_utf(lcd_status_message);
506
-  #endif
507
-}
508
-
509
-#if !ENABLED(USE_ST7920_LIGHTWEIGHT_UI)
510
-static void lcd_implementation_status_screen() {
511
-
512
-  const bool blink = lcd_blink();
513
-
514
-  #if FAN_ANIM_FRAMES > 2
515
-    static bool old_blink;
516
-    static uint8_t fan_frame;
517
-    if (old_blink != blink) {
518
-      old_blink = blink;
519
-      if (!fanSpeeds[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0;
520
-    }
521
-  #endif
522
-
523
-  // Status Menu Font
524
-  lcd_setFont(FONT_STATUSMENU);
525
-
526
-  //
527
-  // Fan Animation
528
-  //
529
-  // Draws the whole heading image as a B/W bitmap rather than
530
-  // drawing the elements separately.
531
-  // This was done as an optimization, as it was slower to draw
532
-  // multiple parts compared to a single bitmap.
533
-  //
534
-  // The bitmap:
535
-  // - May be offset in X
536
-  // - Includes all nozzle(s), bed(s), and the fan.
537
-  //
538
-  // TODO:
539
-  //
540
-  // - Only draw the whole header on the first
541
-  //   entry to the status screen. Nozzle, bed, and
542
-  //   fan outline bits don't change.
543
-  //
544
-  if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) {
545
-
546
-    u8g.drawBitmapP(
547
-      STATUS_SCREEN_X, STATUS_SCREEN_Y,
548
-      (STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT,
549
-      #if HAS_FAN0
550
-        #if FAN_ANIM_FRAMES > 2
551
-          fan_frame == 1 ? status_screen1_bmp :
552
-          fan_frame == 2 ? status_screen2_bmp :
553
-          #if FAN_ANIM_FRAMES > 3
554
-            fan_frame == 3 ? status_screen3_bmp :
555
-          #endif
556
-        #else
557
-          blink && fanSpeeds[0] ? status_screen1_bmp :
558
-        #endif
559
-      #endif
560
-      status_screen0_bmp
561
-    );
562
-
563
-  }
564
-
565
-  //
566
-  // Temperature Graphics and Info
567
-  //
568
-
569
-  if (PAGE_UNDER(28)) {
570
-    // Extruders
571
-    HOTEND_LOOP() _draw_heater_status(STATUS_SCREEN_HOTEND_TEXT_X(e), e, blink);
572
-
573
-    // Heated bed
574
-    #if HOTENDS < 4 && HAS_TEMP_BED
575
-      _draw_heater_status(STATUS_SCREEN_BED_TEXT_X, -1, blink);
576
-    #endif
577
-
578
-    #if HAS_FAN0
579
-      if (PAGE_CONTAINS(20, 27)) {
580
-        // Fan
581
-        const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
582
-        if (per) {
583
-          u8g.setPrintPos(STATUS_SCREEN_FAN_TEXT_X, STATUS_SCREEN_FAN_TEXT_Y);
584
-          lcd_print(itostr3(per));
585
-          u8g.print('%');
586
-        }
587
-      }
588
-    #endif
589
-  }
590
-
591
-  #if ENABLED(SDSUPPORT)
592
-    //
593
-    // SD Card Symbol
594
-    //
595
-    if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) {
596
-      // Upper box
597
-      u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7);     // 42-48 (or 41-47)
598
-      // Right edge
599
-      u8g.drawBox(50, 44 - (TALL_FONT_CORRECTION), 2, 5);     // 44-48 (or 43-47)
600
-      // Bottom hollow box
601
-      u8g.drawFrame(42, 49 - (TALL_FONT_CORRECTION), 10, 4);  // 49-52 (or 48-51)
602
-      // Corner pixel
603
-      u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION));         // 43 (or 42)
604
-    }
605
-  #endif // SDSUPPORT
606
-
607
-  #if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
608
-    //
609
-    // Progress bar frame
610
-    //
611
-    #define PROGRESS_BAR_X 54
612
-    #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
613
-
614
-    if (PAGE_CONTAINS(49, 52 - (TALL_FONT_CORRECTION)))       // 49-52 (or 49-51)
615
-      u8g.drawFrame(
616
-        PROGRESS_BAR_X, 49,
617
-        PROGRESS_BAR_WIDTH, 4 - (TALL_FONT_CORRECTION)
618
-      );
619
-
620
-    #if DISABLED(LCD_SET_PROGRESS_MANUALLY)
621
-      const uint8_t progress_bar_percent = card.percentDone();
622
-    #endif
623
-
624
-    if (progress_bar_percent > 1) {
625
-
626
-      //
627
-      // Progress bar solid part
628
-      //
629
-
630
-      if (PAGE_CONTAINS(50, 51 - (TALL_FONT_CORRECTION)))     // 50-51 (or just 50)
631
-        u8g.drawBox(
632
-          PROGRESS_BAR_X + 1, 50,
633
-          (uint16_t)((PROGRESS_BAR_WIDTH - 2) * progress_bar_percent * 0.01), 2 - (TALL_FONT_CORRECTION)
634
-        );
635
-
636
-      //
637
-      // SD Percent Complete
638
-      //
639
-
640
-      #if ENABLED(DOGM_SD_PERCENT)
641
-        if (PAGE_CONTAINS(41, 48)) {
642
-          // Percent complete
643
-          u8g.setPrintPos(55, 48);
644
-          u8g.print(itostr3(progress_bar_percent));
645
-          u8g.print('%');
646
-        }
647
-      #endif
648
-    }
649
-
650
-    //
651
-    // Elapsed Time
652
-    //
653
-
654
-    #if DISABLED(DOGM_SD_PERCENT)
655
-      #define SD_DURATION_X (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH / 2) - len * (DOG_CHAR_WIDTH / 2))
656
-    #else
657
-      #define SD_DURATION_X (LCD_PIXEL_WIDTH - len * DOG_CHAR_WIDTH)
658
-    #endif
659
-
660
-    if (PAGE_CONTAINS(41, 48)) {
661
-      char buffer[10];
662
-      duration_t elapsed = print_job_timer.duration();
663
-      bool has_days = (elapsed.value >= 60*60*24L);
664
-      uint8_t len = elapsed.toDigital(buffer, has_days);
665
-      u8g.setPrintPos(SD_DURATION_X, 48);
666
-      lcd_print(buffer);
667
-    }
668
-
669
-  #endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
670
-
671
-  //
672
-  // XYZ Coordinates
673
-  //
674
-
675
-  #if ENABLED(USE_SMALL_INFOFONT)
676
-    #define INFO_FONT_HEIGHT 7
677
-  #else
678
-    #define INFO_FONT_HEIGHT 8
679
-  #endif
680
-
681
-  #define XYZ_BASELINE (30 + INFO_FONT_HEIGHT)
682
-
683
-  #define X_LABEL_POS  3
684
-  #define X_VALUE_POS 11
685
-  #define XYZ_SPACING 40
686
-
687
-  #if ENABLED(XYZ_HOLLOW_FRAME)
688
-    #define XYZ_FRAME_TOP 29
689
-    #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 3
690
-  #else
691
-    #define XYZ_FRAME_TOP 30
692
-    #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 1
693
-  #endif
694
-
695
-  // Before homing the axis letters are blinking 'X' <-> '?'.
696
-  // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '.
697
-  // When everything is ok you see a constant 'X'.
698
-
699
-  static char xstring[5], ystring[5], zstring[7];
700
-  #if ENABLED(FILAMENT_LCD_DISPLAY)
701
-    static char wstring[5], mstring[4];
702
-  #endif
703
-
704
-  // At the first page, regenerate the XYZ strings
705
-  if (page.page == 0) {
706
-    strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])));
707
-    strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
708
-    strcpy(zstring, ftostr52sp(FIXFLOAT(LOGICAL_Z_POSITION(current_position[Z_AXIS]))));
709
-    #if ENABLED(FILAMENT_LCD_DISPLAY)
710
-      strcpy(wstring, ftostr12ns(filament_width_meas));
711
-      strcpy(mstring, itostr3(100.0 * (
712
-          parser.volumetric_enabled
713
-            ? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
714
-            : planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
715
-        )
716
-      ));
717
-    #endif
718
-  }
719
-
720
-  if (PAGE_CONTAINS(XYZ_FRAME_TOP, XYZ_FRAME_TOP + XYZ_FRAME_HEIGHT - 1)) {
721
-
722
-    #if ENABLED(XYZ_HOLLOW_FRAME)
723
-      u8g.drawFrame(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 29-40  7: 29-39
724
-    #else
725
-      u8g.drawBox(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT);   // 8: 30-39  7: 30-37
726
-    #endif
727
-
728
-    if (PAGE_CONTAINS(XYZ_BASELINE - (INFO_FONT_HEIGHT - 1), XYZ_BASELINE)) {
729
-
730
-      #if DISABLED(XYZ_HOLLOW_FRAME)
731
-        u8g.setColorIndex(0); // white on black
732
-      #endif
733
-
734
-      u8g.setPrintPos(0 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE);
735
-      _draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
736
-      u8g.setPrintPos(0 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE);
737
-      lcd_print(xstring);
738
-
739
-      u8g.setPrintPos(1 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE);
740
-      _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
741
-      u8g.setPrintPos(1 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE);
742
-      lcd_print(ystring);
743
-
744
-      u8g.setPrintPos(2 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE);
745
-      _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
746
-      u8g.setPrintPos(2 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE);
747
-      lcd_print(zstring);
748
-
749
-      #if DISABLED(XYZ_HOLLOW_FRAME)
750
-        u8g.setColorIndex(1); // black on white
751
-      #endif
752
-    }
753
-  }
754
-
755
-  //
756
-  // Feedrate
757
-  //
758
-
759
-  if (PAGE_CONTAINS(51 - INFO_FONT_HEIGHT, 49)) {
760
-    lcd_setFont(FONT_MENU);
761
-    u8g.setPrintPos(3, 50);
762
-    lcd_print(LCD_STR_FEEDRATE[0]);
763
-
764
-    lcd_setFont(FONT_STATUSMENU);
765
-    u8g.setPrintPos(12, 50);
766
-    lcd_print(itostr3(feedrate_percentage));
767
-    u8g.print('%');
768
-
769
-    //
770
-    // Filament sensor display if SD is disabled
771
-    //
772
-    #if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT)
773
-      u8g.setPrintPos(56, 50);
774
-      lcd_print(wstring);
775
-      u8g.setPrintPos(102, 50);
776
-      lcd_print(mstring);
777
-      u8g.print('%');
778
-      lcd_setFont(FONT_MENU);
779
-      u8g.setPrintPos(47, 50);
780
-      lcd_print(LCD_STR_FILAM_DIA);
781
-      u8g.setPrintPos(93, 50);
782
-      lcd_print(LCD_STR_FILAM_MUL);
783
-    #endif
784
-  }
785
-
786
-  //
787
-  // Status line
788
-  //
789
-
790
-  #define STATUS_BASELINE (55 + INFO_FONT_HEIGHT)
791
-
792
-  if (PAGE_CONTAINS(STATUS_BASELINE - (INFO_FONT_HEIGHT - 1), STATUS_BASELINE)) {
793
-    u8g.setPrintPos(0, STATUS_BASELINE);
794
-
795
-    #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
796
-      if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) {  //Display both Status message line and Filament display on the last line
797
-        lcd_implementation_status_message(blink);
798
-      }
799
-      else {
800
-        lcd_printPGM(PSTR(LCD_STR_FILAM_DIA));
801
-        u8g.print(':');
802
-        lcd_print(wstring);
803
-        lcd_printPGM(PSTR("  " LCD_STR_FILAM_MUL));
804
-        u8g.print(':');
805
-        lcd_print(mstring);
806
-        u8g.print('%');
807
-      }
808
-    #else
809
-      lcd_implementation_status_message(blink);
810
-    #endif
811
-  }
812
-}
813
-#endif
814
-
815 400
 #if ENABLED(ULTIPANEL)
816 401
 
817 402
   uint8_t row_y1, row_y2;

Ładowanie…
Anuluj
Zapisz