Mercurial > public > ostc4
diff Discovery/Src/t3.c @ 542:6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
TTS and deco stop may already be shown individually. Now also available in one view where TTS is limited to 99minutes (switch to hours) to avoid string overlap.
author | Ideenmodellierer |
---|---|
date | Sat, 10 Oct 2020 21:02:05 +0200 |
parents | 6fbf7cd391cb |
children | 43a2dd4ba30f |
line wrap: on
line diff
--- a/Discovery/Src/t3.c Sat Oct 10 18:34:10 2020 +0200 +++ b/Discovery/Src/t3.c Sat Oct 10 21:02:05 2020 +0200 @@ -73,6 +73,7 @@ CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_noneOrDebug, + CVIEW_T3_DecoTTS, CVIEW_T3_END }; @@ -928,6 +929,7 @@ t3_basics_compass(tXscreen, center, heading, stateUsed->diveSettings.compassHeading); break; + case CVIEW_T3_DecoTTS: case CVIEW_T3_Decostop: default: // decostop @@ -952,13 +954,12 @@ textpointer = 0; snprintf(&text[textpointer],TEXTSIZE,"\020\003%u%c%c %u'" - , unit_depth_integer(nextstopDepthMeter) - , unit_depth_char1_T105() - , unit_depth_char2_T105() - , (nextstopLengthSeconds+59)/60); -// old without feet hw 170703 snprintf(&text[textpointer],TEXTSIZE,"\020\003%um %u'",nextstopDepthMeter,(nextstopLengthSeconds+59)/60); - t3_basics_colorscheme_mod(text); - GFX_write_string(&FontT105,tXc1,text,0); + , unit_depth_integer(nextstopDepthMeter) + , unit_depth_char1_T105() + , unit_depth_char2_T105() + , (nextstopLengthSeconds+59)/60); + t3_basics_colorscheme_mod(text); + GFX_write_string(&FontT105,tXc1,text,0); } else if(SafetyStopTime.Total && (depth > timer_Safetystop_GetDepthUpperLimit())) { @@ -982,6 +983,21 @@ t3_basics_colorscheme_mod(text); GFX_write_string(&FontT105,tXc1,text,0); } + + if(tX_selection_customview == CVIEW_T3_DecoTTS) /* add tts data on right side of screen */ + { + snprintf(text,TEXTSIZE,"\002\032\f%c",TXT_TTS); + GFX_write_string(&FontT42,tXc1,text,0); + if(pDecoinfo->output_time_to_surface_seconds) + { + if(pDecoinfo->output_time_to_surface_seconds < 100 * 60) + snprintf(text,TEXTSIZE,"\020\003\002%i'",(pDecoinfo->output_time_to_surface_seconds + 59)/ 60); + else + snprintf(text,TEXTSIZE,"\020\003\002%ih",(pDecoinfo->output_time_to_surface_seconds + 59)/ 3600); + t3_basics_colorscheme_mod(text); + GFX_write_string(&FontT105,tXc1,text,0); + } + } break; case CVIEW_sensors: