diff Discovery/Inc/motion.h @ 373:7b981f8bdd41 MotionDetection

Add scroll event by pitch angle detection: Add a function to scroll through the custom view in case the computer is not in the typical center position Refine Pitch Detection: Changed implementation to use sectors for detection. Increased detection window
author ideenmodellierer
date Sun, 08 Sep 2019 13:45:17 +0200
parents fca370f847f8
children 4bb5ceebfaf9
line wrap: on
line diff
--- a/Discovery/Inc/motion.h	Mon Aug 19 17:50:55 2019 +0200
+++ b/Discovery/Inc/motion.h	Sun Sep 08 13:45:17 2019 +0200
@@ -10,13 +10,15 @@
 
 
 /* exported data types */
-#define CUSTOMER_DEFINED_VIEWS	(100u)	/* value will cause the function to detect the numer of selected views */
+#define CUSTOMER_DEFINED_VIEWS	(100u)	/* value will cause the function to detect the number of selected views */
+#define CUSTOMER_KEEP_LAST_SECTORS	(200u)	/* do not update number of sectors, just define the new center position */
 
 typedef enum
 {
 		MOTION_DETECT_OFF = 0,
 		MOTION_DETECT_SECTOR,
-		MOTION_DETECT_MOVE
+		MOTION_DETECT_MOVE,
+		MOTION_DETECT_SCROLL
 } MotionDetectMethod_t;
 
 typedef enum
@@ -43,5 +45,6 @@
 void DefinePitchSectors(float centerAngle, uint8_t numOfSectors);
 detectionState_t detectPitch(float currentPitch);
 detectionState_t detectSectorButtonEvent(float curPitch);
+detectionState_t detectScrollButtonEvent(float curPitch);
 
 #endif /* INC_MOTION_H_ */