aboutsummaryrefslogtreecommitdiff
path: root/include/libsurvive
diff options
context:
space:
mode:
authorMike Turvey <mturvey6@gmail.com>2018-01-05 03:54:29 -0700
committerMike Turvey <mturvey6@gmail.com>2018-01-05 03:54:29 -0700
commit735a8bd11070b0c563e891ff8b70ce297a52a367 (patch)
tree0907027c98ca28d2e13f1e66edd38135119946d5 /include/libsurvive
parent499b80ae7b538f8e66f5ec8bfa60c7136a3babf5 (diff)
downloadlibsurvive-735a8bd11070b0c563e891ff8b70ce297a52a367.tar.gz
libsurvive-735a8bd11070b0c563e891ff8b70ce297a52a367.tar.bz2
Add standard output mechanism for posers
Added a raw pose output/ callback that the posers can call when they have calculated a pose.
Diffstat (limited to 'include/libsurvive')
-rw-r--r--include/libsurvive/survive.h5
-rw-r--r--include/libsurvive/survive_types.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/include/libsurvive/survive.h b/include/libsurvive/survive.h
index 0cfab1f..4821e63 100644
--- a/include/libsurvive/survive.h
+++ b/include/libsurvive/survive.h
@@ -129,6 +129,7 @@ struct SurviveContext
imu_process_func imuproc;
angle_process_func angleproc;
button_process_func buttonproc;
+ raw_pose_func rawposeproc;
struct config_group* global_config_values;
struct config_group* lh_config; //lighthouse configs
@@ -163,7 +164,8 @@ void survive_install_error_fn( SurviveContext * ctx, text_feedback_func fbp );
void survive_install_light_fn( SurviveContext * ctx, light_process_func fbp );
void survive_install_imu_fn( SurviveContext * ctx, imu_process_func fbp );
void survive_install_angle_fn( SurviveContext * ctx, angle_process_func fbp );
-void survive_install_button_fn( SurviveContext * ctx, button_process_func fbp );
+void survive_install_button_fn(SurviveContext * ctx, button_process_func fbp);
+void survive_install_raw_pose_fn(SurviveContext * ctx, raw_pose_func fbp);
void survive_close( SurviveContext * ctx );
int survive_poll( SurviveContext * ctx );
@@ -190,6 +192,7 @@ void survive_default_light_process( SurviveObject * so, int sensor_id, int acode
void survive_default_imu_process( SurviveObject * so, int mode, FLT * accelgyro, uint32_t timecode, int id );
void survive_default_angle_process( SurviveObject * so, int sensor_id, int acode, uint32_t timecode, FLT length, FLT angle, uint32_t lh );
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);
+void survive_default_raw_pose_process(SurviveObject * so, uint8_t lighthouse, FLT *position, FLT *quaternion);
////////////////////// Survive Drivers ////////////////////////////
diff --git a/include/libsurvive/survive_types.h b/include/libsurvive/survive_types.h
index 9a6e148..5384345 100644
--- a/include/libsurvive/survive_types.h
+++ b/include/libsurvive/survive_types.h
@@ -42,7 +42,8 @@ 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);
+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);
+typedef void(*raw_pose_func)(SurviveObject * so, uint8_t lighthouse, FLT *position, FLT *quaternion);
typedef int(*haptic_func)(SurviveObject * so, uint8_t reserved, uint16_t pulseHigh , uint16_t pulseLow, uint16_t repeatCount);