OSDN Git Service

Add errno includes
[android-x86/hardware-intel-libsensors.git] / calibration.h
index d353d43..2d17e7a 100644 (file)
@@ -1,6 +1,18 @@
 /*
- * Copyright (C) 2014-2015 Intel Corporation.
- */
+// Copyright (c) 2015 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
 
 #ifndef __CALIBRATION_H__
 #define __CALIBRATION_H__
@@ -39,7 +51,7 @@ gyro_cal_t;
 /* Accelerometer bias estimation and compensation */
 
 #define BUCKET_COUNT 3
-#define BUCKET_TOLERANCE 1     /* Maximum monitoring distance from value of interest, in m/s² */
+#define BUCKET_TOLERANCE 2.5   /* Maximum monitoring distance from value of interest, in m/s² */
 #define SLICES 100                 /* We currently have 3 buckets per axis, and 100 slices per bucket ; then we distribute incoming samples among slices */
 
 typedef struct
@@ -65,13 +77,13 @@ accel_cal_t;
 typedef double mat_input_t[MAGN_DS_SIZE][3];
 
 
-void calibrate_compass  (sensors_event_t* event, sensor_info_t* info);
-void compass_read_data  (sensor_info_t* info);
-void compass_store_data (sensor_info_t* info);
+void calibrate_compass  (int s, sensors_event_t* event);
+void compass_read_data  (int s);
+void compass_store_data (int s);
 
-void calibrate_gyro     (sensors_event_t* event, sensor_info_t* info);
-void gyro_cal_init      (sensor_info_t* info);
-void gyro_store_data    (sensor_info_t* info);
+void calibrate_gyro     (int s, sensors_event_t* event);
+void gyro_cal_init      (int s);
+void gyro_store_data    (int s);
 
 void calibrate_accel    (int s, sensors_event_t* event);
 void accel_cal_init     (int s);