Mercurial > public > ostc4
diff Discovery/Src/tHome.c @ 387:0dbb74be972f
Merged in Ideenmodellierer/ostc4/MotionDetection (pull request #34)
MotionDetection
author | heinrichsweikamp <bitbucket@heinrichsweikamp.com> |
---|---|
date | Sun, 24 Nov 2019 15:46:58 +0000 |
parents | 39c147e47c1c |
children | b560e474e319 |
line wrap: on
line diff
--- a/Discovery/Src/tHome.c Sun Nov 24 16:08:29 2019 +0100 +++ b/Discovery/Src/tHome.c Sun Nov 24 15:46:58 2019 +0000 @@ -42,6 +42,7 @@ #include "tMenuEditGasOC.h" // for openEdit_DiveSelectBetterGas() #include "tMenuEditSetpoint.h" // for openEdit_DiveSelectBetterSetpoint() #include "simulation.h" +#include "motion.h" /* Private types -------------------------------------------------------------*/ @@ -56,7 +57,7 @@ static uint16_t tHome_tick_count_cview; static uint16_t tHome_tick_count_field; -const uint8_t cv_changelist[6] = {CVIEW_Compass, CVIEW_SummaryOfLeftCorner, CVIEW_Tissues, CVIEW_Profile, CVIEW_EADTime, CVIEW_Gaslist}; +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}; /* Private function prototypes -----------------------------------------------*/ @@ -147,8 +148,13 @@ 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: @@ -238,8 +244,14 @@ if(settingsGetPointer()->design == 4) return; - if(settingsGetPointer()->design == 3) + 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()) { @@ -330,20 +342,20 @@ } -void tHome_change_customview_button_pressed(void) +void tHome_change_customview_button_pressed(uint8_t action) { tHome_tick_count_cview = 0; if(settingsGetPointer()->design == 7) - t7_change_customview(); + t7_change_customview(action); else if(settingsGetPointer()->design == 3) - t3_change_customview(); + t3_change_customview(action); else if(settingsGetPointer()->design == 5) - t5_change_customview(); + t5_change_customview(action); else if(settingsGetPointer()->design == 6) - t6_change_customview(); + t6_change_customview(action); }