diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-03-11 15:31:28 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-03-12 09:52:50 -0600 |
commit | 95eab1b8938e0033a0aa0d10d6ec53d7d2782907 (patch) | |
tree | e92f9abf0287fea8c91abadf8a095318507a8885 /src/survive.c | |
parent | 7fadeeff29074520224be385ecd6c50271a07220 (diff) | |
download | libsurvive-95eab1b8938e0033a0aa0d10d6ec53d7d2782907.tar.gz libsurvive-95eab1b8938e0033a0aa0d10d6ec53d7d2782907.tar.bz2 |
Added callback for lighthouse found; example in test.c
Diffstat (limited to 'src/survive.c')
-rwxr-xr-x | src/survive.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/survive.c b/src/survive.c index 5d0d35f..61bfc86 100755 --- a/src/survive.c +++ b/src/survive.c @@ -148,7 +148,7 @@ SurviveContext * survive_init_internal( int headless ) ctx->lightproc = survive_default_light_process; ctx->imuproc = survive_default_imu_process; ctx->angleproc = survive_default_angle_process; - + ctx->lighthouseposeproc = survive_default_lighthouse_pose_process; // initialize the button queue memset(&(ctx->buttonQueue), 0, sizeof(ctx->buttonQueue)); @@ -260,6 +260,14 @@ void survive_install_raw_pose_fn(SurviveContext * ctx, raw_pose_func fbp) else ctx->rawposeproc = survive_default_raw_pose_process; } + +void survive_install_lighthouse_pose_fn(SurviveContext *ctx, lighthouse_pose_func fbp) { + if (fbp) + ctx->lighthouseposeproc = fbp; + else + ctx->lighthouseposeproc = survive_default_lighthouse_pose_process; +} + int survive_add_object( SurviveContext * ctx, SurviveObject * obj ) { int oldct = ctx->objs_ct; |