mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1022 reset velocity when changing flight mode
This commit is contained in:
parent
7138faf167
commit
8c70e64544
@ -860,6 +860,7 @@ static void altitudeHoldDesired(ManualControlCommandData *cmd, bool changed)
|
||||
// After not being in this mode for a while init at current height
|
||||
AltHoldSmoothedData altHold;
|
||||
AltHoldSmoothedGet(&altHold);
|
||||
altitudeHoldDesiredData.Velocity = 0;
|
||||
altitudeHoldDesiredData.Altitude = altHold.Altitude;
|
||||
zeroed = false;
|
||||
} else if (cmd->Throttle > DEADBAND_HIGH && zeroed) {
|
||||
|
Loading…
Reference in New Issue
Block a user