From c24dbcbfe165f8b7d5ce81f248d46d216ad10ad4 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Wed, 14 Mar 2018 01:44:30 -0600 Subject: [PATCH] When STATUS_EXPIRE_SECONDS is 0, hide the position. (#10081) 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 + Marlin/src/config/default/Configuration_adv.h | 3 + .../AlephObjects/TAZ4/Configuration_adv.h | 3 + .../examples/Anet/A6/Configuration_adv.h | 3 + .../examples/Anet/A8/Configuration_adv.h | 3 + .../examples/Azteeg/X5GT/Configuration_adv.h | 3 + .../examples/BIBO/TouchX/Configuration_adv.h | 3 + .../examples/BQ/Hephestos/Configuration_adv.h | 3 + .../BQ/Hephestos_2/Configuration_adv.h | 3 + .../examples/BQ/WITBOX/Configuration_adv.h | 3 + .../examples/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 + .../config/examples/Felix/Configuration_adv.h | 3 + .../FolgerTech/i3-2020/Configuration_adv.h | 3 + .../Infitary/i3-M508/Configuration_adv.h | 3 + .../examples/JGAurora/A5/Configuration_adv.h | 3 + .../examples/MakerParts/Configuration_adv.h | 3 + .../examples/Malyan/M150/Configuration_adv.h | 3 + .../examples/Malyan/M200/Configuration_adv.h | 3 + .../Micromake/C1/enhanced/Configuration_adv.h | 3 + .../examples/Mks/Sbase/Configuration_adv.h | 3 + .../examples/RigidBot/Configuration_adv.h | 3 + .../config/examples/SCARA/Configuration_adv.h | 3 + .../examples/Sanguinololu/Configuration_adv.h | 3 + .../examples/TheBorg/Configuration_adv.h | 3 + .../examples/TinyBoy2/Configuration_adv.h | 3 + .../UltiMachine/Archim2/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 + .../examples/makibox/Configuration_adv.h | 3 + .../tvrrug/Round2/Configuration_adv.h | 3 + .../config/examples/wt150/Configuration_adv.h | 3 + .../src/lcd/dogm/status_screen_lite_ST7920.h | 84 +++++++++++-------- 46 files changed, 185 insertions(+), 34 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 7ba3f6b1d..ac1871a70 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/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index fc916fb1c..bab1d6f10 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/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/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index df404bc96..111552b2c 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index c80639750..d67762e87 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index fd623e2ad..dbe5efedc 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index fc916fb1c..bab1d6f10 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/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/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index 77d3a66cd..aac52e205 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 8f1739340..71388567d 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index cf2fb1067..974edd4db 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 8f1739340..71388567d 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 79664de96..34e8002d4 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index c977a2572..ed4fc45cd 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index a25f178ed..4db326ad9 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h index 35281cb8b..5847b6427 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h index 1f1d09841..fde0d7697 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h index 3210efca3..c630c91e1 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 64b086cdf..2fe3c152e 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index a0c2ee1dc..c247d0360 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/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/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 7cca4c574..e8f327ae1 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 50050f644..87ce77859 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index a38e1f637..9ad5af25c 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/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/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index d5903291d..2b26a0816 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index e5cd9d704..3e7ba11a4 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/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/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 76b031dc9..33e346ace 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 7a730989c..43a3604da 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -673,6 +673,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/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 9327bd845..96c144088 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 477125f2c..4a9539978 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 1c3d171ba..cfbf3c4fa 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index f6ba57adb..f405994ba 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/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/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index a929a5d8f..401ee6e7f 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 547383ef8..c2268ac42 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/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/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 1c995d619..69b4a9ed1 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 3eba569ef..e21d0a27b 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 50f293796..14cbea988 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 232ff922b..bf658f0eb 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 232ff922b..bf658f0eb 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 9464493ca..4db5c154e 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 9464493ca..4db5c154e 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 9464493ca..4db5c154e 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index 753f2d5fc..76f39d052 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index bfbecb9cc..3b5d8c9ea 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 408f8b5c3..d9008103f 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index dafbc07cc..be791ba70 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 8c0349f8b..a020d9551 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 31ef272d0..106325a08 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/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/src/lcd/dogm/status_screen_lite_ST7920.h b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.h index 2b2e89e46..125e1868f 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.h +++ b/Marlin/src/lcd/dogm/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) {