From 5a11716edeb85bc01c38bfc4ce174d101cac0a06 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Tue, 21 Feb 2017 01:59:08 -0500 Subject: Working on it, not quite tested. --- calibrate.c | 1 + 1 file changed, 1 insertion(+) (limited to 'calibrate.c') diff --git a/calibrate.c b/calibrate.c index 60f4316..04ea9a8 100644 --- a/calibrate.c +++ b/calibrate.c @@ -7,6 +7,7 @@ #include #include #include +#include "src/survive_cal.h" #include struct SurviveContext * ctx; -- cgit v1.2.3 From 6fe8d04961c927d22a8b91e04d30450699867817 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 25 Feb 2017 16:20:42 -0500 Subject: Update code to allow for headless mode. --- calibrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calibrate.c') diff --git a/calibrate.c b/calibrate.c index 04ea9a8..8eedc88 100644 --- a/calibrate.c +++ b/calibrate.c @@ -140,7 +140,7 @@ void * GuiThread( void * v ) int main() { - ctx = survive_init( ); + ctx = survive_init( 0 ); survive_install_light_fn( ctx, my_light_process ); survive_install_imu_fn( ctx, my_imu_process ); -- cgit v1.2.3 From 55cedfc6a6b035d6eb54457782818fef61cae500 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 25 Feb 2017 23:52:48 -0500 Subject: Huge shift: Put HTC vive into its own file, to free up the rest of the system for libsurvive. --- calibrate.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'calibrate.c') diff --git a/calibrate.c b/calibrate.c index 04ea9a8..f50bad3 100644 --- a/calibrate.c +++ b/calibrate.c @@ -18,11 +18,11 @@ void HandleKey( int keycode, int bDown ) if( keycode == 'O' || keycode == 'o' ) { - survive_usb_send_magic(ctx,1); + survive_send_magic(ctx,1,0,0); } if( keycode == 'F' || keycode == 'f' ) { - survive_usb_send_magic(ctx,0); + survive_send_magic(ctx,0,0,0); } } @@ -40,6 +40,7 @@ int buffertimeto[32*3]; void my_light_process( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length ) { +// if( timeinsweep < 0 ) return; survive_default_light_process( so, sensor_id, acode, timeinsweep, timecode, length ); if( acode == -1 ) return; @@ -95,6 +96,10 @@ void my_angle_process( struct SurviveObject * so, int sensor_id, int acode, uint void * GuiThread( void * v ) { short screenx, screeny; + CNFGBGColor = 0x000000; + CNFGDialogColor = 0x444444; + CNFGSetup( "Survive GUI Debug", 640, 480 ); + while(1) { CNFGHandleInput(); @@ -148,9 +153,6 @@ int main() survive_cal_install( ctx ); - CNFGBGColor = 0x000000; - CNFGDialogColor = 0x444444; - CNFGSetup( "Survive GUI Debug", 640, 480 ); OGCreateThread( GuiThread, 0 ); @@ -164,5 +166,6 @@ int main() { //Do stuff. } + printf( "Returned\n" ); } -- cgit v1.2.3 From e8d696e03128242be33eb0734addee645e894635 Mon Sep 17 00:00:00 2001 From: Joshua Allen Date: Mon, 27 Feb 2017 20:52:26 -0500 Subject: basic config can be written to file --- calibrate.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'calibrate.c') diff --git a/calibrate.c b/calibrate.c index 8eedc88..9c01e8a 100644 --- a/calibrate.c +++ b/calibrate.c @@ -10,6 +10,8 @@ #include "src/survive_cal.h" #include +#include "src/survive_config.h" + struct SurviveContext * ctx; void HandleKey( int keycode, int bDown ) @@ -141,6 +143,7 @@ void * GuiThread( void * v ) int main() { ctx = survive_init( 0 ); + config_init(); survive_install_light_fn( ctx, my_light_process ); survive_install_imu_fn( ctx, my_imu_process ); -- cgit v1.2.3