Mercurial > public > ostc4
diff Discovery/Src/t7.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 | 6de83d8205a0 |
children | 9825dcf50675 |
line wrap: on
line diff
--- a/Discovery/Src/t7.c Tue Mar 07 22:14:20 2023 +0100 +++ b/Discovery/Src/t7.c Wed Mar 15 09:18:07 2023 +0100 @@ -2919,14 +2919,9 @@ case LLC_ScrubberTime: tinyHeaderFont = 1; headerText[2] = TXT_ScrubTime; - if(settingsGetPointer()->scrubTimerMode == SCRUB_TIMER_MINUTES) - { - snprintf(text,TEXTSIZE,"\020%3u'",pSettings->scrubberData[pSettings->scubberActiveId].TimerCur); - } - else - { - snprintf(text,TEXTSIZE,"\020%u\016\016%%\017", (pSettings->scrubberData[pSettings->scubberActiveId].TimerCur * 100 / settingsGetPointer()->scrubberData[pSettings->scubberActiveId].TimerMax)); - } + + printScrubberText(text, TEXTSIZE, pSettings); + break; #ifdef ENABLE_PSCR_MODE case LCC_SimPpo2: @@ -3676,14 +3671,8 @@ text[textpointer++] = '\n'; text[textpointer++] = '\r'; text[textpointer++] = '\t'; - if(settingsGetPointer()->scrubTimerMode == SCRUB_TIMER_MINUTES) - { - textpointer += snprintf(&text[textpointer],10,"\020%3u'", pSettings->scrubberData[pSettings->scubberActiveId].TimerCur); - } - else - { - textpointer += snprintf(&text[textpointer],10,"\020%u\016\016%%\017", (pSettings->scrubberData[pSettings->scubberActiveId].TimerCur * 100 / pSettings->scrubberData[pSettings->scubberActiveId].TimerMax)); - } + + textpointer += printScrubberText(&text[textpointer], 10, pSettings); } text[textpointer++] = 0; t7_colorscheme_mod(text);