view Discovery/Inc/motion.h @ 372:75eedde05ff6 MotionDetection

merged default into MotionDetection
author Ideenmodellierer
date Mon, 19 Aug 2019 17:50:55 +0200
parents fca370f847f8
children 7b981f8bdd41
line wrap: on
line source

/*
 * motion.h
 *
 *  Created on: 20.05.2019
 *      Author: Thorsten Sonntag
 */

#ifndef INC_MOTION_H_
#define INC_MOTION_H_


/* exported data types */
#define CUSTOMER_DEFINED_VIEWS	(100u)	/* value will cause the function to detect the numer of selected views */

typedef enum
{
		MOTION_DETECT_OFF = 0,
		MOTION_DETECT_SECTOR,
		MOTION_DETECT_MOVE
} MotionDetectMethod_t;

typedef enum
{
		DETECT_START = 0,
		DETECT_POS_MOVE,
		DETECT_MAXIMA,
		DETECT_FALLBACK,
		DETECT_POS_PITCH,
		DETECT_NEG_MOVE,
		DETECT_MINIMA,
		DETECT_RISEBACK,
		DETECT_NEG_PITCH,
		DETECT_NOTHING
} detectionState_t;

typedef struct
{
    float upperlimit;
    float lowerlimit;
} SSector;

void InitMotionDetection(void);
void DefinePitchSectors(float centerAngle, uint8_t numOfSectors);
detectionState_t detectPitch(float currentPitch);
detectionState_t detectSectorButtonEvent(float curPitch);

#endif /* INC_MOTION_H_ */