comparison Discovery/Src/tCCR.c @ 710:8adf9b8fc7fa

Extension scrubber time: In previous version only one scrubber timer was available. After movement of scruvver timer menu menu space became available allowing to upgrade the functionality to support two scrubbers. To make it easier to identify combination ID to used scrubber the date of the last usage of the scrubber timer has been added.
author Ideenmodellierer
date Tue, 08 Nov 2022 21:16:17 +0100
parents 1b995079c045
children dd5db6e2c9a4
comparison
equal deleted inserted replaced
709:c799151670d5 710:8adf9b8fc7fa
335 tCCR_fallbackToFixedSetpoint(); 335 tCCR_fallbackToFixedSetpoint();
336 } 336 }
337 } 337 }
338 338
339 /* decrease scrubber timer only in real dive mode */ 339 /* decrease scrubber timer only in real dive mode */
340 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (isLoopMode(pSettings->dive_mode)) && (stateUsed->mode == MODE_DIVE) && (stateUsed == stateRealGetPointer())) 340 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (isLoopMode(pSettings->dive_mode)) && (stateUsed->mode == MODE_DIVE)) // && (stateUsed == stateRealGetPointer()))
341 { 341 {
342 ScrubberTimeoutCount++; 342 ScrubberTimeoutCount++;
343 if(ScrubberTimeoutCount >= 600) /* resolution is minutes */ 343 if(ScrubberTimeoutCount >= 600) /* resolution is minutes */
344 { 344 {
345 ScrubberTimeoutCount = 0; 345 ScrubberTimeoutCount = 0;
346 if(pSettings->scrubTimerCur > 0) 346 if(pSettings->scrubberData[pSettings->scubberActiveId].TimerCur > 0)
347 { 347 {
348 pSettings->scrubTimerCur--; 348 pSettings->scrubberData[pSettings->scubberActiveId].TimerCur--;
349 } 349 }
350 translateDate(stateUsed->lifeData.dateBinaryFormat, &pSettings->scrubberData[pSettings->scubberActiveId].lastDive);
350 } 351 }
351 } 352 }
352 } 353 }
353 354
354 void tCCR_SetRXIndication(void) 355 void tCCR_SetRXIndication(void)