From 18b20af7195b94889924156de2b4aa704b2c7391 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Tue, 3 Apr 2018 15:11:12 -0600 Subject: Refactor pose function to get timecode and not lh --- simple_pose_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'simple_pose_test.c') diff --git a/simple_pose_test.c b/simple_pose_test.c index 0772abb..1696366 100644 --- a/simple_pose_test.c +++ b/simple_pose_test.c @@ -42,10 +42,10 @@ void HandleDestroy() FLT hpos[3]; FLT hpos2[3]; -void testprog_raw_pose_process(SurviveObject *so, uint8_t lighthouse, SurvivePose *pose) { - survive_default_raw_pose_process(so, lighthouse, pose ); +void testprog_raw_pose_process(SurviveObject *so, uint32_t timecode, SurvivePose *pose) { + survive_default_raw_pose_process(so, timecode, pose ); - if( lighthouse != 0 || strcmp( so->codename, "HMD" ) != 0 ) + if( strcmp( so->codename, "HMD" ) != 0 ) return; // print the pose; @@ -64,7 +64,7 @@ void testprog_raw_pose_process(SurviveObject *so, uint8_t lighthouse, SurvivePos hy = pos[1]; hz = pos[2];*/ - printf("Pose: [%1.1x][%s][% 08.8f,% 08.8f,% 08.8f] [ang:%08.2f %08.2f %08.2f %08.2f]\n", lighthouse, so->codename, + printf("Pose: [%u][%s][% 08.8f,% 08.8f,% 08.8f] [ang:%08.2f %08.2f %08.2f %08.2f]\n", timecode, so->codename, pose->Pos[0], pose->Pos[1], pose->Pos[2], pose->Rot[0], pose->Rot[1], pose->Rot[2], pose->Rot[3]); hpos[0] = pose->Pos[0]; @@ -163,9 +163,9 @@ int main( int argc, char ** argv ) } //survive_install_button_fn(ctx, testprog_button_process); - survive_install_raw_pose_fn(ctx, testprog_raw_pose_process); + survive_install_pose_fn(ctx, testprog_raw_pose_process); //survive_install_imu_fn(ctx, testprog_imu_process); - survive_install_raw_pose_fn(ctx, testprog_raw_pose_process); + survive_install_pose_fn(ctx, testprog_raw_pose_process); //survive_install_angle_fn(ctx, testprog_angle_process ); ctx->bsd[0].PositionSet = ctx->bsd[1].PositionSet = 1; -- cgit v1.2.3 From fdbe85e242cec2765041404214eb03a16dde91fc Mon Sep 17 00:00:00 2001 From: cnlohr Date: Tue, 3 Apr 2018 00:56:56 -0400 Subject: For the same of simplifying testing, this seems like the best tool. Its original usefulness has since dried up but it can live again as a slightly different tool. --- simple_pose_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'simple_pose_test.c') diff --git a/simple_pose_test.c b/simple_pose_test.c index 1696366..d28e78d 100644 --- a/simple_pose_test.c +++ b/simple_pose_test.c @@ -168,6 +168,7 @@ int main( int argc, char ** argv ) survive_install_pose_fn(ctx, testprog_raw_pose_process); //survive_install_angle_fn(ctx, testprog_angle_process ); +#if 0 //Don't reset poses ctx->bsd[0].PositionSet = ctx->bsd[1].PositionSet = 1; int i; for( i = 0; i < 2; i++ ) @@ -181,7 +182,7 @@ int main( int argc, char ** argv ) p->Rot[2] = 0; p->Rot[3] = 0; } - +#endif OGCreateThread( GUIThread, 0 ); if( !ctx ) -- cgit v1.2.3