aboutsummaryrefslogtreecommitdiff
path: root/include/libsurvive/poser.h
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-03-08 00:30:48 -0500
committercnlohr <lohr85@gmail.com>2017-03-08 00:30:48 -0500
commit394cbc465e776137834eea830038b43ea98f6268 (patch)
tree29e60f5257db7377236a1cd76b540685b76a7b8b /include/libsurvive/poser.h
parent57e82519b4844620851784e7682a2c562cb06d47 (diff)
downloadlibsurvive-394cbc465e776137834eea830038b43ea98f6268.tar.gz
libsurvive-394cbc465e776137834eea830038b43ea98f6268.tar.bz2
Switch types over to avoiding extra struct keyword. Switch poses to "SurvivePose" type.
Diffstat (limited to 'include/libsurvive/poser.h')
-rw-r--r--include/libsurvive/poser.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/libsurvive/poser.h b/include/libsurvive/poser.h
index 4894acf..c514953 100644
--- a/include/libsurvive/poser.h
+++ b/include/libsurvive/poser.h
@@ -11,22 +11,22 @@ typedef enum PoserType_t
POSERDATA_FULL_SCENE, //Full, statified X, Y sweep data for both lighthouses.
} PoserType;
-struct PoserData
+typedef struct
{
PoserType pt;
uint8_t data[0];
-};
+} PoserData;
-struct PoserDataIMU
+typedef struct
{
PoserType pt;
uint8_t datamask; //0 = accel present, 1 = gyro present, 2 = mag present.
FLT accel[3];
FLT gyro[3];
FLT mag[3];
-};
+} PoserDataIMU;
-struct PoserDataLight
+typedef struct
{
PoserType pt;
int sensor_id;
@@ -34,21 +34,21 @@ struct PoserDataLight
uint32_t timecode; //In object-local ticks.
FLT length; //In seconds
FLT angle; //In radians from center of lighthouse.
-};
+} PoserDataLight;
-struct PoserDataFullScene
+typedef struct
{
PoserType pt;
//If "lengths[...]" < 0, means not a valid piece of sweep information.
FLT lengths[SENSORS_PER_OBJECT][NUM_LIGHTHOUSES][2];
- FLT angles [SENSORS_PER_OBJECT][NUM_LIGHTHOUSES][2]; //2 Axes
+ FLT angles [SENSORS_PER_OBJECT][NUM_LIGHTHOUSES][2]; //2 Axes (Angles in LH space)
- struct PoserDataIMU lastimu;
-};
+ PoserDataIMU lastimu;
+} PoserDataFullScene;
//When you register your posers using the internal system,
-typedef int (*PoserCB)( struct SurviveObject * so, struct PoserData * pd );
+typedef int (*PoserCB)( SurviveObject * so, PoserData * pd );
#endif