Subversion Repositories FlightCtrl

Rev

Rev 1910 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1910 - 1
#include "ADXRS610_FC2.0.h"
2
#include "configuration.h"
3
 
4
const uint8_t GYRO_QUADRANT = 3;
5
//const uint8_t ACC_QUADRANT = 0;
6
 
2025 - 7
const uint8_t YAW_GYRO_REVERSED = 0;
8
const uint8_t PR_GYROS_ORIENTATION_REVERSED = 0;
9
 
1910 - 10
const uint8_t Z_ACC_REVERSED = 0;
11
 
12
void gyro_calibrate(void) {
13
}
14
 
15
void gyro_setDefaults(void) {
16
        staticParams.DriftComp = 0;
17
        staticParams.GyroAccFactor = 1;
2025 - 18
        staticParams.GyroAccTrim = 1;
1910 - 19
}
20
 
21
/*
22
 
23
normal  1rev  2rev
24
 
25
1 0    -1 0    1  0
26
 
27
 
28
45
29
1 -1   -1 -1   1  1
30
1  1   -1  1   1 -1
31
 
32
90
33
 
34
1  0   -1  0   1  0
35
 
36
135
37
-1 -1   1 -1  -1  1
38
1  -1  -1 -1   1  1
39
 
40
180
41
-1 0    1  0   -1 0
42
 
43
 
44
225
45
-1 1    1  1   -1 -1
46
-1 -1   1 -1   -1  1
47
 
48
270
49
 
50
-1 0    1  0   -1 0
51
 
52
315
53
 1 1   -1  1   1 -1
54
-1 1    1  1  -1 -1
55
 
56
 
57
0,0: 1,1,0,-1,-1,-1,0,1 paddp = tab[n]
58
0,1: 0,-1,-1,-1,0,1,1,1 paddr = tab[n+2]
59
1,0: 0,1,1,1,0,-1,-1,-1 raddp = tab[n+6]
60
1,1: 1,1,0,-1,-1,-1,0,1 raddr = tab[n]
61
 
62
reverse:
63
0,0: -1,-1,0,1,1,1,0,-1 paddp = tab[n+4]
64
0,1: 0,-1,-1,-1,0,1,1,1 (same)= tab[n+2]
65
1,0: 0,-1,-1,-1,0,1,1,1 raddp = tab[n+2]
66
1,1: 1,1,0,-1,-1,-1,0,1 (same)= tab[n]
67
 
68
               = 1rev[n-4] = 1rev[n+4]
69
*/