# HG changeset patch # User Ideenmodellierer # Date 1609796947 -3600 # Node ID 7ef2d310287dda78e6598845e3c7ca8c7eef68c1 # Parent a48a1cd983affe48df748ebb4d2c04002c856121 Bugfix T3 skip deactivated views: Make sure that deco plan (if enabled) is activate prefered to TTS option because the deco plan will be shown earlier. diff -r a48a1cd983af -r 7ef2d310287d Discovery/Src/t3.c --- a/Discovery/Src/t3.c Mon Jan 04 22:45:37 2021 +0100 +++ b/Discovery/Src/t3.c Mon Jan 04 22:49:07 2021 +0100 @@ -1037,12 +1037,13 @@ GFX_write_string(&FontT105,tXc1,text,0); t3_basics_compass(tXscreen, center, heading, stateUsed->diveSettings.compassHeading); break; - +#ifdef ENABLE_T3_PROFILE_VIEW case CVIEW_T3_Profile: snprintf(text,100,"\032\f\002%c%c",TXT_2BYTE,TXT2BYTE_Profile); GFX_write_string(&FontT42,tXc1,text,0); t3_miniLiveLogProfile(); break; +#endif case CVIEW_T3_DecoTTS: case CVIEW_T3_Decostop: default: @@ -1604,15 +1605,28 @@ { if(settingsGetPointer()->MotionDetection != MOTION_DETECT_SECTOR) /* no hiding in case of active sector view option (fixed mapping would change during dive) */ { - if((tX_customviews[index] == CVIEW_T3_TTS) && !pDecoinfo->output_time_to_surface_seconds) /* Skip TTS if value is 0 */ + /* Skip TTS if value is 0 */ + if((tX_customviews[index] == CVIEW_T3_TTS) && (!pDecoinfo->output_time_to_surface_seconds)) { + if(*tX_selection_customview == tX_customviews[index]) + { + useFallback = 1; /* the provided view is disabled => use fallback */ + } iterate = 1; - fallbackSelection = CVIEW_T3_TTS; + if(fallbackSelection == CVIEW_noneOrDebug) + { + fallbackSelection = CVIEW_T3_TTS; + } } - if((tX_customviews[index] == CVIEW_T3_Decostop) && ((!pDecoinfo->output_ndl_seconds) && (!pDecoinfo->output_time_to_surface_seconds) && (timer_Safetystop_GetCountDown() == 0))) /* Skip Deco if NDL is not set */ + /* Skip Deco if NDL is not set */ + if((tX_customviews[index] == CVIEW_T3_Decostop) && ((!pDecoinfo->output_ndl_seconds) && (!pDecoinfo->output_time_to_surface_seconds) && (timer_Safetystop_GetCountDown() == 0))) { + if(*tX_selection_customview == tX_customviews[index]) + { + useFallback = 1; /* the provided view is disabled => use fallback */ + } + fallbackSelection = CVIEW_T3_Decostop; iterate = 1; - fallbackSelection = CVIEW_T3_Decostop; } } }