/branches/dongfang_FC_fixedwing/attitude.c |
---|
161,6 → 161,10 |
// First, perform axis coupling. If disabled xxxRate is just copied to ACxxxRate. |
uint8_t axis; |
error[PITCH] += control[CONTROL_ELEVATOR]; |
error[ROLL] += control[CONTROL_AILERONS]; |
error[YAW] += control[CONTROL_RUDDER]; |
if (staticParams.GlobalConfig & CFG_AXIS_COUPLING_ACTIVE) { |
error[PITCH] += (staticParams.ControlSigns & 1 ? rate_ATT[PITCH] : -rate_ATT[PITCH]); |
error[ROLL] += (staticParams.ControlSigns & 2 ? rate_ATT[ROLL] : -rate_ATT[ROLL]); |