Mercurial > public > ostc4
diff Discovery/Src/tCCR.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 | 39ff186b6f98 |
children | 9a1bb9e7cb61 |
line wrap: on
line diff
--- a/Discovery/Src/tCCR.c Tue Mar 07 22:14:20 2023 +0100 +++ b/Discovery/Src/tCCR.c Wed Mar 15 09:18:07 2023 +0100 @@ -337,14 +337,14 @@ } } - /* decrease scrubber timer only in real dive mode */ - if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (isLoopMode(pSettings->dive_mode)) && (stateUsed->mode == MODE_DIVE)) // && (stateUsed == stateRealGetPointer())) + /* decrease scrubber timer only in real dive mode, and if we are not bailed out */ + if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (isLoopMode(pSettings->dive_mode)) && (stateUsed->mode == MODE_DIVE) && isLoopMode(stateUsed->diveSettings.diveMode)) // && (stateUsed == stateRealGetPointer())) { ScrubberTimeoutCount++; if(ScrubberTimeoutCount >= 600) /* resolution is minutes */ { ScrubberTimeoutCount = 0; - if(pSettings->scrubberData[pSettings->scubberActiveId].TimerCur > 0) + if(pSettings->scrubberData[pSettings->scubberActiveId].TimerCur > MIN_SCRUBBER_TIME) { pSettings->scrubberData[pSettings->scubberActiveId].TimerCur--; }