aboutsummaryrefslogtreecommitdiff
path: root/calibrate_client.c
diff options
context:
space:
mode:
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" );