Mercurial > public > ostc4
diff Discovery/Src/tCCR.c @ 924:4d98fb2a178e Evo_2_23
Bugfix real scrubber time decreased in sim mode:
In the previous version the condition check for dive / simulation had been commented out causing the scrubber timer to be decreased during simulator usage. The problem has been fixed. In addition the scrubbertimer will now be maintained in simulator mode. In case the +5 minutes option is used the scrubber time is decreased by 5 minutes as well.
author | Ideenmodellierer |
---|---|
date | Wed, 13 Nov 2024 17:55:05 +0100 |
parents | acf6614dc396 |
children |
line wrap: on
line diff
--- a/Discovery/Src/tCCR.c Mon Nov 04 20:21:02 2024 +0100 +++ b/Discovery/Src/tCCR.c Wed Nov 13 17:55:05 2024 +0100 @@ -337,18 +337,18 @@ } } - /* 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())) + /* decrease scrubber timer only if we are not bailed out */ + if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (isLoopMode(pSettings->dive_mode)) && (stateUsed->mode == MODE_DIVE) && isLoopMode(stateUsed->diveSettings.diveMode)) { ScrubberTimeoutCount++; if(ScrubberTimeoutCount >= 600) /* resolution is minutes */ { ScrubberTimeoutCount = 0; - if(pSettings->scrubberData[pSettings->scubberActiveId].TimerCur > MIN_SCRUBBER_TIME) + if(stateUsed->scrubberDataDive[pSettings->scubberActiveId].TimerCur > MIN_SCRUBBER_TIME) { - pSettings->scrubberData[pSettings->scubberActiveId].TimerCur--; + stateUsedWrite->scrubberDataDive[pSettings->scubberActiveId].TimerCur--; } - translateDate(stateUsed->lifeData.dateBinaryFormat, &pSettings->scrubberData[pSettings->scubberActiveId].lastDive); + translateDate(stateUsed->lifeData.dateBinaryFormat, &stateUsedWrite->scrubberDataDive[pSettings->scubberActiveId].lastDive); } } }