1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Decouple throttle from min_throttle and max_throttle for altitude hold

This commit is contained in:
borisbstyle 2017-02-07 22:23:50 +01:00
parent 32f7ad829b
commit 39f3934ce3

View file

@ -93,7 +93,7 @@ static void applyMultirotorAltHold(void)
AltHold = EstAlt;
isAltHoldChanged = 0;
}
rcCommand[THROTTLE] = constrain(initialThrottleHold + altHoldThrottleAdjustment, motorConfig->minthrottle, motorConfig->maxthrottle);
rcCommand[THROTTLE] = constrain(initialThrottleHold + altHoldThrottleAdjustment, PWM_RANGE_MIN, PWM_RANGE_MAX);
}
} else {
// slow alt changes, mostly used for aerial photography
@ -107,7 +107,7 @@ static void applyMultirotorAltHold(void)
velocityControl = 0;
isAltHoldChanged = 0;
}
rcCommand[THROTTLE] = constrain(initialThrottleHold + altHoldThrottleAdjustment, motorConfig->minthrottle, motorConfig->maxthrottle);
rcCommand[THROTTLE] = constrain(initialThrottleHold + altHoldThrottleAdjustment, PWM_RANGE_MIN, PWM_RANGE_MAX);
}
}