comparison Discovery/Src/t7.c @ 193:255326edf00b div-fixes-cleanup-1

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 <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Sat, 16 Mar 2019 21:52:06 +0100
parents 8b8074080d7b
children 2885628ab3ba
comparison
equal deleted inserted replaced
192:a61b46a5265b 193:255326edf00b
66 uint8_t t7_test_customview_warnings_surface_mode(void); 66 uint8_t t7_test_customview_warnings_surface_mode(void);
67 void t7_show_customview_warnings_surface_mode(void); 67 void t7_show_customview_warnings_surface_mode(void);
68 68
69 uint8_t t7_customtextPrepare(char * text); 69 uint8_t t7_customtextPrepare(char * text);
70 70
71 /* Importend function prototypes ---------------------------------------------*/ 71 /* Imported function prototypes ---------------------------------------------*/
72 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium); 72 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium);
73 73
74 /* Exported variables --------------------------------------------------------*/ 74 /* Exported variables --------------------------------------------------------*/
75 75
76 /* Private variables ---------------------------------------------------------*/ 76 /* Private variables ---------------------------------------------------------*/
1014 GFX_draw_box2(&t7screen, start, stop, CLUT_Font020, 1); 1014 GFX_draw_box2(&t7screen, start, stop, CLUT_Font020, 1);
1015 } 1015 }
1016 } 1016 }
1017 1017
1018 /* dive mode */ 1018 /* dive mode */
1019 if(stateUsed->diveSettings.diveMode == DIVEMODE_CCR) 1019 switch (stateUsed->diveSettings.diveMode) {
1020 GFX_write_string(&FontT24,&t7c1,"\f\002" "CCR",0); 1020 case DIVEMODE_CCR:
1021 else 1021 GFX_write_string(&FontT24, &t7c1, "\f\002" "CCR", 0);
1022 GFX_write_string(&FontT24,&t7c1,"\f\002" "OC",0); 1022 break;
1023 // GFX_write_string(&FontT24,&t7c1,"\f\177\177\x80" "CCR",0); 1023 case DIVEMODE_OC:
1024 GFX_write_string(&FontT24, &t7c1, "\f\002" "OC", 0);
1025 break;
1026 case DIVEMODE_Gauge:
1027 GFX_write_string(&FontT24, &t7c1, "\f\002" "Gauge", 0);
1028 break;
1029 case DIVEMODE_Apnea:
1030 GFX_write_string(&FontT24, &t7c1, "\f\002" "Apnea", 0);
1031 break;
1032 default:
1033 GFX_write_string(&FontT24, &t7c1, "\f\002" "OC", 0);
1034 }
1024 1035
1025 /*battery */ 1036 /*battery */
1026 1037
1027 text[0] = '3'; 1038 text[0] = '3';
1028 text[1] = '1'; 1039 text[1] = '1';