aboutsummaryrefslogtreecommitdiff
path: root/calibrate.c
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-02-27 11:26:05 -0700
committermwturvey <michael.w.turvey@intel.com>2017-02-27 11:26:05 -0700
commit321749a4b8e3e8b3f4b03863200fbf86e36a0bbe (patch)
treeb7d81c89b3a4ccb72d46e5194929b47df88345b7 /calibrate.c
parentd1a02d649c034f43a11548a04d8d2a58786ff8ff (diff)
parent51751d4a9f407f526de2b626d44e14690fbef004 (diff)
downloadlibsurvive-321749a4b8e3e8b3f4b03863200fbf86e36a0bbe.tar.gz
libsurvive-321749a4b8e3e8b3f4b03863200fbf86e36a0bbe.tar.bz2
Merge branch 'master' of https://github.com/cnlohr/libsurvive
Diffstat (limited to 'calibrate.c')
-rw-r--r--calibrate.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/calibrate.c b/calibrate.c
index 04ea9a8..a1e150b 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();
@@ -140,7 +145,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 );
@@ -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" );
}