# HG changeset patch # User Ideenmodellierer # Date 1678215542 -3600 # Node ID 92bf7bf9fb8ac063dde2d61960782a2111d45891 # Parent ec7b62983a8c9e82c008100d577bcd4c2355094a Cleanup display of multiple warnings in T3 (Big font) view: In a very early version a list of possible warnings was shown and the active once highlithed in red. Because of the rising number of warnings and the big visualization of the first warning (double size) a erronous mixed warning list was displayed. This has now been cleaned up. The main warning is still be displayed in double size but the following warnings are shown on the right side in normal fornt size. diff -r ec7b62983a8c -r 92bf7bf9fb8a Discovery/Src/t3.c --- a/Discovery/Src/t3.c Tue Mar 07 19:55:13 2023 +0100 +++ b/Discovery/Src/t3.c Tue Mar 07 19:59:02 2023 +0100 @@ -1528,145 +1528,125 @@ textpointerMain = 0; textMain[textpointerMain++] = '\025'; /* red */ textMain[textpointerMain++] = '\003'; /* doublesize */ + textMain[textpointerMain++] = TXT_2BYTE; /* There is only one Main warning to be displayed */ textpointer = 0; + text[textpointer++] = '\025'; /* red */ - text[textpointer++] = '\031'; - text[textpointer++] = TXT_2BYTE; - text[textpointer++] = TXT2BYTE_WarnDecoMissed; if(stateUsed->warnings.decoMissed) { - text[textpointer - 3] = '\025'; if(lineFree) { - textMain[textpointerMain++] = TXT_2BYTE; - textMain[textpointerMain++] = text[textpointer - 1]; - textMain[textpointerMain] = 0; + textMain[textpointerMain++] = TXT2BYTE_WarnDecoMissed; lineFree--; } else { + text[textpointer++] = '\002'; + text[textpointer++] = TXT_2BYTE; + text[textpointer++] = TXT2BYTE_WarnDecoMissed; + text[textpointer++] = '\r'; + text[textpointer++] = '\n'; more++; } } - text[textpointer++] = '\t'; - text[textpointer++] = '\031'; - text[textpointer++] = TXT_2BYTE; - text[textpointer++] = TXT2BYTE_WarnPPO2Low; if(stateUsed->warnings.ppO2Low) { - text[textpointer - 3] = '\025'; if(lineFree) { - textMain[textpointerMain++] = TXT_2BYTE; - textMain[textpointerMain++] = text[textpointer - 1]; - textMain[textpointerMain] = 0; + textMain[textpointerMain++] = TXT2BYTE_WarnPPO2Low; lineFree--; } else { + text[textpointer++] = '\002'; + text[textpointer++] = TXT_2BYTE; + text[textpointer++] = TXT2BYTE_WarnPPO2Low; + text[textpointer++] = '\r'; + text[textpointer++] = '\n'; more++; } } - text[textpointer++] = '\n'; - text[textpointer++] = '\r'; - text[textpointer++] = '\031'; - text[textpointer++] = TXT_2BYTE; - text[textpointer++] = TXT2BYTE_WarnPPO2High; if(stateUsed->warnings.ppO2High) { - text[textpointer - 3] = '\025'; if(lineFree) { - textMain[textpointerMain++] = TXT_2BYTE; - textMain[textpointerMain++] = text[textpointer - 1]; - textMain[textpointerMain] = 0; + textMain[textpointerMain++] = TXT2BYTE_WarnPPO2High; lineFree--; } else { + text[textpointer++] = '\002'; + text[textpointer++] = TXT_2BYTE; + text[textpointer++] = TXT2BYTE_WarnPPO2High; + text[textpointer++] = '\r'; + text[textpointer++] = '\n'; more++; } } - text[textpointer++] = '\t'; - text[textpointer++] = '\031'; - text[textpointer++] = TXT_2BYTE; - text[textpointer++] = TXT2BYTE_WarnFallback; if(stateUsed->warnings.fallback) { - text[textpointer - 3] = '\025'; if(lineFree) { - textMain[textpointerMain++] = TXT_2BYTE; - textMain[textpointerMain++] = text[textpointer - 1]; - textMain[textpointerMain] = 0; + textMain[textpointerMain++] = TXT2BYTE_WarnFallback; lineFree--; } else { + text[textpointer++] = '\002'; + text[textpointer++] = TXT_2BYTE; + text[textpointer++] = TXT2BYTE_WarnFallback; + text[textpointer++] = '\r'; + text[textpointer++] = '\n'; more++; } } - text[textpointer++] = '\n'; - text[textpointer++] = '\r'; - text[textpointer++] = '\031'; - text[textpointer++] = TXT_2BYTE; - text[textpointer++] = TXT2BYTE_WarnSensorLinkLost; if(stateUsed->warnings.sensorLinkLost) { - text[textpointer - 3] = '\025'; if(lineFree) { - textMain[textpointerMain++] = TXT_2BYTE; - textMain[textpointerMain++] = text[textpointer - 1]; - textMain[textpointerMain] = 0; + textMain[textpointerMain++] = TXT2BYTE_WarnSensorLinkLost; lineFree--; } else { + text[textpointer++] = '\002'; + text[textpointer++] = TXT_2BYTE; + text[textpointer++] = TXT2BYTE_WarnSensorLinkLost; + text[textpointer++] = '\r'; + text[textpointer++] = '\n'; more++; } } -/* - text[textpointer++] = '\t'; - text[textpointer++] = '\031'; - text[textpointer++] = TXT_2BYTE; - text[textpointer++] = TXT2BYTE_WarnBatteryLow; - if(stateUsed->warnings.lowBattery) + if(stateUsed->warnings.co2High) { - text[textpointer - 3] = '\025'; if(lineFree) { - textMain[textpointerMain++] = TXT_2BYTE; - textMain[textpointerMain++] = text[textpointer - 1]; - textMain[textpointerMain] = 0; - lineFree--; + textMain[textpointerMain++] = TXT2BYTE_WarnCO2High; } else { + text[textpointer++] = '\002'; + text[textpointer++] = TXT_2BYTE; + text[textpointer++] = TXT2BYTE_WarnCO2High; + text[textpointer++] = '\r'; + text[textpointer++] = '\n'; more++; } } -*/ + text[textpointer] = 0; -/* - if(more) + textMain[textpointerMain] = 0; + + if(lineFree == 0) { - text[textpointer++] = '\002'; - text[textpointer++] = '+'; - if(more < 10) - text[textpointer++] = '0' + more; - else - text[textpointer++] = 'X'; - text[textpointer] = 0; + GFX_write_string(&FontT48,&t3c1,textMain,0); } -*/ - GFX_write_string(&FontT48,&t3c1,textMain,0); if(more) { GFX_write_string(&FontT48,&t3c2,text,0);