Rev 2103 | Rev 2105 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2103 | Rev 2104 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | * They are exported in the analog.h file - but please do not use them! The only |
30 | * They are exported in the analog.h file - but please do not use them! The only |
31 | * reason for the export is that the ENC-03_FC1.3 modules needs them for calibrating |
31 | * reason for the export is that the ENC-03_FC1.3 modules needs them for calibrating |
32 | * the offsets with the DAC. |
32 | * the offsets with the DAC. |
33 | */ |
33 | */ |
34 | volatile uint16_t sensorInputs[8]; |
34 | volatile uint16_t sensorInputs[8]; |
35 | //int16_t acc[3]; |
- | |
36 | //int16_t filteredAcc[3] = { 0,0,0 }; |
- | |
- | 35 | ||
Line 37... | Line 36... | ||
37 | 36 | ||
38 | /* |
37 | /* |
39 | * These 4 exported variables are zero-offset. The "PID" ones are used |
38 | * These 4 exported variables are zero-offset. The "PID" ones are used |
40 | * in the attitude control as rotation rates. The "ATT" ones are for |
39 | * in the attitude control as rotation rates. The "ATT" ones are for |
Line 43... | Line 42... | ||
43 | int16_t gyro_PID[3]; |
42 | int16_t gyro_PID[3]; |
44 | int16_t gyro_ATT[3]; |
43 | int16_t gyro_ATT[3]; |
45 | int16_t gyroD[3]; |
44 | int16_t gyroD[3]; |
46 | int16_t gyroDWindow[3][GYRO_D_WINDOW_LENGTH]; |
45 | int16_t gyroDWindow[3][GYRO_D_WINDOW_LENGTH]; |
47 | uint8_t gyroDWindowIdx = 0; |
46 | uint8_t gyroDWindowIdx = 0; |
48 | //int16_t dHeight; |
- | |
49 | //uint32_t gyroActivity; |
- | |
Line 50... | Line 47... | ||
50 | 47 | ||
51 | /* |
48 | /* |
52 | * Offset values. These are the raw gyro and acc. meter sums when the copter is |
49 | * Offset values. These are the raw gyro and acc. meter sums when the copter is |
53 | * standing still. They are used for adjusting the gyro and acc. meter values |
50 | * standing still. They are used for adjusting the gyro and acc. meter values |
54 | * to be centered on zero. |
51 | * to be centered on zero. |
55 | */ |
- | |
56 | 52 | */ |
|
57 | sensorOffset_t gyroOffset; |
- | |
58 | sensorOffset_t accOffset; |
- | |
Line 59... | Line 53... | ||
59 | sensorOffset_t gyroAmplifierOffset; |
53 | sensorOffset_t gyroOffset; |
60 | 54 | ||
61 | /* |
55 | /* |
62 | * In the MK coordinate system, nose-down is positive and left-roll is positive. |
56 | * In the MK coordinate system, nose-down is positive and left-roll is positive. |
Line 122... | Line 116... | ||
122 | /* |
116 | /* |
123 | * Battery voltage, in units of: 1k/11k / 3V * 1024 = 31.03 per volt. |
117 | * Battery voltage, in units of: 1k/11k / 3V * 1024 = 31.03 per volt. |
124 | * That is divided by 3 below, for a final 10.34 per volt. |
118 | * That is divided by 3 below, for a final 10.34 per volt. |
125 | * So the initial value of 100 is for 9.7 volts. |
119 | * So the initial value of 100 is for 9.7 volts. |
126 | */ |
120 | */ |
127 | int16_t UBat = 100; |
121 | uint16_t UBat = 100; |
- | 122 | uint16_t airspeed = 0; |
|
Line 128... | Line 123... | ||
128 | 123 | ||
129 | /* |
124 | /* |
130 | * Control and status. |
125 | * Control and status. |
131 | */ |
126 | */ |