comparison Discovery/Src/tHome.c @ 384:427ae9f8e28e MotionDetection

Consider number of available t3 views in sector handling: Before chande the number of sectors were taken from t7 view only causing t3 view to be shown inconsistent in case t7 view count were not 6. => added function to count views.
author ideenmodellierer
date Thu, 17 Oct 2019 23:09:17 +0200
parents 0dbf550dc743
children 39c147e47c1c
comparison
equal deleted inserted replaced
383:49a02dea8ae3 384:427ae9f8e28e
146 { 146 {
147 if(settingsGetPointer()->design == 4) 147 if(settingsGetPointer()->design == 4)
148 return; 148 return;
149 149
150 if(settingsGetPointer()->design == 3) 150 if(settingsGetPointer()->design == 3)
151 {
151 settingsGetPointer()->design = 7; 152 settingsGetPointer()->design = 7;
152 153 if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR)
154 {
155 DefinePitchSectors(stateRealGetPointer()->lifeData.compass_pitch,CUSTOMER_DEFINED_VIEWS);
156 }
157 }
153 switch(get_globalState()) 158 switch(get_globalState())
154 { 159 {
155 case StD: 160 case StD:
156 if(settingsGetPointer()->design == 6) 161 if(settingsGetPointer()->design == 6)
157 { 162 {
237 if(sendAction == ACTION_BUTTON_ENTER) 242 if(sendAction == ACTION_BUTTON_ENTER)
238 { 243 {
239 if(settingsGetPointer()->design == 4) 244 if(settingsGetPointer()->design == 4)
240 return; 245 return;
241 246
242 if(settingsGetPointer()->design == 3) 247 if(settingsGetPointer()->design == 3) /* switch back to t7 (standard) view */
248 {
243 settingsGetPointer()->design = 7; 249 settingsGetPointer()->design = 7;
250 if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR)
251 {
252 DefinePitchSectors(stateRealGetPointer()->lifeData.compass_pitch,CUSTOMER_DEFINED_VIEWS);
253 }
254 }
244 255
245 switch(get_globalState()) 256 switch(get_globalState())
246 { 257 {
247 case StDMGAS: 258 case StDMGAS:
248 openEdit_DiveSelectBetterGas(); 259 openEdit_DiveSelectBetterGas();