Subversion Repositories FlightCtrl

Rev

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

#ifndef _SENSORS_H
#define _SENSORS_H

#include <inttypes.h>

/*
 * Whether (pitch, roll, yaw) gyros are reversed (see analog.h).
 */

extern const uint8_t GYRO_QUADRANT;
extern const uint8_t YAW_REVERSED;

/*
 * Whether (pitch, roll, Z) acc. meters are reversed(see analog.h).
 */

//extern const uint8_t ACC_QUADRANT;

/*
 * 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,
 * change signs for the individual pitch and roll gyros in GYRO_REVERSED. All 4 combinations on FC installation with a side facing forward
 * are possible.
 */

extern const uint8_t GYROS_REVERSED;
extern const uint8_t Z_ACC_REVERSED;

/*
 * Common procedures for all gyro types.
 * FC 1.3 hardware: Searching the DAC values that return neutral readings.
 * FC 2.0 hardware: Nothing to do.
 * InvenSense hardware: Output a pulse on the AUTO_ZERO line.
 */

void gyro_calibrate(void);

/*
 * Set some default FC parameters, depending on gyro type: Drift correction etc.
 */

void gyro_setDefaults(void);

#endif