Rev 2035 | Rev 2044 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2035 | Rev 2039 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | #include "uart0.h" |
59 | #include "uart0.h" |
60 | #include "twimaster.h" |
60 | #include "twimaster.h" |
61 | #include "attitude.h" |
61 | #include "attitude.h" |
62 | #include "controlMixer.h" |
62 | #include "controlMixer.h" |
63 | #include "commands.h" |
63 | #include "commands.h" |
64 | #ifdef USE_MK3MAG |
- | |
65 | #include "gps.h" |
- | |
66 | #endif |
- | |
Line 67... | Line 64... | ||
67 | 64 | ||
Line 68... | Line 65... | ||
68 | #define CHECK_MIN_MAX(value, min, max) {if(value < min) value = min; else if(value > max) value = max;} |
65 | #define CHECK_MIN_MAX(value, min, max) {if(value < min) value = min; else if(value > max) value = max;} |
69 | 66 | ||
Line 157... | Line 154... | ||
157 | // High resolution motor values for smoothing of PID motor outputs |
154 | // High resolution motor values for smoothing of PID motor outputs |
158 | static int16_t motorFilters[MAX_MOTORS]; |
155 | static int16_t motorFilters[MAX_MOTORS]; |
Line 159... | Line 156... | ||
159 | 156 | ||
Line 160... | Line -... | ||
160 | uint8_t i, axis; |
- | |
161 | - | ||
162 | // Fire the main flight attitude calculation, including integration of angles. |
- | |
163 | // We want that to kick as early as possible, not to delay new AD sampling further. |
- | |
164 | calculateFlightAttitude(); |
157 | uint8_t i, axis; |
Line 165... | Line 158... | ||
165 | controlMixer_update(); |
158 | |
166 | throttleTerm = controls[CONTROL_THROTTLE]; |
159 | throttleTerm = controls[CONTROL_THROTTLE]; |
167 | 160 |