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,
25 SENSOR_INDEX_RANGEFINDER
,
31 typedef struct int16_flightDynamicsTrims_s
{
35 } flightDynamicsTrims_def_t
;
37 typedef union flightDynamicsTrims_u
{
39 flightDynamicsTrims_def_t values
;
40 } flightDynamicsTrims_t
;
42 #define CALIBRATING_BARO_TIME_MS 2000
43 #define CALIBRATING_PITOT_TIME_MS 4000
44 #define CALIBRATING_GYRO_TIME_MS 2000
45 #define CALIBRATING_ACC_TIME_MS 500
46 #define CALIBRATING_GYRO_MORON_THRESHOLD 32
48 // These bits have to be aligned with sensorIndex_e
50 SENSOR_GYRO
= 1 << 0, // always present
54 SENSOR_RANGEFINDER
= 1 << 4,
55 SENSOR_PITOT
= 1 << 5,
56 SENSOR_OPFLOW
= 1 << 6,
58 SENSOR_GPSMAG
= 1 << 8,
62 extern uint8_t requestedSensors
[SENSOR_INDEX_COUNT
];
63 extern uint8_t detectedSensors
[SENSOR_INDEX_COUNT
];