comparison Discovery/Src/t3.c @ 601:7ef2d310287d

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.
author Ideenmodellierer
date Mon, 04 Jan 2021 22:49:07 +0100
parents 5a8f9126e4cb
children 2cb0a97a07ad
comparison
equal deleted inserted replaced
600:a48a1cd983af 601:7ef2d310287d
1035 GFX_write_string(&FontT42,tXc1,text,0); 1035 GFX_write_string(&FontT42,tXc1,text,0);
1036 snprintf(text,100,"\030\003%03i`",heading); 1036 snprintf(text,100,"\030\003%03i`",heading);
1037 GFX_write_string(&FontT105,tXc1,text,0); 1037 GFX_write_string(&FontT105,tXc1,text,0);
1038 t3_basics_compass(tXscreen, center, heading, stateUsed->diveSettings.compassHeading); 1038 t3_basics_compass(tXscreen, center, heading, stateUsed->diveSettings.compassHeading);
1039 break; 1039 break;
1040 1040 #ifdef ENABLE_T3_PROFILE_VIEW
1041 case CVIEW_T3_Profile: 1041 case CVIEW_T3_Profile:
1042 snprintf(text,100,"\032\f\002%c%c",TXT_2BYTE,TXT2BYTE_Profile); 1042 snprintf(text,100,"\032\f\002%c%c",TXT_2BYTE,TXT2BYTE_Profile);
1043 GFX_write_string(&FontT42,tXc1,text,0); 1043 GFX_write_string(&FontT42,tXc1,text,0);
1044 t3_miniLiveLogProfile(); 1044 t3_miniLiveLogProfile();
1045 break; 1045 break;
1046 #endif
1046 case CVIEW_T3_DecoTTS: 1047 case CVIEW_T3_DecoTTS:
1047 case CVIEW_T3_Decostop: 1048 case CVIEW_T3_Decostop:
1048 default: 1049 default:
1049 // decostop 1050 // decostop
1050 if(pDecoinfo->output_time_to_surface_seconds) 1051 if(pDecoinfo->output_time_to_surface_seconds)
1602 } 1603 }
1603 else /* special case which are enabled but not to be displayed at the moment */ 1604 else /* special case which are enabled but not to be displayed at the moment */
1604 { 1605 {
1605 if(settingsGetPointer()->MotionDetection != MOTION_DETECT_SECTOR) /* no hiding in case of active sector view option (fixed mapping would change during dive) */ 1606 if(settingsGetPointer()->MotionDetection != MOTION_DETECT_SECTOR) /* no hiding in case of active sector view option (fixed mapping would change during dive) */
1606 { 1607 {
1607 if((tX_customviews[index] == CVIEW_T3_TTS) && !pDecoinfo->output_time_to_surface_seconds) /* Skip TTS if value is 0 */ 1608 /* Skip TTS if value is 0 */
1609 if((tX_customviews[index] == CVIEW_T3_TTS) && (!pDecoinfo->output_time_to_surface_seconds))
1608 { 1610 {
1611 if(*tX_selection_customview == tX_customviews[index])
1612 {
1613 useFallback = 1; /* the provided view is disabled => use fallback */
1614 }
1609 iterate = 1; 1615 iterate = 1;
1610 fallbackSelection = CVIEW_T3_TTS; 1616 if(fallbackSelection == CVIEW_noneOrDebug)
1617 {
1618 fallbackSelection = CVIEW_T3_TTS;
1619 }
1611 } 1620 }
1612 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 */ 1621 /* Skip Deco if NDL is not set */
1622 if((tX_customviews[index] == CVIEW_T3_Decostop) && ((!pDecoinfo->output_ndl_seconds) && (!pDecoinfo->output_time_to_surface_seconds) && (timer_Safetystop_GetCountDown() == 0)))
1613 { 1623 {
1624 if(*tX_selection_customview == tX_customviews[index])
1625 {
1626 useFallback = 1; /* the provided view is disabled => use fallback */
1627 }
1628 fallbackSelection = CVIEW_T3_Decostop;
1614 iterate = 1; 1629 iterate = 1;
1615 fallbackSelection = CVIEW_T3_Decostop;
1616 } 1630 }
1617 } 1631 }
1618 } 1632 }
1619 if((iterate) && (action == ACTION_END)) /* ACTION_END is used to check the enable state of the provided view. If it is enable the function will return without change */ 1633 if((iterate) && (action == ACTION_END)) /* ACTION_END is used to check the enable state of the provided view. If it is enable the function will return without change */
1620 { 1634 {