comparison 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
comparison
equal deleted inserted replaced
923:6fc0e3d230e4 924:4d98fb2a178e
335 else 335 else
336 tCCR_fallbackToFixedSetpoint(); 336 tCCR_fallbackToFixedSetpoint();
337 } 337 }
338 } 338 }
339 339
340 /* decrease scrubber timer only in real dive mode, and if we are not bailed out */ 340 /* decrease scrubber timer only if we are not bailed out */
341 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (isLoopMode(pSettings->dive_mode)) && (stateUsed->mode == MODE_DIVE) && isLoopMode(stateUsed->diveSettings.diveMode)) // && (stateUsed == stateRealGetPointer())) 341 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (isLoopMode(pSettings->dive_mode)) && (stateUsed->mode == MODE_DIVE) && isLoopMode(stateUsed->diveSettings.diveMode))
342 { 342 {
343 ScrubberTimeoutCount++; 343 ScrubberTimeoutCount++;
344 if(ScrubberTimeoutCount >= 600) /* resolution is minutes */ 344 if(ScrubberTimeoutCount >= 600) /* resolution is minutes */
345 { 345 {
346 ScrubberTimeoutCount = 0; 346 ScrubberTimeoutCount = 0;
347 if(pSettings->scrubberData[pSettings->scubberActiveId].TimerCur > MIN_SCRUBBER_TIME) 347 if(stateUsed->scrubberDataDive[pSettings->scubberActiveId].TimerCur > MIN_SCRUBBER_TIME)
348 { 348 {
349 pSettings->scrubberData[pSettings->scubberActiveId].TimerCur--; 349 stateUsedWrite->scrubberDataDive[pSettings->scubberActiveId].TimerCur--;
350 } 350 }
351 translateDate(stateUsed->lifeData.dateBinaryFormat, &pSettings->scrubberData[pSettings->scubberActiveId].lastDive); 351 translateDate(stateUsed->lifeData.dateBinaryFormat, &stateUsedWrite->scrubberDataDive[pSettings->scubberActiveId].lastDive);
352 } 352 }
353 } 353 }
354 } 354 }
355 355
356 void tCCR_SetRXIndication(void) 356 void tCCR_SetRXIndication(void)