changeset 597:132e7e3d13a7

MotionControl-Sector: Map sectors during switch T7 <=> T3: The number and available custom views may differ between the setup for T3 and T7 view. That's why the sectors have to be remapped during every T3 <=> T7 switch
author Ideenmodellierer
date Mon, 04 Jan 2021 21:38:28 +0100
parents 16e369eae6e5
children 0a3836643173
files Discovery/Inc/motion.h Discovery/Src/base.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Inc/motion.h	Mon Jan 04 21:35:38 2021 +0100
+++ b/Discovery/Inc/motion.h	Mon Jan 04 21:38:28 2021 +0100
@@ -76,6 +76,7 @@
 void resetMotionDeltaHistory();
 void evaluateMotionDelta(float roll, float pitch, float yaw);
 void DefinePitchSectors(float centerAngle, uint8_t numOfSectors);
+void MapCVToSector(void);
 detectionState_t detectPitch(float currentPitch);
 detectionState_t detectSectorButtonEvent(float curPitch);
 detectionState_t detectScrollButtonEvent(float curPitch);
--- a/Discovery/Src/base.c	Mon Jan 04 21:35:38 2021 +0100
+++ b/Discovery/Src/base.c	Mon Jan 04 21:38:28 2021 +0100
@@ -792,6 +792,7 @@
 							if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR)
 							{
 								DefinePitchSectors(settingsGetPointer()->viewPitch,CUSTOMER_DEFINED_VIEWS);
+								MapCVToSector();
 							}
 						}
 					}
@@ -807,6 +808,7 @@
 						if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR)
 						{
 							DefinePitchSectors(settingsGetPointer()->viewPitch,CUSTOMER_DEFINED_VIEWS);
+							MapCVToSector();
 						}
 					}
 					else if (settingsGetPointer()->extraDisplay	== EXTRADISPLAY_DECOGAME)