Subversion Repositories FlightCtrl

Rev

Rev 1969 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1969 Rev 1971
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
#include "configuration.h"
6
 
6
 
7
/*
7
/*
8
 * Whether (pitch, roll, yaw) gyros are reversed (see analog.h).
8
 * Whether (pitch, roll, yaw) gyros are reversed (see analog.h).
9
 */
9
 */
10
extern const uint8_t GYRO_REVERSED[3];
10
extern const uint8_t GYRO_REVERSED[3];
11
 
11
 
12
/*
12
/*
13
 * Whether (pitch, roll, Z) acc. meters are reversed(see analog.h).
13
 * Whether (pitch, roll, Z) acc. meters are reversed(see analog.h).
14
 */
14
 */
15
extern const uint8_t ACC_REVERSED[3];
15
extern const uint8_t ACC_REVERSED[3];
16
extern sensorOffset_t gyroAmplifierOffset;
16
extern sensorOffset_t gyroAmplifierOffset;
17
 
17
 
18
/*
18
/*
19
 * Common procedures for all gyro types.
19
 * Common procedures for all gyro types.
20
 * FC 1.3 hardware: Searching the DAC values that return neutral readings.
20
 * FC 1.3 hardware: Searching the DAC values that return neutral readings.
21
 * FC 2.0 hardware: Nothing to do.
21
 * FC 2.0 hardware: Nothing to do.
22
 * InvenSense hardware: Output a pulse on the AUTO_ZERO line.
22
 * InvenSense hardware: Output a pulse on the AUTO_ZERO line.
23
 */
23
 */
24
void gyro_calibrate(void);
24
void gyro_calibrate(void);
25
 
25
 
26
/*
26
/*
27
 * FC 1.3: Output data in gyroAmplifierOffset to DAC. All other versions: Do nothing.
27
 * FC 1.3: Output data in gyroAmplifierOffset to DAC. All other versions: Do nothing.
28
 */
28
 */
29
void gyro_loadOffsets(uint8_t overwriteWithDefaults);
29
void gyro_loadAmplifierOffsets(uint8_t overwriteWithDefaults);
30
 
30
 
31
/*
31
/*
32
 * Set some default FC parameters, depending on gyro type: Drift correction etc.
32
 * Set some default FC parameters, depending on gyro type: Drift correction etc.
33
 */
33
 */
34
void gyro_setDefaults(void);
34
void gyro_setDefaultParameters(void);
35
 
35
 
36
#endif
36
#endif
37
 
37