The MGC3130 is the world’s first electrical-field (E-field) based three-dimensional (3D) tracking and gesture controller
Dependents: NucleoMGC3130 i2c_master
Gesture/GestureInfo.h
- Committer:
- yangcq88517
- Date:
- 2015-10-07
- Revision:
- 1:621c4e9238ef
- Child:
- 2:c7d984193741
File content as of revision 1:621c4e9238ef:
#ifndef UK_AC_HERTS_SMARTLAB_MGC3130_GestuerInfo #define UK_AC_HERTS_SMARTLAB_MGC3130_GestuerInfo class GestureInfo { private: char * data; public: void set(char * value) { data = value; } /* NoGesture = 0, GarbageModel = 1, FlickWestToEast = 2, FlickEastToWest = 3, FlickSouthToNorth = 4, FlickNorthToSouth = 5, CircleClockwise = 6, //only active if AirWheel disabled CircleCounterclockwise = 7, //only active if AirWheel disabled WaveX = 8, WaveY = 9, Hold= 64, Presence = 73, EdgeFlickWestToEast = 65, EdgeFlickEastToWest = 66, EdgeFlickSouthToNorth = 67, EdgeFlickNorthToSouth = 68, DoubleFlickWestToEast = 69, DoubleFlickEastToWest = 70, DoubleFlickSouthToNorth = 71, DoubleFlickNorthToSouth = 72, */ int getRecognizedGesture() { return data[0]; } /* GarbageModel = 0, FlickGesture = 1, CirculaGesture = 2, */ int getGestureClass() { return (data[1] & 0xF0) >> 4; } //Edge flick – is ‘1’ if flick gesture is classified as edge flick bool isEdgeFlick() { return (data[2] & 0x01) == 0x01? true: false; } bool isHandPresence() { return (data[3] & 0x08) == 0x08? true: false; } bool isHandHold() { return (data[3] & 0x10) == 0x10? true: false; } bool isHandInside() { return (data[3] & 0x20) == 0x20? true: false; } bool isRecognitionInProcess() { return (data[3] & 0x80) == 0x80? true: false; } }; #endif