aboutsummaryrefslogtreecommitdiff
path: root/include/libsurvive/survive_types.h
diff options
context:
space:
mode:
authorMichael Turvey <mwturvey@users.noreply.github.com>2018-01-03 19:05:13 -0700
committerGitHub <noreply@github.com>2018-01-03 19:05:13 -0700
commit1d98830c2b99afc7dfd02ada440acd30652db61b (patch)
tree63e956b42d54b12f7d7c943023c4e587ebad50b1 /include/libsurvive/survive_types.h
parent24397b5c90e307718c33968a7835bb4255286dad (diff)
parentf183aa480c549695ac5b481fade04e62f71d1e0a (diff)
downloadlibsurvive-1d98830c2b99afc7dfd02ada440acd30652db61b.tar.gz
libsurvive-1d98830c2b99afc7dfd02ada440acd30652db61b.tar.bz2
Merge pull request #89 from mwturvey/MakeTrackingGood
Controller Buttons Fully Implemented
Diffstat (limited to 'include/libsurvive/survive_types.h')
-rw-r--r--include/libsurvive/survive_types.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/libsurvive/survive_types.h b/include/libsurvive/survive_types.h
index 224719e..fa3eb2f 100644
--- a/include/libsurvive/survive_types.h
+++ b/include/libsurvive/survive_types.h
@@ -27,6 +27,12 @@ typedef struct SurvivePose
#define INTBUFFSIZE 64
#define SENSORS_PER_OBJECT 32
+// These are used for the eventType of button_process_func
+#define BUTTON_EVENT_BUTTON_NONE 0
+#define BUTTON_EVENT_BUTTON_DOWN 1
+#define BUTTON_EVENT_BUTTON_UP 2
+#define BUTTON_EVENT_AXIS_CHANGED 3
+
typedef struct SurviveObject SurviveObject;
typedef struct SurviveContext SurviveContext;
typedef struct BaseStationData BaseStationData;
@@ -36,7 +42,7 @@ typedef void (*text_feedback_func)( SurviveContext * ctx, const char * fault );
typedef void (*light_process_func)( SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length, uint32_t lighthouse);
typedef void (*imu_process_func)( SurviveObject * so, int mask, FLT * accelgyro, uint32_t timecode, int id );
typedef void (*angle_process_func)( SurviveObject * so, int sensor_id, int acode, uint32_t timecode, FLT length, FLT angle, uint32_t lh);
-
+typedef void (*button_process_func)(SurviveObject * so, uint8_t eventType, uint8_t buttonId, uint8_t axis1Id, uint16_t axis1Val, uint8_t axis2Id, uint16_t axis2Val);
//Device drivers (prefix your drivers with "DriverReg") i.e.
// REGISTER_LINKTIME( DriverRegHTCVive );