/***************************** FLYING WING **************************************/
if (!f.ARMED) {
servo[7] = MINCOMMAND; // Kill throttle when disarmed
} else {
servo[7] = constrain(rcCommand[THROTTLE], conf.minthrottle, MAXTHROTTLE);
}
motor[0] = servo[7];
if (f.PASSTHRU_MODE) { // do not use sensors for correction, simple 2 channel mixing
[B][COLOR="#FF0000"]servo[2] = rcCommand[YAW] * 1; // Rudder[/COLOR][/B]
servo[3] = (SERVODIR(3,1) * rcCommand[PITCH]) + (SERVODIR(3,2) * rcCommand[ROLL]);
servo[4] = (SERVODIR(4,1) * rcCommand[PITCH]) + (SERVODIR(4,2) * rcCommand[ROLL]);
} else { // use sensors to correct (gyro only or gyro+acc according to aux1/aux2 configuration
[B][COLOR="#FF0000"]servo[2] = axisPID[YAW] * 1; // Rudder[/COLOR][/B]
servo[3] = (SERVODIR(3,1) * axisPID[PITCH]) + (SERVODIR(3,2) * axisPID[ROLL]);
servo[4] = (SERVODIR(4,1) * axisPID[PITCH]) + (SERVODIR(4,2) * axisPID[ROLL]);
}
[B][COLOR="#FF0000"]servo[2] += 1500 ; // Rudder[/COLOR][/B]
servo[3] += get_middle(3);
servo[4] += get_middle(4);