/branches/dongfang_FC_rewrite/flight.c |
---|
197,7 → 197,7 |
// In HH mode, the I part is summed from P and D of gyros minus stick. |
if (gyroIFactor) { |
int16_t iDiff = attitude[axis] * gyroIFactor / (GYRO_DEG_FACTOR_PITCHROLL << 2); |
if (axis == 0) debugOut.analog[28] = iDiff; |
//if (axis == 0) debugOut.analog[28] = iDiff; |
PDPart += iDiff; |
IPart[axis] += iDiff - controls[axis]; // With gyroIFactor == 0, PDPart is really just a D-part. Integrate D-part (the rot. rate) and the stick pos. |
} else { |