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 2ddb0c806..42e76e72f 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 89881e6eb..dd471d8f1 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 9196c7dd9..6a0e326a1 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 0e9723331..be652a5f2 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 a3160b117..14bb649d3 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 90c5f2414..2b5351980 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 7167b42b4..362417193 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 90c5f2414..2b5351980 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 98a65be37..56d7667eb 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 b9482b1a1..84b5d27db 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 91d13b06b..b50d4263f 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 230ff3e71..d0e5d4fad 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 ea94aa1eb..b1aa44b7b 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 1234e1a2d..8ce6d0b6b 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 b5a01ce4a..27557e5d3 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 00283a6b5..15c3b6fcd 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 7ebcba387..71dc51fa0 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 7b19b9575..dc94e6de5 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 593acc4eb..0a3d4b95a 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 d6ab38ea3..4af9d4d89 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 c4e198e02..0dc6fb130 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 86496afa7..83d4c0735 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 1ed231d29..85e1bcfb3 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 af409936e..5bbe5e1bf 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 ff4eb9d9f..63a95cdc7 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 8159e535f..314bd123f 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 44c1794f7..1ce8f3bb9 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 fa283e6d3..0d977564c 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 a1267c826..0c93829e1 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 6a37f3bb7..0f0be645b 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 6a37f3bb7..0f0be645b 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 6a37f3bb7..0f0be645b 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 019207777..5b5d5472e 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 77f55908d..c7e0edc70 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 57df98576..afce5c2c6 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 c71706718..cc15afb33 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 f330477fa..f98a582b7 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 10f47d310..8b4d80920 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 508901cc9..428a436bf 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) {