Rev 2021 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2021 | Rev 2099 | ||
---|---|---|---|
1 | #ifndef _SENSORS_H |
1 | #ifndef _SENSORS_H |
2 | #define _SENSORS_H |
2 | #define _SENSORS_H |
3 | 3 | ||
4 | #include <inttypes.h> |
4 | #include <inttypes.h> |
- | 5 | #include "configuration.h" |
|
5 | - | ||
6 | /* |
- | |
7 | * Whether (pitch, roll, yaw) gyros are reversed (see analog.h). |
- | |
8 | */ |
- | |
9 | extern const uint8_t GYRO_QUADRANT; |
6 | |
10 | extern const uint8_t YAW_GYRO_REVERSED; |
- | |
11 | extern const uint8_t PR_GYROS_ORIENTATION_REVERSED; |
- | |
12 | - | ||
13 | /* |
- | |
14 | * Whether (pitch, roll, Z) acc. meters are reversed(see analog.h). |
- | |
15 | */ |
- | |
16 | //extern const uint8_t ACC_QUADRANT; |
- | |
17 | extern const uint8_t Z_ACC_REVERSED; |
7 | extern sensorOffset_t gyroAmplifierOffset; |
18 | 8 | ||
19 | /* |
9 | /* |
20 | * Common procedures for all gyro types. |
10 | * Common procedures for all gyro types. |
21 | * FC 1.3 hardware: Searching the DAC values that return neutral readings. |
11 | * FC 1.3 hardware: Searching the DAC values that return neutral readings. |
22 | * FC 2.0 hardware: Nothing to do. |
12 | * FC 2.0 hardware: Nothing to do. |
23 | * InvenSense hardware: Output a pulse on the AUTO_ZERO line. |
13 | * InvenSense hardware: Output a pulse on the AUTO_ZERO line. |
24 | */ |
14 | */ |
25 | void gyro_calibrate(void); |
15 | void gyro_calibrate(void); |
26 | 16 | ||
27 | /* |
17 | /* |
- | 18 | * FC 1.3: Output data in gyroAmplifierOffset to DAC. All other versions: Do nothing. |
|
- | 19 | */ |
|
- | 20 | void gyro_init(void); |
|
- | 21 | ||
- | 22 | /* |
|
28 | * Set some default FC parameters, depending on gyro type: Drift correction etc. |
23 | * Set some default FC parameters, depending on gyro type: Drift correction etc. |
29 | */ |
24 | */ |
30 | void gyro_setDefaults(void); |
25 | void gyro_setDefaultParameters(void); |
31 | 26 | ||
32 | #endif |
27 | #endif |
33 | 28 |