diff Discovery/Src/settings.c @ 758:b6d8a6fbf4fd

- Colours for scrubber display when time remaining falls below a threshold value - Display negative values when time is up and diving continues; - count down remaining scrubber time only when the dive computer is not set to bailout - after all, there is not much point in counting down time if the diver is not breathing through the scrubber.
author heinrichsweikamp
date Wed, 15 Mar 2023 09:18:07 +0100
parents 5078da3845c0
children 31883eacf1fa
line wrap: on
line diff
--- a/Discovery/Src/settings.c	Tue Mar 07 22:14:20 2023 +0100
+++ b/Discovery/Src/settings.c	Wed Mar 15 09:18:07 2023 +0100
@@ -1497,13 +1497,13 @@
     	Settings.scubberActiveId = 0;
     	corrections++;
     }
-    if((Settings.scrubberData[0].TimerMax > MAX_SCRUBBER_TIME) || (Settings.scrubberData[0].TimerCur > MAX_SCRUBBER_TIME))
+    if((Settings.scrubberData[0].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[0].TimerCur < MIN_SCRUBBER_TIME || (Settings.scrubberData[0].TimerCur > MAX_SCRUBBER_TIME))
     {
     	Settings.scrubberData[0].TimerMax = 0;
     	Settings.scrubberData[0].TimerCur = 0;
     	corrections++;
     }
-    if((Settings.scrubberData[1].TimerMax > MAX_SCRUBBER_TIME) || (Settings.scrubberData[1].TimerCur > MAX_SCRUBBER_TIME))
+    if((Settings.scrubberData[1].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[1].TimerCur < MIN_SCRUBBER_TIME || (Settings.scrubberData[1].TimerCur > MAX_SCRUBBER_TIME))
     {
     	Settings.scrubberData[1].TimerMax = 0;
     	Settings.scrubberData[1].TimerCur = 0;