OSDN Git Service

Move defines to appropriate c files
[android-x86/hardware-intel-libsensors.git] / calibration.h
index 6cae977..4fb160d 100644 (file)
@@ -7,23 +7,7 @@
 
 #include "common.h"
 
-/* compass defines */
-#define COMPASS_CALIBRATION_PATH "/data/compass.conf"
-#define DS_SIZE 32
-#define EPSILON 0.000000001
-
-#define MAGNETIC_LOW 960 /* 31 micro tesla squared */
-#define MAGNETIC_HIGH 3600 /* 60 micro tesla squared */
-
-#ifdef DBG_RAW_DATA
-#define RAW_DATA_FULL_PATH "/data/raw_compass_data_full_%d.txt"
-#define RAW_DATA_SELECTED_PATH "/data/raw_compass_data_selected_%d.txt"
-#endif
-
-/* gyro defines */
-#define GYRO_MAX_ERR 0.05f
-#define GYRO_DS_SIZE 100
-#define GYRO_CALIBRATION_PATH "/data/gyro.conf"
+#define MAGN_DS_SIZE 32
 
 struct compass_cal {
     /* hard iron offsets */
@@ -36,7 +20,7 @@ struct compass_cal {
     double bfield;
 
     /* selection data */
-    float sample[DS_SIZE][3];
+    float sample[MAGN_DS_SIZE][3];
     unsigned int sample_count;
 };
 
@@ -47,9 +31,9 @@ struct gyro_cal {
     float max_x, max_y, max_z;
 };
 
-typedef double mat_input_t[DS_SIZE][3];
+typedef double mat_input_t[MAGN_DS_SIZE][3];
 
-void calibrate_compass (struct sensors_event_t* event, struct sensor_info_t* info, int64_t time);
+void calibrate_compass (struct sensors_event_t* event, struct sensor_info_t* info);
 void compass_read_data (struct sensor_info_t* info);
 void compass_store_data (struct sensor_info_t* info);