2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
21 SENSOR_INDEX_GYRO
= 0,
27 #define MAX_SENSORS_TO_DETECT (SENSOR_INDEX_MAG + 1)
29 extern uint8_t detectedSensors
[MAX_SENSORS_TO_DETECT
];
31 typedef struct int16_flightDynamicsTrims_s
{
35 } flightDynamicsTrims_def_t
;
39 flightDynamicsTrims_def_t values
;
40 } flightDynamicsTrims_t
;
42 #define CALIBRATING_GYRO_CYCLES 1000
43 #define CALIBRATING_ACC_CYCLES 400
44 #define CALIBRATING_BARO_CYCLES 200 // 10 seconds init_delay + 200 * 25 ms = 15 seconds before ground pressure settles
47 SENSOR_GYRO
= 1 << 0, // always present
51 SENSOR_SONAR
= 1 << 4,
56 ALIGN_DEFAULT
= 0, // driver-provided alignment
67 typedef struct sensorAlignmentConfig_s
{
68 sensor_align_e gyro_align
; // gyro alignment
69 sensor_align_e acc_align
; // acc alignment
70 sensor_align_e mag_align
; // mag alignment
71 } sensorAlignmentConfig_t
;