aboutsummaryrefslogtreecommitdiff
path: root/calibrate_client.c
diff options
context:
space:
mode:
authorultramn <dchapm2@umbc.edu>2017-03-08 21:03:46 -0800
committerultramn <dchapm2@umbc.edu>2017-03-08 21:03:46 -0800
commit91598e1806efce519d76c667954fd4c8da74e82e (patch)
treecd68d7b3f20b3ca09881b418f92cc06e65d906c6 /calibrate_client.c
parent3fa72f4b765457ce369d1aa1495dc36c90a94ebf (diff)
parent5629fd458d1de11f604248422473291e434c289f (diff)
downloadlibsurvive-91598e1806efce519d76c667954fd4c8da74e82e.tar.gz
libsurvive-91598e1806efce519d76c667954fd4c8da74e82e.tar.bz2
Merge branch 'master' of https://github.com/cnlohr/libsurvive
Diffstat (limited to 'calibrate_client.c')
-rw-r--r--calibrate_client.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/calibrate_client.c b/calibrate_client.c
index 08f0715..f28520b 100644
--- a/calibrate_client.c
+++ b/calibrate_client.c
@@ -75,15 +75,14 @@ void my_light_process( struct SurviveObject * so, int sensor_id, int acode, int
}
}
-void my_imu_process( struct SurviveObject * so, int16_t * accelgyro, uint32_t timecode, int id )
+void my_imu_process( struct SurviveObject * so, int mask, FLT * accelgyro, uint32_t timecode, int id )
{
- survive_default_imu_process( so, accelgyro, timecode, id );
+ survive_default_imu_process( so, mask, accelgyro, timecode, id );
-return;
//if( so->codename[0] == 'H' )
- if( 1 )
+ if( 0 )
{
- printf( "I %s %d %d %d %d %d %d %d %d\n", so->codename, timecode, accelgyro[0], accelgyro[1], accelgyro[2], accelgyro[3], accelgyro[4], accelgyro[5], id );
+ printf( "I %s %d %f %f %f %f %f %f %d\n", so->codename, timecode, accelgyro[0], accelgyro[1], accelgyro[2], accelgyro[3], accelgyro[4], accelgyro[5], id );
}
}
@@ -142,6 +141,23 @@ void * GuiThread( void * v )
int main()
{
+/*
+ config_init();
+ config_read("config.json");
+ config_set_str(&global_config_values, "Hello","World!");
+ const char *s = config_read_str(&global_config_values, "test123","default");
+ printf("%s\n", s);
+
+ FLT *f;
+
+ uint16_t fs = config_read_float_array(lh_config+1, "fcalgibpha", &f, NULL, 0);
+ printf("%d\n", fs);
+ printf("===> %f %f\n", f[0], f[1]);
+
+
+// config_save("config.json");
+*/
+
ctx = survive_init( 1 );
survive_install_light_fn( ctx, my_light_process );
@@ -159,13 +175,6 @@ int main()
CNFGSetup( "Survive GUI Debug", 640, 480 );
OGCreateThread( GuiThread, 0 );
- config_init();
- config_set_str(&global_config_values, "Hello","World!");
- const char *s = config_read_str(&global_config_values, "TestStr","This is a test.");
- printf("%s\n", s);
- config_save("config.json");
-
-
if( !ctx )
{
fprintf( stderr, "Fatal. Could not start\n" );