aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-03-11 23:31:47 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-03-11 23:31:47 -0600
commit7fadeeff29074520224be385ecd6c50271a07220 (patch)
tree396b1e3cbdc6472714ce4af2fec9713be5e1168e /src
parent4b0583e11983cf2446ccbda9b6115d506f781bca (diff)
downloadlibsurvive-7fadeeff29074520224be385ecd6c50271a07220.tar.gz
libsurvive-7fadeeff29074520224be385ecd6c50271a07220.tar.bz2
FLT* -> SurvivePose*
Diffstat (limited to 'src')
-rw-r--r--src/poser_turveytori.c9
-rw-r--r--src/survive_process.c3
2 files changed, 4 insertions, 8 deletions
diff --git a/src/poser_turveytori.c b/src/poser_turveytori.c
index 4398b66..dae51e6 100644
--- a/src/poser_turveytori.c
+++ b/src/poser_turveytori.c
@@ -1616,7 +1616,7 @@ static void QuickPose(SurviveObject *so, int lh)
if (sensorCount > 4)
{
- FLT pose[7];
+ SurvivePose pose;
// TODO: This countdown stuff is a total hack!
// it basically ignores all the logic to find the most reliable data points
@@ -1633,16 +1633,13 @@ static void QuickPose(SurviveObject *so, int lh)
//{
// SolveForLighthouse(pos, quat, to, so, 0, lh, 0);
//}
-
-
-
- SolveForLighthouse(&pose[0], &pose[3], to, so, 0, lh, 0);
+ SolveForLighthouse(&pose.Pos[0], &pose.Rot[0], to, so, 0, lh, 0);
//printf("P&O: [% 08.8f,% 08.8f,% 08.8f] [% 08.8f,% 08.8f,% 08.8f,% 08.8f]\n", pos[0], pos[1], pos[2], quat[0], quat[1], quat[2], quat[3]);
if (so->ctx->rawposeproc)
{
- so->ctx->rawposeproc(so, lh, pose);
+ so->ctx->rawposeproc(so, lh, &pose);
}
if (ttDebug) printf("!\n");
diff --git a/src/survive_process.c b/src/survive_process.c
index 1ea3061..d156d9e 100644
--- a/src/survive_process.c
+++ b/src/survive_process.c
@@ -102,8 +102,7 @@ void survive_default_button_process(SurviveObject * so, uint8_t eventType, uint8
//}
}
-void survive_default_raw_pose_process(SurviveObject * so, uint8_t lighthouse, FLT *pose)
-{
+void survive_default_raw_pose_process(SurviveObject *so, uint8_t lighthouse, SurvivePose *pose) {
// print the pose;
//printf("Pose: [%1.1x][%s][% 08.8f,% 08.8f,% 08.8f] [% 08.8f,% 08.8f,% 08.8f,% 08.8f]\n", lighthouse, so->codename, pos[0], pos[1], pos[2], quat[0], quat[1], quat[2], quat[3]);