aboutsummaryrefslogtreecommitdiff
path: root/calibrate_client.c
diff options
context:
space:
mode:
authorJosh Allen <axlecrusher@gmail.com>2017-02-27 21:30:44 -0500
committerJosh Allen <axlecrusher@gmail.com>2017-02-27 21:30:44 -0500
commit711a55ec79fefbefdc3527c89742acf622aaec3c (patch)
treef087cb3e592aa5cabc5c7b3d281260f4657ad671 /calibrate_client.c
parente8d696e03128242be33eb0734addee645e894635 (diff)
parent51751d4a9f407f526de2b626d44e14690fbef004 (diff)
downloadlibsurvive-711a55ec79fefbefdc3527c89742acf622aaec3c.tar.gz
libsurvive-711a55ec79fefbefdc3527c89742acf622aaec3c.tar.bz2
Merge branch 'master' of github.com:cnlohr/libsurvive
Diffstat (limited to 'calibrate_client.c')
-rw-r--r--calibrate_client.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/calibrate_client.c b/calibrate_client.c
index 897c9e0..08f0715 100644
--- a/calibrate_client.c
+++ b/calibrate_client.c
@@ -20,11 +20,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);
}
}
@@ -150,6 +150,10 @@ int main()
survive_cal_install( ctx );
+ struct SurviveObject * hmd = survive_get_so_by_name( ctx, "HMD" );
+ struct SurviveObject * wm0 = survive_get_so_by_name( ctx, "WM0" );
+ struct SurviveObject * wm1 = survive_get_so_by_name( ctx, "WM1" );
+
CNFGBGColor = 0x000000;
CNFGDialogColor = 0x444444;
CNFGSetup( "Survive GUI Debug", 640, 480 );
@@ -198,11 +202,11 @@ int main()
struct SurviveObject * so = 0;
if( strcmp( dev, "HMD" ) == 0 )
- so = &ctx->headset;
+ so = hmd;
if( strcmp( dev, "WM0" ) == 0 )
- so = &ctx->watchman[0];
+ so = wm0;
if( strcmp( dev, "WM1" ) == 0 )
- so = &ctx->watchman[1];
+ so = wm1;
if( so )
my_light_process( so, sensor_id, acode, timeinsweep, timecode, length );