diff options
author | CNLohr <charles@cnlohr.com> | 2018-03-12 12:29:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-12 12:29:14 -0400 |
commit | e456a3ec1b0e1f04d55cdad7d95898f20bd26c89 (patch) | |
tree | c651c71625a8dbecc0b8293a1701a648eb836984 /test.c | |
parent | 7fadeeff29074520224be385ecd6c50271a07220 (diff) | |
parent | ee0fd0be34cd6715b704be534b7e97087905571f (diff) | |
download | libsurvive-e456a3ec1b0e1f04d55cdad7d95898f20bd26c89.tar.gz libsurvive-e456a3ec1b0e1f04d55cdad7d95898f20bd26c89.tar.bz2 |
Merge pull request #112 from cnlohr/poser_callbacks
Poser callbacks
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -84,6 +84,13 @@ void testprog_button_process(SurviveObject * so, uint8_t eventType, uint8_t butt } } +void testprog_lighthouse_process(SurviveContext *ctx, uint8_t lighthouse, SurvivePose *pose) { + survive_default_lighthouse_pose_process(ctx, lighthouse, pose); + + printf("Lighthouse: [%1.1x][% 08.8f,% 08.8f,% 08.8f] [% 08.8f,% 08.8f,% 08.8f,% 08.8f]\n", lighthouse, pose->Pos[0], + pose->Pos[1], pose->Pos[2], pose->Rot[0], pose->Rot[1], pose->Rot[2], pose->Rot[3]); +} + void testprog_raw_pose_process(SurviveObject *so, uint8_t lighthouse, SurvivePose *pose) { survive_default_raw_pose_process(so, lighthouse, pose); @@ -139,6 +146,7 @@ int main() survive_install_button_fn(ctx, testprog_button_process); survive_install_raw_pose_fn(ctx, testprog_raw_pose_process); survive_install_imu_fn(ctx, testprog_imu_process); + survive_install_lighthouse_pose_fn(ctx, testprog_lighthouse_process); if( !ctx ) { |