Subversion Repositories FlightCtrl

Rev

Rev 1969 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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