comparison 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
comparison
equal deleted inserted replaced
997:2f7531a8e922 998:5a690195b6b7
3284 if(!selection_custom_field) 3284 if(!selection_custom_field)
3285 return; 3285 return;
3286 3286
3287 char headerText[10]; 3287 char headerText[10];
3288 char text[TEXTSIZE]; 3288 char text[TEXTSIZE];
3289 char tmpString[TEXTSIZE];
3289 uint8_t textpointer = 0; 3290 uint8_t textpointer = 0;
3291 uint8_t index = 0;
3290 _Bool tinyHeaderFont = 0; 3292 _Bool tinyHeaderFont = 0;
3291 uint8_t line = 0; 3293 uint8_t line = 0;
3292 #ifdef ENABLE_BOTTLE_SENSOR 3294 #ifdef ENABLE_BOTTLE_SENSOR
3293 uint16_t agedColor = 0; 3295 uint16_t agedColor = 0;
3294 #endif 3296 #endif
3400 3402
3401 case LLC_ScrubberTime: 3403 case LLC_ScrubberTime:
3402 tinyHeaderFont = 1; 3404 tinyHeaderFont = 1;
3403 headerText[2] = TXT_ScrubTime; 3405 headerText[2] = TXT_ScrubTime;
3404 3406
3405 printScrubberText(text, TEXTSIZE, stateUsed->scrubberDataDive, pSettings); 3407 textpointer = printScrubberText(text, TEXTSIZE, stateUsed->scrubberDataDive, pSettings);
3408 if (pSettings->scubberActiveId == 3) /* both timer active */
3409 {
3410 snprintf(tmpString,TEXTSIZE,"\016\016%s",text);
3411 for(index = 0; index < textpointer; index++)
3412 {
3413 if(tmpString[index] == '\017') /* remove switch to normal font */
3414 {
3415 tmpString[index] = ' ';
3416 }
3417 if(tmpString[index] == '|') /* replace separator with new line */
3418 {
3419 tmpString[index] = '\n';
3420 tmpString[index+1] = '\r';
3421 break;
3422 }
3423 }
3424 line = 1;
3425 strcpy(text,tmpString);
3426 }
3406 3427
3407 break; 3428 break;
3408 #ifdef ENABLE_PSCR_MODE 3429 #ifdef ENABLE_PSCR_MODE
3409 case LCC_SimPpo2: 3430 case LCC_SimPpo2:
3410 headerText[2] = TXT_SimPpo2; 3431 headerText[2] = TXT_SimPpo2;
3535 { 3556 {
3536 GFX_write_string(&FontT105,&t7l3,text,line); 3557 GFX_write_string(&FontT105,&t7l3,text,line);
3537 } 3558 }
3538 else 3559 else
3539 { 3560 {
3540 GFX_write_string(&FontT48,&t7l3,text,line); 3561 GFX_write_string(&FontT48,&t7l3,text,line);
3541 } 3562 }
3542 #else 3563 #else
3543 GFX_write_string(&FontT105,&t7l3,text,line); 3564 GFX_write_string(&FontT105,&t7l3,text,line);
3544 #endif 3565 #endif
3545 #else 3566 #else