From c5fc97504a9e46f0370587ae39f4b6e10615f813 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Fri, 16 Mar 2018 15:07:00 -0600 Subject: Playback now goes to a single file. Note that the file format changed too so that it always starts 'time' 'device name' --- src/survive.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/survive.c') diff --git a/src/survive.c b/src/survive.c index a27ba3e..bafacad 100755 --- a/src/survive.c +++ b/src/survive.c @@ -7,8 +7,9 @@ #include #include -#include "survive_config.h" #include "os_generic.h" +#include "survive_config.h" +#include "survive_default_devices.h" #ifdef __APPLE__ #define z_const const @@ -103,8 +104,7 @@ void survive_verify_FLT_size(uint32_t user_size) { } } -SurviveContext * survive_init_internal( int headless ) -{ +SurviveContext *survive_init_internal(int headless, htc_config_func configFunc) { #ifdef RUNTIME_SYMNUM if( !did_runtime_symnum ) { @@ -149,6 +149,7 @@ SurviveContext * survive_init_internal( int headless ) ctx->imuproc = survive_default_imu_process; ctx->angleproc = survive_default_angle_process; ctx->lighthouseposeproc = survive_default_lighthouse_pose_process; + ctx->configfunction = configFunc ? configFunc : survive_default_htc_config_process; // initialize the button queue memset(&(ctx->buttonQueue), 0, sizeof(ctx->buttonQueue)); @@ -212,6 +213,13 @@ void survive_install_info_fn( SurviveContext * ctx, text_feedback_func fbp ) ctx->notefunction = survivenote; } +void survive_install_htc_config_fn(SurviveContext *ctx, htc_config_func fbp) { + if (fbp) + ctx->configfunction = fbp; + else + ctx->configfunction = survive_default_htc_config_process; +} + void survive_install_error_fn( SurviveContext * ctx, text_feedback_func fbp ) { if( fbp ) -- cgit v1.2.3