mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
Do not raise THROTTLE during NAV_CTL_LAND when nose is UP
This commit is contained in:
parent
05cee111ff
commit
df619eb551
3 changed files with 14 additions and 2 deletions
|
@ -407,7 +407,16 @@ void applyFixedWingPitchRollThrottleController(navigationFSMStateFlags_t navStat
|
|||
if (isPitchAdjustmentValid && (navStateFlags & NAV_CTL_ALT)) {
|
||||
pitchCorrection += posControl.rcAdjustment[PITCH];
|
||||
throttleCorrection += DECIDEGREES_TO_DEGREES(pitchCorrection) * navConfig()->fw.pitch_to_throttle;
|
||||
throttleCorrection = constrain(throttleCorrection, minThrottleCorrection, maxThrottleCorrection);
|
||||
|
||||
if (navStateFlags & NAV_CTL_LAND) {
|
||||
/*
|
||||
* During LAND we do not allow to raise THROTTLE when nose is up
|
||||
* to reduce speed
|
||||
*/
|
||||
throttleCorrection = constrain(throttleCorrection, minThrottleCorrection, 0);
|
||||
} else {
|
||||
throttleCorrection = constrain(throttleCorrection, minThrottleCorrection, maxThrottleCorrection);
|
||||
}
|
||||
}
|
||||
|
||||
// Speed controller - only apply in POS mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue