Merge pull request #38 from DTFUHF/master

Enable gimbal_flags servo passthrough in airplane mode and other mixer modes that use servos
This commit is contained in:
dongie 2014-01-23 15:41:12 -08:00
commit cc2a6f502e
1 changed files with 5 additions and 1 deletions

View File

@ -471,7 +471,11 @@ void mixTable(void)
// forward AUX1-4 to servo outputs (not constrained)
if (cfg.gimbal_flags & GIMBAL_FORWARDAUX) {
int offset = 0;
if (feature(FEATURE_SERVO_TILT))
// offset servos based off number already used in mixer types
// airplane and servo_tilt together can't be used
if (mcfg.mixerConfiguration == MULTITYPE_AIRPLANE || mcfg.mixerConfiguration == MULTITYPE_FLYING_WING)
offset = 4;
else if (mixers[mcfg.mixerConfiguration].useServo)
offset = 2;
for (i = 0; i < 4; i++)
pwmWriteServo(i + offset, rcData[AUX1 + i]);