# HG changeset patch # User Jan Mulder # Date 1552769526 -3600 # Node ID 255326edf00b39e6bb599ba689617ba79e3d8547 # Parent a61b46a5265b209d0afbce8f0e751931e56dbbfb Bugfix: show proper dive mode The dive mode shown in the top line on the display was strange. It could only show CCR and OC, and dive modes Apnea and Gauge where shown as OC. With this commit, the proper dive mode is shown. Notice that these strings/abbreviations where not localized, and are still not localized with this commit. The localized names from the corresponding menu lines are not really usable (as too long) to shown in the header. Signed-off-by: Jan Mulder diff -r a61b46a5265b -r 255326edf00b Discovery/Src/t7.c --- a/Discovery/Src/t7.c Sat Mar 16 21:08:18 2019 +0100 +++ b/Discovery/Src/t7.c Sat Mar 16 21:52:06 2019 +0100 @@ -68,7 +68,7 @@ uint8_t t7_customtextPrepare(char * text); -/* Importend function prototypes ---------------------------------------------*/ +/* Imported function prototypes ---------------------------------------------*/ extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium); /* Exported variables --------------------------------------------------------*/ @@ -1016,11 +1016,22 @@ } /* dive mode */ - if(stateUsed->diveSettings.diveMode == DIVEMODE_CCR) - GFX_write_string(&FontT24,&t7c1,"\f\002" "CCR",0); - else - GFX_write_string(&FontT24,&t7c1,"\f\002" "OC",0); -// GFX_write_string(&FontT24,&t7c1,"\f\177\177\x80" "CCR",0); + switch (stateUsed->diveSettings.diveMode) { + case DIVEMODE_CCR: + GFX_write_string(&FontT24, &t7c1, "\f\002" "CCR", 0); + break; + case DIVEMODE_OC: + GFX_write_string(&FontT24, &t7c1, "\f\002" "OC", 0); + break; + case DIVEMODE_Gauge: + GFX_write_string(&FontT24, &t7c1, "\f\002" "Gauge", 0); + break; + case DIVEMODE_Apnea: + GFX_write_string(&FontT24, &t7c1, "\f\002" "Apnea", 0); + break; + default: + GFX_write_string(&FontT24, &t7c1, "\f\002" "OC", 0); + } /*battery */