# HG changeset patch # User Ideenmodellierer # Date 1600195959 -7200 # Node ID 0e1db77b2acaa5866e621c87c21475df931b7967 # Parent a9c195be907e8d6619e4a1a1943132f252a37eaf Added skip condition in custom view selection: Decoplan may be selected even nothing was shown due to certain display conditions. These conditions have now been added to selection function to show deco plan only if data is available for visualization. diff -r a9c195be907e -r 0e1db77b2aca Discovery/Src/t3.c --- a/Discovery/Src/t3.c Sun Sep 13 20:59:38 2020 +0200 +++ b/Discovery/Src/t3.c Tue Sep 15 20:52:39 2020 +0200 @@ -52,7 +52,7 @@ GFX_DrawCfgWindow t3c1; GFX_DrawCfgWindow t3c2; -uint8_t t3_selection_customview = 0; +uint8_t t3_selection_customview = CVIEW_noneOrDebug; /* TEM HAS TO MOVE TO GLOBAL--------------------------------------------------*/ @@ -551,10 +551,6 @@ void t3_refresh_customview(float depth) { -#if 0 - if((t3_selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0)) - t3_change_customview(); -#endif t3_basics_refresh_customview(depth, t3_selection_customview, &t3screen, &t3c1, &t3c2, stateUsedWrite->diveSettings.diveMode); } @@ -855,16 +851,6 @@ default: break; } -#if 0 - if(gasPosIdx < 3) - { - lineNumber = 1; - } - else - { - lineNumber = 0; - } -#endif gasPosIdx++; fPpO2ofGasAtThisDepth = (stateUsed->lifeData.pressure_ambient_bar - WATER_VAPOUR_PRESSURE) * pGasLine[gasId].oxygen_percentage / 100; @@ -1456,10 +1442,14 @@ { iterate = 1; } - if((tX_customviews[index] == CVIEW_T3_TTS) && !pDecoinfo->output_time_to_surface_seconds) + if((tX_customviews[index] == CVIEW_T3_TTS) && !pDecoinfo->output_time_to_surface_seconds) /* Skip TTS if value is 0 */ { iterate = 1; } + 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 */ + { + iterate = 1; + } if((iterate) && (action == ACTION_END)) { action = ACTION_BUTTON_ENTER;