aboutsummaryrefslogtreecommitdiff
path: root/include/libsurvive/survive.h
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-03 15:11:12 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-03 17:01:14 -0600
commit18b20af7195b94889924156de2b4aa704b2c7391 (patch)
tree0eb3e3ab817341595167a949f67d5c0ba1dd879f /include/libsurvive/survive.h
parentd3d159772f1684082d7a545fbb3028d98d803308 (diff)
downloadlibsurvive-18b20af7195b94889924156de2b4aa704b2c7391.tar.gz
libsurvive-18b20af7195b94889924156de2b4aa704b2c7391.tar.bz2
Refactor pose function to get timecode and not lh
Diffstat (limited to 'include/libsurvive/survive.h')
-rw-r--r--include/libsurvive/survive.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/libsurvive/survive.h b/include/libsurvive/survive.h
index 93ac9b7..0558dc8 100644
--- a/include/libsurvive/survive.h
+++ b/include/libsurvive/survive.h
@@ -75,6 +75,7 @@ struct SurviveObject {
// Pose Information, also "poser" field.
FLT PoseConfidence; // 0..1
SurvivePose OutPose; // Final pose? (some day, one can dream!)
+ uint32_t OutPose_timecode;
SurvivePose FromLHPose[NUM_LIGHTHOUSES]; // Filled out by poser, contains computed position from each lighthouse.
void *PoserData; // Initialized to zero, configured by poser, can be anything the poser wants.
PoserCB PoserFn;
@@ -114,6 +115,7 @@ struct SurviveObject {
haptic_func haptic;
SurviveSensorActivations activations;
+ void* user_ptr;
// Debug
int tsl;
};
@@ -206,7 +208,7 @@ struct SurviveContext {
imu_process_func imuproc;
angle_process_func angleproc;
button_process_func buttonproc;
- raw_pose_func rawposeproc;
+ pose_func poseproc;
lighthouse_pose_func lighthouseposeproc;
htc_config_func configfunction;
handle_lightcap_func lightcapfunction;
@@ -268,7 +270,7 @@ SURVIVE_EXPORT void survive_install_light_fn(SurviveContext *ctx, light_process_
SURVIVE_EXPORT void survive_install_imu_fn(SurviveContext *ctx, imu_process_func fbp);
SURVIVE_EXPORT void survive_install_angle_fn(SurviveContext *ctx, angle_process_func fbp);
SURVIVE_EXPORT void survive_install_button_fn(SurviveContext *ctx, button_process_func fbp);
-SURVIVE_EXPORT void survive_install_raw_pose_fn(SurviveContext *ctx, raw_pose_func fbp);
+SURVIVE_EXPORT void survive_install_pose_fn(SurviveContext *ctx, pose_func fbp);
SURVIVE_EXPORT void survive_install_lighthouse_pose_fn(SurviveContext *ctx, lighthouse_pose_func fbp);
SURVIVE_EXPORT int survive_startup(SurviveContext *ctx);
SURVIVE_EXPORT int survive_poll(SurviveContext *ctx);
@@ -310,7 +312,7 @@ SURVIVE_EXPORT void survive_default_angle_process(SurviveObject *so, int sensor_
SURVIVE_EXPORT void survive_default_button_process(SurviveObject *so, uint8_t eventType, uint8_t buttonId,
uint8_t axis1Id, uint16_t axis1Val, uint8_t axis2Id,
uint16_t axis2Val);
-SURVIVE_EXPORT void survive_default_raw_pose_process(SurviveObject *so, uint8_t lighthouse, SurvivePose *pose);
+SURVIVE_EXPORT void survive_default_raw_pose_process(SurviveObject *so, uint32_t timecode, SurvivePose *pose);
SURVIVE_EXPORT void survive_default_lighthouse_pose_process(SurviveContext *ctx, uint8_t lighthouse,
SurvivePose *lh_pose, SurvivePose *obj_pose);
SURVIVE_EXPORT int survive_default_htc_config_process(SurviveObject *so, char *ct0conf, int len);