16,7 → 16,6 |
* Temporarily replaced by userparam-configurable variable. |
*/ |
// #define GYROS_ATT_FILTER 1 |
|
// Temporarily replaced by userparam-configurable variable. |
// #define ACC_FILTER 4 |
|
175,12 → 174,12 |
* in filtering, and when a gyro becomes near saturated. |
* Maybe this distinction is not really necessary. |
*/ |
extern volatile int16_t gyro_PID[2]; |
extern volatile int16_t gyro_ATT[2]; |
extern volatile int16_t gyroD[2]; |
extern volatile int16_t yawGyro; |
extern int16_t gyro_PID[2]; |
extern int16_t gyro_ATT[2]; |
extern int16_t gyroD[2]; |
extern int16_t yawGyro; |
extern volatile uint16_t ADCycleCount; |
extern volatile int16_t UBat; |
extern int16_t UBat; |
|
// 1:11 voltage divider, 1024 counts per 3V, and result is divided by 3. |
#define UBAT_AT_5V (int16_t)((5.0 * (1.0/11.0)) * 1024 / (3.0 * 3)) |
192,13 → 191,13 |
/* |
* This is not really for external use - but the ENC-03 gyro modules needs it. |
*/ |
extern volatile int16_t rawGyroSum[3]; |
//extern volatile int16_t rawGyroSum[3]; |
|
/* |
* The acceleration values that this module outputs. They are zero based. |
*/ |
extern volatile int16_t acc[3]; |
extern volatile int16_t filteredAcc[3]; |
extern int16_t acc[3]; |
extern int16_t filteredAcc[3]; |
// extern volatile int32_t stronglyFilteredAcc[3]; |
|
/* |
206,8 → 205,8 |
* only really reflect the noise level when the copter stands still but with |
* its motors running. |
*/ |
extern volatile uint16_t gyroNoisePeak[3]; |
extern volatile uint16_t accNoisePeak[3]; |
extern uint16_t gyroNoisePeak[3]; |
extern uint16_t accNoisePeak[3]; |
|
/* |
* Air pressure. |
254,11 → 253,11 |
|
#define ABS_ALTITUDE_OFFSET 108205 |
|
extern volatile uint16_t simpleAirPressure; |
extern uint16_t simpleAirPressure; |
/* |
* At saturation, the filteredAirPressure may actually be (simulated) negative. |
*/ |
extern volatile int32_t filteredAirPressure; |
extern int32_t filteredAirPressure; |
|
/* |
* Flag: Interrupt handler has done all A/D conversion and processing. |
268,6 → 267,12 |
void analog_init(void); |
|
/* |
* This is really only for use for the ENC-03 code module, which needs to get the raw value |
* for its calibration. The raw value should not be used for anything else. |
*/ |
uint16_t rawGyroValue(uint8_t axis); |
|
/* |
* Start the conversion cycle. It will stop automatically. |
*/ |
void startAnalogConversionCycle(void); |