From c36b220308c08147a6c995fbb6082aa5ab0a0a21 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Thu, 15 Dec 2016 22:36:16 -0500 Subject: Get working plane tester --- test.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test.c') diff --git a/test.c b/test.c index 5eff185..1f6778a 100644 --- a/test.c +++ b/test.c @@ -7,6 +7,7 @@ #include #include +struct SurviveContext * ctx; void survivefault( struct SurviveContext * ctx, const char * fault ) { @@ -22,6 +23,16 @@ void survivenote( struct SurviveContext * ctx, const char * fault ) void HandleKey( int keycode, int bDown ) { + if( !bDown ) return; + + if( keycode == 'O' || keycode == 'o' ) + { + survive_usb_send_magic(ctx,1); + } + if( keycode == 'F' || keycode == 'f' ) + { + survive_usb_send_magic(ctx,0); + } } void HandleButton( int x, int y, int button, int bDown ) @@ -91,7 +102,7 @@ int main() printf( "%02x ", output[i] ); } return 0;*/ - struct SurviveContext * ctx = survive_init( &survivefault, &survivenote ); + ctx = survive_init( &survivefault, &survivenote ); CNFGBGColor = 0x000000; CNFGDialogColor = 0x444444; -- cgit v1.2.3