# HG changeset patch # User Ideenmodellierer # Date 1602356525 -7200 # Node ID 6960df7ddb09b9837738aa5e2b49775525a1665c # Parent 6fbf7cd391cbb133bf618658454e2167261151a7 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. diff -r 6fbf7cd391cb -r 6960df7ddb09 Common/Inc/settings.h --- a/Common/Inc/settings.h Sat Oct 10 18:34:10 2020 +0200 +++ b/Common/Inc/settings.h Sat Oct 10 21:02:05 2020 +0200 @@ -227,6 +227,7 @@ uint32_t cv_config_BigScreen; /* new in 0xFFFF001C */ uint8_t compassInertia; + uint8_t tX_customViewPrimaryBF; } SSettings; typedef struct diff -r 6fbf7cd391cb -r 6960df7ddb09 Discovery/Inc/tHome.h --- a/Discovery/Inc/tHome.h Sat Oct 10 18:34:10 2020 +0200 +++ b/Discovery/Inc/tHome.h Sat Oct 10 21:02:05 2020 +0200 @@ -82,6 +82,7 @@ CVIEW_T3_ApnoeSurfaceInfo, CVIEW_T3_Navigation, CVIEW_T3_DepthData, + CVIEW_T3_DecoTTS, CVIEW_T3_END }; diff -r 6fbf7cd391cb -r 6960df7ddb09 Discovery/Inc/text_multilanguage.h --- a/Discovery/Inc/text_multilanguage.h Sat Oct 10 18:34:10 2020 +0200 +++ b/Discovery/Inc/text_multilanguage.h Sat Oct 10 21:02:05 2020 +0200 @@ -312,6 +312,7 @@ TXT2BYTE_ppoNair, TXT2BYTE_Navigation, TXT2BYTE_DepthData, + TXT2BYTE_DecoTTS, TXT2BYTE_END }; diff -r 6fbf7cd391cb -r 6960df7ddb09 Discovery/Src/settings.c --- a/Discovery/Src/settings.c Sat Oct 10 18:34:10 2020 +0200 +++ b/Discovery/Src/settings.c Sat Oct 10 21:02:05 2020 +0200 @@ -470,6 +470,7 @@ case 0xFFFF001B: pSettings->compassInertia = 0; /* no inertia */ pSettings->tX_customViewPrimaryBF = CVIEW_T3_Decostop; + pSettings->cv_config_BigScreen &= pSettings->cv_configuration ^= 1 << CVIEW_T3_DecoTTS; // no break default: pSettings->header = pStandard->header; diff -r 6fbf7cd391cb -r 6960df7ddb09 Discovery/Src/t3.c --- 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: diff -r 6fbf7cd391cb -r 6960df7ddb09 Discovery/Src/tHome.c --- a/Discovery/Src/tHome.c Sat Oct 10 18:34:10 2020 +0200 +++ b/Discovery/Src/tHome.c Sat Oct 10 21:02:05 2020 +0200 @@ -58,7 +58,7 @@ static uint16_t tHome_tick_count_field; const uint8_t cv_changelist[] = {CVIEW_Compass, CVIEW_SummaryOfLeftCorner, CVIEW_Tissues, CVIEW_Profile, CVIEW_EADTime, CVIEW_Gaslist, CVIEW_noneOrDebug, CVIEW_Decolist,CVIEW_sensors,CVIEW_sensors_mV, CVIEW_END}; -const uint8_t cv_changelist_BS[] = {CVIEW_T3_Decostop, CVIEW_sensors, CVIEW_Compass, CVIEW_T3_MaxDepth,CVIEW_T3_StopWatch, CVIEW_T3_TTS, CVIEW_T3_GasList, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_END}; +const uint8_t cv_changelist_BS[] = {CVIEW_T3_Decostop, CVIEW_sensors, CVIEW_Compass, CVIEW_T3_MaxDepth,CVIEW_T3_StopWatch, CVIEW_T3_TTS, CVIEW_T3_GasList, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_DecoTTS, CVIEW_T3_END}; /* Private function prototypes -----------------------------------------------*/ diff -r 6fbf7cd391cb -r 6960df7ddb09 Discovery/Src/tMenuEditCustom.c --- a/Discovery/Src/tMenuEditCustom.c Sat Oct 10 18:34:10 2020 +0200 +++ b/Discovery/Src/tMenuEditCustom.c Sat Oct 10 21:02:05 2020 +0200 @@ -362,6 +362,9 @@ case CVIEW_T3_DepthData: text = TXT2BYTE_DepthData; break; + case CVIEW_T3_DecoTTS: + text = TXT2BYTE_DecoTTS; + break; default: break; } diff -r 6fbf7cd391cb -r 6960df7ddb09 Discovery/Src/text_multilanguage.c --- a/Discovery/Src/text_multilanguage.c Sat Oct 10 18:34:10 2020 +0200 +++ b/Discovery/Src/text_multilanguage.c Sat Oct 10 21:02:05 2020 +0200 @@ -1608,6 +1608,12 @@ static uint8_t text_IT_DepthData[] = ""; static uint8_t text_ES_DepthData[] = ""; +static uint8_t text_EN_DecoTTS[] = "Deco and TTS"; +static uint8_t text_DE_DecoTTS[] = "Deco und TTS"; +static uint8_t text_FR_DecoTTS[] = ""; +static uint8_t text_IT_DecoTTS[] = ""; +static uint8_t text_ES_DecoTTS[] = ""; + /* Lookup Table -------------------------------------------------------------*/ const tText text_array[] = @@ -1838,6 +1844,5 @@ {(uint8_t)TXT2BYTE_ppoNair, {text_EN_ppo2Air, text_DE_ppo2Air, text_FR_ppo2Air, text_IT_ppo2Air, text_ES_ppo2Air}}, {(uint8_t)TXT2BYTE_Navigation, {text_EN_Navigation, text_DE_Navigation, text_FR_Navigation, text_IT_Navigation, text_ES_Navigation}}, {(uint8_t)TXT2BYTE_DepthData, {text_EN_DepthData, text_DE_DepthData, text_FR_DepthData, text_IT_DepthData, text_ES_DepthData}}, - - + {(uint8_t)TXT2BYTE_DecoTTS, {text_EN_DecoTTS, text_DE_DecoTTS, text_FR_DecoTTS, text_IT_DecoTTS, text_ES_DecoTTS}}, };