Mercurial > public > ostc4
changeset 516:bd66f4910993
Added quick menu function to big font view:
In t7 (and some options also in t5) selection of bearing, reset of timer and selection of a better gas is provided using a yellow quick menu. This function has been applied to the big font view, where the upper right box (dive time) is used for showing the options
author | Ideenmodellierer |
---|---|
date | Sun, 06 Sep 2020 21:13:22 +0200 |
parents | 218ac999e96b |
children | 85e0945552ce |
files | Discovery/Src/tHome.c |
diffstat | 1 files changed, 64 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/tHome.c Sun Sep 06 21:09:37 2020 +0200 +++ b/Discovery/Src/tHome.c Sun Sep 06 21:13:22 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_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_END}; /* Private function prototypes -----------------------------------------------*/ @@ -148,18 +148,10 @@ if(settingsGetPointer()->design == 4) return; - if(settingsGetPointer()->design == 3) - { - settingsGetPointer()->design = 7; - if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR) - { - DefinePitchSectors(stateRealGetPointer()->lifeData.compass_pitch,CUSTOMER_DEFINED_VIEWS); - } - } switch(get_globalState()) { - case StD: - if(settingsGetPointer()->design == 6) + case StD: + if(settingsGetPointer()->design == 6) { if(is_stateUsedSetToSim()) set_globalState(StDSIM1); @@ -177,6 +169,26 @@ break; } + if(settingsGetPointer()->design == 3) + { + switch(t3_getCustomView()) + { + case CVIEW_T3_Navigation: + case CVIEW_Compass: set_globalState(StDBEAR); + break; + case CVIEW_T3_StopWatch: set_globalState(StDRAVG); + break; + case CVIEW_T3_GasList: if(stateUsed->warnings.betterGas) + { + set_globalState(StDMGAS); + } + break; + default: + break; + } + break; + } + if(stateUsed->warnings.betterGas) set_globalState(StDMGAS); else @@ -187,10 +199,17 @@ break; case StDMGAS: - if(stateUsed->warnings.betterSetpoint) - set_globalState(StDMSPT); - else - set_globalState(StDMENU); + if(settingsGetPointer()->design == 3) + { + set_globalState(StD); + } + else + { + if(stateUsed->warnings.betterSetpoint) + set_globalState(StDMSPT); + else + set_globalState(StDMENU); + } break; case StDMSPT: @@ -220,17 +239,38 @@ set_globalState(StD); break; - case StDBEAR: // t5_gauge - set_globalState(StDRAVG); - break; + case StDBEAR: + if(settingsGetPointer()->design == 5) + { + set_globalState(StDRAVG); + } - case StDRAVG: // t5_gauge - if(is_stateUsedSetToSim()) - set_globalState(StDSIM1); - else - set_globalState(StD); + if(settingsGetPointer()->design == 3) + { + if(t3_getCustomView() == CVIEW_T3_Navigation) + { + set_globalState(StDRAVG); + } + else + { + set_globalState(StD); + } + } break; - + case StDRAVG: + if(settingsGetPointer()->design == 5) + { + if(is_stateUsedSetToSim()) + set_globalState(StDSIM1); + else + set_globalState(StD); + break; + } + else + { + set_globalState(StD); + } + break; case StDQUIT: // t6_apnea set_globalState(StD); break; @@ -245,15 +285,6 @@ if(settingsGetPointer()->design == 4) return; - if(settingsGetPointer()->design == 3) /* switch back to t7 (standard) view */ - { - settingsGetPointer()->design = 7; - if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR) - { - DefinePitchSectors(stateRealGetPointer()->lifeData.compass_pitch,CUSTOMER_DEFINED_VIEWS); - } - } - switch(get_globalState()) { case StDMGAS: