8,10 → 8,8 |
#include <inttypes.h> |
|
#include "analog.h" |
#include "timer0.h" |
|
// For debugging only. |
#include "uart0.h" |
|
/* |
* If you have no acc. sensor or do not want to use it, remove this define. This will cause the |
* acc. sensor to be ignored at attitude calibration. |
27,7 → 25,7 |
/* |
* The frequency at which numerical integration takes place. 488 in original code. |
*/ |
#define INTEGRATION_FREQUENCY 488 |
#define INTEGRATION_FREQUENCY F_MAINLOOP |
|
/* |
* Gyro readings are divided by this before being used in attitude control. This will scale them |
59,6 → 57,7 |
FC2.0: GYRO_DEG_FACTOR_PITCHROLL = 2399 |
My InvenSense copter: GYRO_DEG_FACTOR_PITCHROLL = 1333 |
*/ |
//#define GYRO_PITCHROLL_CORRECTION GYRO_PITCHROLL_CORRECTION_should_be_overridden_with_a_-D_at_compile_time |
#define GYRO_DEG_FACTOR_PITCHROLL (uint16_t)(GYRO_RATE_FACTOR_PITCHROLL * INTEGRATION_FREQUENCY * GYRO_PITCHROLL_CORRECTION / HIRES_GYRO_INTEGRATION_FACTOR) |
#define GYRO_DEG_FACTOR_YAW (uint16_t)(GYRO_RATE_FACTOR_YAW * INTEGRATION_FREQUENCY * GYRO_YAW_CORRECTION) |
|