From 5c81ce2bb8f44b3c1799d50c6fd3950a772c96b1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Mar 2018 02:44:41 -0500 Subject: [PATCH] When STATUS_EXPIRE_SECONDS is 0, hide the position. (#10100) Some users may prefer to hide the position updates on the `LIGHTWEIGHT_UI` altogether. This leads to an even less cluttered display (it also saves on SPI traffic and one byte of RAM). --- Marlin/Configuration_adv.h | 3 + .../AlephObjects/TAZ4/Configuration_adv.h | 3 + .../Anet/A6/Configuration_adv.h | 3 + .../Anet/A8/Configuration_adv.h | 3 + .../BIBO/TouchX/Configuration_adv.h | 3 + .../BQ/Hephestos/Configuration_adv.h | 3 + .../BQ/Hephestos_2/Configuration_adv.h | 3 + .../BQ/WITBOX/Configuration_adv.h | 3 + .../Cartesio/Configuration_adv.h | 3 + .../Creality/CR-10/Configuration_adv.h | 3 + .../Creality/CR-10S/Configuration_adv.h | 3 + .../Creality/CR-10mini/Configuration_adv.h | 3 + .../Creality/Ender-2/Configuration_adv.h | 3 + .../Creality/Ender-4/Configuration_adv.h | 3 + .../Felix/Configuration_adv.h | 3 + .../FolgerTech/i3-2020/Configuration_adv.h | 3 + .../Infitary/i3-M508/Configuration_adv.h | 3 + .../JGAurora/A5/Configuration_adv.h | 3 + .../Malyan/M150/Configuration_adv.h | 3 + .../Micromake/C1/enhanced/Configuration_adv.h | 3 + .../RigidBot/Configuration_adv.h | 3 + .../SCARA/Configuration_adv.h | 3 + .../Sanguinololu/Configuration_adv.h | 3 + .../TinyBoy2/Configuration_adv.h | 3 + .../Velleman/K8200/Configuration_adv.h | 3 + .../Velleman/K8400/Configuration_adv.h | 3 + .../Wanhao/Duplicator 6/Configuration_adv.h | 3 + .../FLSUN/auto_calibrate/Configuration_adv.h | 3 + .../delta/FLSUN/kossel/Configuration_adv.h | 3 + .../FLSUN/kossel_mini/Configuration_adv.h | 3 + .../delta/generic/Configuration_adv.h | 3 + .../delta/kossel_mini/Configuration_adv.h | 3 + .../delta/kossel_pro/Configuration_adv.h | 3 + .../delta/kossel_xl/Configuration_adv.h | 3 + .../gCreate/gMax1.5+/Configuration_adv.h | 3 + .../makibox/Configuration_adv.h | 3 + .../tvrrug/Round2/Configuration_adv.h | 3 + .../wt150/Configuration_adv.h | 3 + Marlin/status_screen_lite_ST7920.h | 84 +++++++++++-------- 39 files changed, 164 insertions(+), 34 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 2ddb0c806d..42e76e72f7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 89881e6ebe..dd471d8f1a 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index 9196c7dd9b..6a0e326a14 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 0e97233314..be652a5f2c 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h index a3160b1171..14bb649d36 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index 90c5f24145..2b5351980a 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index 7167b42b44..3624171938 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index 90c5f24145..2b5351980a 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 98a65be379..56d7667ebc 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index b9482b1a17..84b5d27db9 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h index 91d13b06ba..b50d4263f5 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h index 230ff3e711..d0e5d4fad2 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h index ea94aa1ebd..b1aa44b7b3 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h index 1234e1a2da..8ce6d0b6b0 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index b5a01ce4a1..27557e5d30 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index 00283a6b5f..15c3b6fcde 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -664,6 +664,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 7ebcba3871..71dc51fa00 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h index 7b19b95752..dc94e6de5c 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index 593acc4eb7..0a3d4b95a1 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index d6ab38ea37..4af9d4d897 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index c4e198e027..0dc6fb1304 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 86496afa78..83d4c07350 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 1ed231d292..85e1bcfb36 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index af409936e8..5bbe5e1bf6 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index ff4eb9d9fc..63a95cdc78 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -678,6 +678,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 8159e535ff..314bd123f7 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h index 44c1794f71..1ce8f3bb9b 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -667,6 +667,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index fa283e6d36..0d977564c5 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -667,6 +667,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h index a1267c8262..0c93829e10 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -667,6 +667,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 6a37f3bb7f..0f0be645bc 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -667,6 +667,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 6a37f3bb7f..0f0be645bc 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -667,6 +667,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 6a37f3bb7f..0f0be645bc 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -667,6 +667,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 0192077778..5b5d5472e9 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -672,6 +672,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 77f55908d0..c7e0edc707 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -667,6 +667,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index 57df985763..afce5c2c63 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index c71706718d..cc15afb33f 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index f330477fa8..f98a582b74 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -665,6 +665,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index 10f47d3101..8b4d80920b 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -666,6 +666,9 @@ * Since LIGHTWEIGHT_UI has limited space, the position and status * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. */ //#define LIGHTWEIGHT_UI #if ENABLED(LIGHTWEIGHT_UI) diff --git a/Marlin/status_screen_lite_ST7920.h b/Marlin/status_screen_lite_ST7920.h index 508901cc9e..428a436bf5 100644 --- a/Marlin/status_screen_lite_ST7920.h +++ b/Marlin/status_screen_lite_ST7920.h @@ -622,7 +622,7 @@ void ST7920_Lite_Status_Screen::draw_status_message(const char *str) { // Trim whitespace at the end of the str, as for some reason // messages like "Card Inserted" are padded with many spaces - while (str_len > 0 && str[str_len - 1] == ' ') str_len--; + while (str_len && str[str_len - 1] == ' ') str_len--; if (str_len <= lcd_len) { // It all fits on the LCD without scrolling @@ -765,8 +765,15 @@ bool ST7920_Lite_Status_Screen::blink_changed() { return true; } +#ifndef STATUS_EXPIRE_SECONDS + #define STATUS_EXPIRE_SECONDS 20 +#endif + void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { - static uint8_t countdown = 0; + + #if STATUS_EXPIRE_SECONDS + static uint8_t countdown = 0; + #endif /** * There is only enough room in the display for either the @@ -779,51 +786,60 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { * countdown > 1 -- Show status * countdown = 1 -- Show status, until movement * countdown = 0 -- Show position + * + * If STATUS_EXPIRE_SECONDS is zero, the position display + * will be disabled and only the status will be shown. */ if (forceUpdate || status_changed()) { #if ENABLED(STATUS_MESSAGE_SCROLLING) status_scroll_pos = 0; #endif - #ifndef STATUS_EXPIRE_SECONDS - #define STATUS_EXPIRE_SECONDS 20 + #if STATUS_EXPIRE_SECONDS + countdown = lcd_status_message[0] ? STATUS_EXPIRE_SECONDS : 0; #endif - countdown = lcd_strlen(lcd_status_message) ? STATUS_EXPIRE_SECONDS : 0; draw_status_message(lcd_status_message); blink_changed(); // Clear changed flag } - else if (countdown > 1 && blink_changed()) { - countdown--; + #if !STATUS_EXPIRE_SECONDS #if ENABLED(STATUS_MESSAGE_SCROLLING) - draw_status_message(lcd_status_message); + else + draw_status_message(lcd_status_message); #endif - } - else if (countdown > 0 && blink_changed()) { - if (position_changed()) { + #else + else if (countdown > 1 && blink_changed()) { countdown--; - forceUpdate = true; - } - #if ENABLED(STATUS_MESSAGE_SCROLLING) - draw_status_message(lcd_status_message); - #endif - } - if (countdown == 0 && (forceUpdate || position_changed() || - #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) - blink_changed() - #endif - )) { - draw_position( - current_position[X_AXIS], - current_position[Y_AXIS], - current_position[Z_AXIS], - #if ENABLED(DISABLE_REDUCED_ACCURACY_WARNING) - true - #else - axis_known_position[X_AXIS] && - axis_known_position[Y_AXIS] && - axis_known_position[Z_AXIS] + #if ENABLED(STATUS_MESSAGE_SCROLLING) + draw_status_message(lcd_status_message); #endif - ); - } + } + else if (countdown > 0 && blink_changed()) { + if (position_changed()) { + countdown--; + forceUpdate = true; + } + #if ENABLED(STATUS_MESSAGE_SCROLLING) + draw_status_message(lcd_status_message); + #endif + } + if (countdown == 0 && (forceUpdate || position_changed() || + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + blink_changed() + #endif + )) { + draw_position( + current_position[X_AXIS], + current_position[Y_AXIS], + current_position[Z_AXIS], + #if ENABLED(DISABLE_REDUCED_ACCURACY_WARNING) + true + #else + axis_known_position[X_AXIS] && + axis_known_position[Y_AXIS] && + axis_known_position[Z_AXIS] + #endif + ); + } + #endif } void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) {