mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Merge remote-tracking branch 'upstream/master' into lowpass
This commit is contained in:
commit
4f0af41e79
122 changed files with 5252 additions and 1649 deletions
|
@ -490,14 +490,14 @@ static void airplaneMixer(void)
|
|||
int16_t lFlap = determineServoMiddleOrForwardFromChannel(2);
|
||||
|
||||
lFlap = constrain(lFlap, servoConf[2].min, servoConf[2].max);
|
||||
lFlap = rxConfig->midrc - lFlap;
|
||||
lFlap = escAndServoConfig->servoCenterPulse - lFlap;
|
||||
if (slow_LFlaps < lFlap)
|
||||
slow_LFlaps += airplaneConfig->flaps_speed;
|
||||
else if (slow_LFlaps > lFlap)
|
||||
slow_LFlaps -= airplaneConfig->flaps_speed;
|
||||
|
||||
servo[2] = ((int32_t)servoConf[2].rate * slow_LFlaps) / 100L;
|
||||
servo[2] += rxConfig->midrc;
|
||||
servo[2] += escAndServoConfig->servoCenterPulse;
|
||||
}
|
||||
|
||||
if (FLIGHT_MODE(PASSTHRU_MODE)) { // Direct passthru from RX
|
||||
|
@ -531,7 +531,7 @@ void mixTable(void)
|
|||
|
||||
if (motorCount > 3) {
|
||||
// prevent "yaw jump" during yaw correction
|
||||
axisPID[YAW] = constrain(axisPID[YAW], -100 - abs(rcCommand[YAW]), +100 + abs(rcCommand[YAW]));
|
||||
axisPID[YAW] = constrain(axisPID[YAW], -100 - ABS(rcCommand[YAW]), +100 + ABS(rcCommand[YAW]));
|
||||
}
|
||||
|
||||
// motors for non-servo mixes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue