aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-03 23:44:14 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-03 23:44:14 -0600
commitc7d9d271796b20f886e2441de852498ecb25ca82 (patch)
tree5929c2793c33c80e5392982a9baaa8d5ccaca724 /src/survive.c
parentfe025b0ff6bfb440da7cec8f388fa951910a86f0 (diff)
parent6a45298c9bc34aac59cc2ebb9de2d82c7a42756e (diff)
downloadlibsurvive-c7d9d271796b20f886e2441de852498ecb25ca82.tar.gz
libsurvive-c7d9d271796b20f886e2441de852498ecb25ca82.tar.bz2
Merge branch 'master' into imu
Diffstat (limited to 'src/survive.c')
-rw-r--r--src/survive.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/survive.c b/src/survive.c
index 1a782a2..b024bbb 100644
--- a/src/survive.c
+++ b/src/survive.c
@@ -216,7 +216,7 @@ SurviveContext *survive_init_internal(int argc, char *const *argv) {
ctx->angleproc = survive_default_angle_process;
ctx->lighthouseposeproc = survive_default_lighthouse_pose_process;
ctx->configfunction = survive_default_htc_config_process;
- ctx->rawposeproc = survive_default_raw_pose_process;
+ ctx->poseproc = survive_default_raw_pose_process;
ctx->calibration_config = survive_calibration_config_ctor();
ctx->calibration_config.use_flag = (enum SurviveCalFlag)survive_configi(ctx, "bsd-cal", SC_GET, SVCal_All);
@@ -380,11 +380,11 @@ void survive_install_button_fn(SurviveContext *ctx, button_process_func fbp) {
ctx->buttonproc = survive_default_button_process;
}
-void survive_install_raw_pose_fn(SurviveContext *ctx, raw_pose_func fbp) {
+void survive_install_pose_fn(SurviveContext *ctx, pose_func fbp) {
if (fbp)
- ctx->rawposeproc = fbp;
+ ctx->poseproc = fbp;
else
- ctx->rawposeproc = survive_default_raw_pose_process;
+ ctx->poseproc = survive_default_raw_pose_process;
}
void survive_install_lighthouse_pose_fn(SurviveContext *ctx, lighthouse_pose_func fbp) {
@@ -558,9 +558,16 @@ int survive_simple_inflate(struct SurviveContext *ctx, const char *input, int in
return len;
}
+#endif
+
const char *survive_object_codename(SurviveObject *so) { return so->codename; }
+
+const char *survive_object_drivername(SurviveObject *so) { return so->drivername; }
+const int8_t survive_object_charge(SurviveObject *so) { return so->charge; }
+const bool survive_object_charging(SurviveObject *so) { return so->charging; }
+
+const SurvivePose *survive_object_pose(SurviveObject *so) { return &so->OutPose; }
+
int8_t survive_object_sensor_ct(SurviveObject *so) { return so->sensor_ct; }
const FLT *survive_object_sensor_locations(SurviveObject *so) { return so->sensor_locations; }
-const FLT *survive_object_sensor_normals(SurviveObject *so) { return so->sensor_normals; }
-
-#endif
+const FLT *survive_object_sensor_normals(SurviveObject *so) { return so->sensor_normals; } \ No newline at end of file