Subversion Repositories FlightCtrl

Rev

Rev 2021 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2021 Rev 2099
Line 1... Line 1...
1
#ifndef _SENSORS_H
1
#ifndef _SENSORS_H
2
#define _SENSORS_H
2
#define _SENSORS_H
Line 3... Line 3...
3
 
3
 
-
 
4
#include <inttypes.h>
Line 4... Line -...
4
#include <inttypes.h>
-
 
5
 
-
 
6
/*
-
 
7
 * Whether (pitch, roll, yaw) gyros are reversed (see analog.h).
-
 
8
 */
5
#include "configuration.h"
9
extern const uint8_t GYRO_QUADRANT;
-
 
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
 */
-
 
Line 16... Line 6...
16
//extern const uint8_t ACC_QUADRANT;
6
 
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.
Line 23... Line 13...
23
 * InvenSense hardware: Output a pulse on the AUTO_ZERO line.
13
 * InvenSense hardware: Output a pulse on the AUTO_ZERO line.
-
 
14
 */
-
 
15
void gyro_calibrate(void);
-
 
16
 
-
 
17
/*
-
 
18
 * FC 1.3: Output data in gyroAmplifierOffset to DAC. All other versions: Do nothing.
24
 */
19
 */
25
void gyro_calibrate(void);
20
void gyro_init(void);
26
 
21
 
Line 27... Line 22...
27
/*
22
/*