Subversion Repositories FlightCtrl

Rev

Rev 2021 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1910 - 1
#ifndef _SENSORS_H
2
#define _SENSORS_H
3
 
4
#include <inttypes.h>
5
 
6
/*
7
 * Whether (pitch, roll, yaw) gyros are reversed (see analog.h).
8
 */
9
extern const uint8_t GYRO_QUADRANT;
10
extern const uint8_t YAW_REVERSED;
11
 
12
/*
13
 * Whether (pitch, roll, Z) acc. meters are reversed(see analog.h).
14
 */
15
//extern const uint8_t ACC_QUADRANT;
16
 
17
/*
18
 * Whether the FC is installed 45 degs turned. If<>0, then pitch'<-pitch+roll and roll'<-roll-pitch. If the signs are not right for you,
19
 * change signs for the individual pitch and roll gyros in GYRO_REVERSED. All 4 combinations on FC installation with a side facing forward
20
 * are possible.
21
 */
22
extern const uint8_t GYROS_REVERSED;
23
extern const uint8_t Z_ACC_REVERSED;
24
 
25
/*
26
 * Common procedures for all gyro types.
27
 * FC 1.3 hardware: Searching the DAC values that return neutral readings.
28
 * FC 2.0 hardware: Nothing to do.
29
 * InvenSense hardware: Output a pulse on the AUTO_ZERO line.
30
 */
31
void gyro_calibrate(void);
32
 
33
/*
34
 * Set some default FC parameters, depending on gyro type: Drift correction etc.
35
 */
36
void gyro_setDefaults(void);
37
 
38
#endif