1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 08:15:26 +03:00

Store current position as desired after braking has been finished

This commit is contained in:
Pawel Spychalski (DzikuVx) 2018-05-04 14:55:03 +02:00
parent 4400c0af0f
commit a13f749eb2
2 changed files with 8 additions and 1 deletions

View file

@ -1991,6 +1991,12 @@ static bool adjustPositionFromRCInput(void)
rcRollAdjustment
)) {
DISABLE_STATE(NAV_CRUISE_BRAKING);
/*
* When braking is done, store current position as desired one
* We do not want to go back to the place where braking has started
*/
setDesiredPosition(&posControl.actualState.pos, 0, NAV_POS_UPDATE_XY);
}
}