Mercurial > public > ostc4
diff Discovery/Src/t7.c @ 998:5a690195b6b7 GasConsumption
Added dual operation of scrubber timers:
In the previous version only one scrubber timer could be selected for operation. In the new version the activation of both timers is possible. In that case both timers will be displayed as well. To enable this a new activation item has been added to the scrubber menu.
| author | Ideenmodellierer |
|---|---|
| date | Wed, 23 Apr 2025 14:52:03 +0200 |
| parents | 8507a87f6401 |
| children | 75f958ca5d0e |
line wrap: on
line diff
--- a/Discovery/Src/t7.c Wed Apr 23 14:47:42 2025 +0200 +++ b/Discovery/Src/t7.c Wed Apr 23 14:52:03 2025 +0200 @@ -3286,7 +3286,9 @@ char headerText[10]; char text[TEXTSIZE]; + char tmpString[TEXTSIZE]; uint8_t textpointer = 0; + uint8_t index = 0; _Bool tinyHeaderFont = 0; uint8_t line = 0; #ifdef ENABLE_BOTTLE_SENSOR @@ -3402,7 +3404,26 @@ tinyHeaderFont = 1; headerText[2] = TXT_ScrubTime; - printScrubberText(text, TEXTSIZE, stateUsed->scrubberDataDive, pSettings); + textpointer = printScrubberText(text, TEXTSIZE, stateUsed->scrubberDataDive, pSettings); + if (pSettings->scubberActiveId == 3) /* both timer active */ + { + snprintf(tmpString,TEXTSIZE,"\016\016%s",text); + for(index = 0; index < textpointer; index++) + { + if(tmpString[index] == '\017') /* remove switch to normal font */ + { + tmpString[index] = ' '; + } + if(tmpString[index] == '|') /* replace separator with new line */ + { + tmpString[index] = '\n'; + tmpString[index+1] = '\r'; + break; + } + } + line = 1; + strcpy(text,tmpString); + } break; #ifdef ENABLE_PSCR_MODE @@ -3537,7 +3558,7 @@ } else { - GFX_write_string(&FontT48,&t7l3,text,line); + GFX_write_string(&FontT48,&t7l3,text,line); } #else GFX_write_string(&FontT105,&t7l3,text,line);
