Rev 1922 | Rev 1926 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1922 | Rev 1924 | ||
---|---|---|---|
Line 159... | Line 159... | ||
159 | 159 | ||
160 | void integrate(void) { |
160 | void integrate(void) { |
161 | // First, perform axis coupling. If disabled xxxRate is just copied to ACxxxRate. |
161 | // First, perform axis coupling. If disabled xxxRate is just copied to ACxxxRate. |
Line -... | Line 162... | ||
- | 162 | uint8_t axis; |
|
- | 163 | ||
- | 164 | error[PITCH] += control[CONTROL_ELEVATOR]; |
|
- | 165 | error[ROLL] += control[CONTROL_AILERONS]; |
|
162 | uint8_t axis; |
166 | error[YAW] += control[CONTROL_RUDDER]; |
163 | 167 | ||
164 | if (staticParams.GlobalConfig & CFG_AXIS_COUPLING_ACTIVE) { |
168 | if (staticParams.GlobalConfig & CFG_AXIS_COUPLING_ACTIVE) { |
165 | error[PITCH] += (staticParams.ControlSigns & 1 ? rate_ATT[PITCH] : -rate_ATT[PITCH]); |
169 | error[PITCH] += (staticParams.ControlSigns & 1 ? rate_ATT[PITCH] : -rate_ATT[PITCH]); |
166 | error[ROLL] += (staticParams.ControlSigns & 2 ? rate_ATT[ROLL] : -rate_ATT[ROLL]); |
170 | error[ROLL] += (staticParams.ControlSigns & 2 ? rate_ATT[ROLL] : -rate_ATT[ROLL]); |