diff options
author | Joshua Allen <axlecrusher@gmail.com> | 2017-03-08 20:10:22 -0500 |
---|---|---|
committer | Joshua Allen <axlecrusher@gmail.com> | 2017-03-08 20:10:22 -0500 |
commit | 4384e9850016e2117fda6e50499afec797993002 (patch) | |
tree | 6eae1ca4c09e839c8acbabe3f4be7f5ef204c295 /include/libsurvive/survive_types.h | |
parent | b13b5f9af2c2803f919d8897cd3ed5d24831cad3 (diff) | |
parent | 5eeecb19eb884baf4781280a9c8e1c394fe9c669 (diff) | |
download | libsurvive-4384e9850016e2117fda6e50499afec797993002.tar.gz libsurvive-4384e9850016e2117fda6e50499afec797993002.tar.bz2 |
Merge branch 'master' of github.com:cnlohr/libsurvive
Diffstat (limited to 'include/libsurvive/survive_types.h')
-rw-r--r-- | include/libsurvive/survive_types.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/include/libsurvive/survive_types.h b/include/libsurvive/survive_types.h index 593819f..1600e11 100644 --- a/include/libsurvive/survive_types.h +++ b/include/libsurvive/survive_types.h @@ -9,6 +9,11 @@ #endif #endif +typedef struct SurvivePose +{ + FLT Pos[3]; + FLT Rot[4]; +} SurvivePose; //Careful with this, you can't just add another one right now, would take minor changes in survive_data.c and the cal tools. //It will also require a recompile. TODO: revisit this and correct the comment once fixed. @@ -17,13 +22,23 @@ #define INTBUFFSIZE 64 #define SENSORS_PER_OBJECT 32 -struct SurviveObject; -struct SurviveContext; +typedef struct SurviveObject SurviveObject; +typedef struct SurviveContext SurviveContext; +typedef struct BaseStationData BaseStationData; +typedef struct SurviveCalData SurviveCalData; //XXX Warning: This may be removed. Check at a later time for its defunctness. + +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 ); +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 ); + + +//Device drivers (prefix your drivers with "DriverReg") i.e. +// REGISTER_LINKTIME( DriverRegHTCVive ); +typedef int (*DeviceDriver)( SurviveContext * ctx ); +typedef int (*DeviceDriverCb)( struct SurviveContext * ctx, void * driver ); +typedef int (*DeviceDriverMagicCb)( struct SurviveContext * ctx, void * driver, int magic_code, void * data, int datalen ); -typedef void (*text_feedback_func)( struct SurviveContext * ctx, const char * fault ); -typedef void (*light_process_func)( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length ); -typedef void (*imu_process_func)( struct SurviveObject * so, int16_t * accelgyro, uint32_t timecode, int id ); -typedef void (*angle_process_func)( struct SurviveObject * so, int sensor_id, int acode, uint32_t timecode, FLT length, FLT angle ); #endif |