Rev 1775 | Rev 1805 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1775 | Rev 1796 | ||
---|---|---|---|
Line 173... | Line 173... | ||
173 | // High resolution motor values for smoothing of PID motor outputs |
173 | // High resolution motor values for smoothing of PID motor outputs |
174 | static int16_t motorFilters[MAX_MOTORS]; |
174 | static int16_t motorFilters[MAX_MOTORS]; |
Line 175... | Line 175... | ||
175 | 175 | ||
Line 176... | Line 176... | ||
176 | uint8_t i, axis; |
176 | uint8_t i, axis; |
Line -... | Line 177... | ||
- | 177 | ||
177 | 178 | controlMixer_update(); |
|
Line 178... | Line -... | ||
178 | // Fire the main flight attitude calculation, including integration of angles. |
- | |
179 | - | ||
180 | calculateFlightAttitude(); |
- | |
181 | - | ||
182 | /* |
- | |
183 | * TODO: update should: Set the stick variables if good signal, set them to zero if bad. |
- | |
184 | * Set variables also. |
- | |
185 | */ |
- | |
186 | // start part 1: 750-800 usec. |
- | |
187 | // start part 1a: 750-800 usec. |
- | |
188 | // start part1b: 700 usec |
- | |
189 | // start part1c: 700 usec!!!!!!!!! WAY too slow. |
179 | |
190 | controlMixer_update(); |
180 | // Fire the main flight attitude calculation, including integration of angles. |
191 | // end part1c |
181 | calculateFlightAttitude(); |
192 | 182 | ||
Line 193... | Line -... | ||
193 | throttleTerm = controlThrottle; |
- | |
194 | // This check removed. Is done on a per-motor basis, after output matrix multiplication. |
183 | throttleTerm = controlThrottle; |
195 | // if(throttleTerm < staticParams.MinThrottle + 10) throttleTerm = staticParams.MinThrottle + 10; |
184 | // This check removed. Is done on a per-motor basis, after output matrix multiplication. |
196 | // else if(throttleTerm > staticParams.MaxThrottle - 20) throttleTerm = (staticParams.MaxThrottle - 20); |
185 | // if(throttleTerm < staticParams.MinThrottle + 10) throttleTerm = staticParams.MinThrottle + 10; |
197 | 186 | // else if(throttleTerm > staticParams.MaxThrottle - 20) throttleTerm = (staticParams.MaxThrottle - 20); |
|
198 | // end part1b: 700 usec. |
187 | |
Line 465... | Line 454... | ||
465 | DebugOut.Analog[23] = (yawRate * 2 * (int32_t)yawPFactor) / (256L / CONTROL_SCALING); |
454 | DebugOut.Analog[23] = (yawRate * 2 * (int32_t)yawPFactor) / (256L / CONTROL_SCALING); |
466 | DebugOut.Analog[24] = controlYaw; |
455 | DebugOut.Analog[24] = controlYaw; |
467 | DebugOut.Analog[25] = yawAngleDiff / 100L; |
456 | DebugOut.Analog[25] = yawAngleDiff / 100L; |
468 | DebugOut.Analog[26] = accNoisePeak[PITCH]; |
457 | DebugOut.Analog[26] = accNoisePeak[PITCH]; |
469 | DebugOut.Analog[27] = accNoisePeak[ROLL]; |
458 | DebugOut.Analog[27] = accNoisePeak[ROLL]; |
470 | */ |
- | |
471 | - | ||
472 | DebugOut.Analog[30] = gyroNoisePeak[PITCH]; |
459 | DebugOut.Analog[30] = gyroNoisePeak[PITCH]; |
473 | DebugOut.Analog[31] = gyroNoisePeak[ROLL]; |
460 | DebugOut.Analog[31] = gyroNoisePeak[ROLL]; |
- | 461 | */ |
|
474 | } |
462 | } |
475 | } |
463 | } |