view Discovery/Inc/motion.h @ 361:b111fc4250e9 MotionDetection

Pass action to customer vie update function. By intoducing shakes the reason for calling an update may not only be the middle button. To be able to handle positiv and negativ shake events the action is now provided to the update function
author Ideenmodellierer
date Tue, 11 Jun 2019 05:30:09 +0200
parents 4258ea9b67fa
children bdf978d2a5d4
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 */
typedef enum
{
		DETECT_START = 0,
		DETECT_POS_MOVE,
		DETECT_NEG_MOVE,
		DETECT_MAXIMA,
		DETECT_MINIMA,
		DETECT_FALLBACK,
		DETECT_RISEBACK,
		DETECT_POS_SHAKE,
		DETECT_NEG_SHAKE,
		DETECT_NOTHING
} detectionState_t;


void InitMotion(void);
detectionState_t detectShake(float currentPitch);

#endif /* INC_MOTION_H_ */