8,6 → 8,7 |
#include <inttypes.h> |
|
#include "analog.h" |
#include "timer0.h" |
|
// For debugging only. |
#include "uart0.h" |
21,7 → 22,7 |
/* |
* The frequency at which numerical integration takes place. 488 in original code. |
*/ |
#define INTEGRATION_FREQUENCY 488 |
#define INTEGRATION_FREQUENCY (uint16_t)(F_MAINLOOP) |
|
/* |
* Constant for deriving an attitude angle from acceleration measurement. |
62,8 → 63,8 |
*/ |
//#define GYRO_ACC_FACTOR ((GYRO_DEG_FACTOR_PITCHROLL) / (DEG_ACC_FACTOR)) |
|
#define OVER180 ((int32_t)GYRO_DEG_FACTOR * 180) |
#define OVER360 ((int32_t)GYRO_DEG_FACTOR * 360) |
#define OVER180 ((int32_t)(GYRO_DEG_FACTOR * 180.0f)) |
#define OVER360 ((int32_t)(GYRO_DEG_FACTOR * 360.0f)) |
|
/* |
* Rotation rates |