comparison Discovery/Src/t3.c @ 722:47a9ba771119

Show saturation in large font (T3) view: In case the DecoTTS custom view is active then the saturation will be displayed if the diver is close to the surface (TTS < 1 minute).
author Ideenmodellierer
date Thu, 05 Jan 2023 18:25:47 +0100
parents 8adf9b8fc7fa
children 4a6bffaa38b3
comparison
equal deleted inserted replaced
721:fceae45b3a69 722:47a9ba771119
797 } 797 }
798 798
799 799
800 void t3_basics_refresh_apnoeRight(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode) 800 void t3_basics_refresh_apnoeRight(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode)
801 { 801 {
802 char text[512]; 802 char text[30];
803 uint16_t textpointer = 0; 803 uint16_t textpointer = 0;
804 804
805 // CVIEW_T3_Temperature 805 // CVIEW_T3_Temperature
806 float temperature; 806 float temperature;
807 SSettings* pSettings; 807 SSettings* pSettings;
906 906
907 void t3_basics_refresh_customview(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode) 907 void t3_basics_refresh_customview(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode)
908 { 908 {
909 static uint8_t last_customview = CVIEW_END; 909 static uint8_t last_customview = CVIEW_END;
910 910
911 char text[512]; 911 char text[30];
912 uint16_t textpointer = 0; 912 uint16_t textpointer = 0;
913 913
914 SSettings* pSettings; 914 SSettings* pSettings;
915 pSettings = settingsGetPointer(); 915 pSettings = settingsGetPointer();
916 916
1236 GFX_write_string(&FontT105,tXc1,text,0); 1236 GFX_write_string(&FontT105,tXc1,text,0);
1237 } 1237 }
1238 1238
1239 if(tX_selection_customview == CVIEW_T3_DecoTTS) /* add tts data on right side of screen */ 1239 if(tX_selection_customview == CVIEW_T3_DecoTTS) /* add tts data on right side of screen */
1240 { 1240 {
1241 snprintf(text,TEXTSIZE,"\002\032\f%c",TXT_TTS);
1242 GFX_write_string(&FontT42,tXc1,text,0);
1243 if(pDecoinfo->output_time_to_surface_seconds) 1241 if(pDecoinfo->output_time_to_surface_seconds)
1244 { 1242 {
1245 if(pDecoinfo->output_time_to_surface_seconds < 100 * 60) 1243 snprintf(text,TEXTSIZE,"\002\032\f%c",TXT_TTS);
1246 snprintf(text,TEXTSIZE,"\020\003\002%i'",(pDecoinfo->output_time_to_surface_seconds + 59)/ 60); 1244 GFX_write_string(&FontT42,tXc1,text,0);
1247 else 1245 if(pDecoinfo->output_time_to_surface_seconds)
1248 snprintf(text,TEXTSIZE,"\020\003\002%ih",(pDecoinfo->output_time_to_surface_seconds + 59)/ 3600); 1246 {
1247 if(pDecoinfo->output_time_to_surface_seconds < 100 * 60)
1248 snprintf(text,TEXTSIZE,"\020\003\002%i'",(pDecoinfo->output_time_to_surface_seconds + 59)/ 60);
1249 else
1250 snprintf(text,TEXTSIZE,"\020\003\002%ih",(pDecoinfo->output_time_to_surface_seconds + 59)/ 3600);
1251 t3_basics_colorscheme_mod(text);
1252 GFX_write_string(&FontT105,tXc1,text,0);
1253 }
1254 }
1255 else if(pDecoinfo->super_saturation > 0.1)
1256 {
1257 snprintf(text,TEXTSIZE,"\002\032\f%c",TXT_ActualGradient);
1258 GFX_write_string(&FontT42,tXc1,text,0);
1259 snprintf(text,TEXTSIZE,"\020\003\002%.0f\016\016%%\017",100 * pDecoinfo->super_saturation);
1249 t3_basics_colorscheme_mod(text); 1260 t3_basics_colorscheme_mod(text);
1250 GFX_write_string(&FontT105,tXc1,text,0); 1261 GFX_write_string(&FontT105,tXc1,text,0);
1251 } 1262 }
1252 } 1263 }
1253 break; 1264 break;