AR_WPNav: fix pivot activation when reversing

This commit is contained in:
Randy Mackay 2022-01-05 12:44:27 +09:00
parent 6515e71fc1
commit 3d048ddcc2

View File

@ -180,7 +180,7 @@ bool AR_WPNav::set_desired_location(const struct Location& destination, Location
// or journey to previous waypoint was interrupted or navigation has just started
if (!_fast_waypoint) {
_pivot.deactivate();
_pivot.check_activation(oa_wp_bearing_cd() * 0.01);
_pivot.check_activation((_reversed ? wrap_360_cd(oa_wp_bearing_cd() + 18000) : oa_wp_bearing_cd()) * 0.01);
}
// convert origin and destination to offset from EKF origin