X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=calibration.h;h=2d17e7a113a2ad0c274f0fb688b46d80b03696af;hb=cda77fa4f1de5197c40d1845a382f9abaa4818a4;hp=d353d437d023be190c4400dc61b4716e82e59af0;hpb=44c2da6de1f402139998151efb13cdcc9327075f;p=android-x86%2Fhardware-intel-libsensors.git diff --git a/calibration.h b/calibration.h index d353d43..2d17e7a 100644 --- a/calibration.h +++ b/calibration.h @@ -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);