Subversion Repositories FlightCtrl

Rev

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

#include "ADXRS610_FC2.0.h"
#include "configuration.h"

const uint8_t GYRO_QUADRANT = 3;
//const uint8_t ACC_QUADRANT = 0;
const uint8_t YAW_REVERSED = 0;
const uint8_t GYROS_REVERSED = 0;

const uint8_t Z_ACC_REVERSED = 0;

void gyro_calibrate(void) {
}

void gyro_setDefaults(void) {
        staticParams.DriftComp = 0;
        staticParams.GyroAccFactor = 1;
        staticParams.GyroAccTrim = 0;
}

/*

normal  1rev  2rev
0
1 0    -1 0    1  0
0 1     0 1    0 -1

45
1 -1   -1 -1   1  1
1  1   -1  1   1 -1

90
0 -1    0 -1   0  1
1  0   -1  0   1  0

135
-1 -1   1 -1  -1  1
1  -1  -1 -1   1  1

180
-1 0    1  0   -1 0
0 -1    0 -1   0  1

225
-1 1    1  1   -1 -1
-1 -1   1 -1   -1  1

270
0  1    0  1   0 -1
-1 0    1  0   -1 0

315
 1 1   -1  1   1 -1
-1 1    1  1  -1 -1


0,0: 1,1,0,-1,-1,-1,0,1 paddp = tab[n]
0,1: 0,-1,-1,-1,0,1,1,1 paddr = tab[n+2]
1,0: 0,1,1,1,0,-1,-1,-1 raddp = tab[n+6]
1,1: 1,1,0,-1,-1,-1,0,1 raddr = tab[n]

reverse:
0,0: -1,-1,0,1,1,1,0,-1 paddp = tab[n+4]
0,1: 0,-1,-1,-1,0,1,1,1 (same)= tab[n+2]
1,0: 0,-1,-1,-1,0,1,1,1 raddp = tab[n+2]
1,1: 1,1,0,-1,-1,-1,0,1 (same)= tab[n]

               = 1rev[n-4] = 1rev[n+4]
*/