1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

Introduced cli parameter <gyro_offset_yaw>

It allows to manually compensate gyro drift over time.
rebased squashed.
This commit is contained in:
Adrian Miriuta 2018-01-25 12:45:00 +01:00
parent b47cabffef
commit b21d681153
11 changed files with 39 additions and 32 deletions

View file

@ -40,9 +40,9 @@ extern "C" {
#define DEG2RAD 0.01745329251
static void rotateVector(int32_t mat[3][3], int32_t vec[3], int32_t *out)
static void rotateVector(int32_t mat[3][3], float vec[3], float *out)
{
int32_t tmp[3];
float tmp[3];
for(int i=0; i<3; i++) {
tmp[i] = 0;
@ -98,8 +98,8 @@ static void initZAxisRotation(int32_t mat[][3], int32_t angle)
static void testCW(sensor_align_e rotation, int32_t angle)
{
int32_t src[XYZ_AXIS_COUNT];
int32_t test[XYZ_AXIS_COUNT];
float src[XYZ_AXIS_COUNT];
float test[XYZ_AXIS_COUNT];
// unit vector along x-axis
src[X] = 1;
@ -155,8 +155,8 @@ static void testCW(sensor_align_e rotation, int32_t angle)
*/
static void testCWFlip(sensor_align_e rotation, int32_t angle)
{
int32_t src[XYZ_AXIS_COUNT];
int32_t test[XYZ_AXIS_COUNT];
float src[XYZ_AXIS_COUNT];
float test[XYZ_AXIS_COUNT];
// unit vector along x-axis
src[X] = 1;