Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AC_WPNav: wpnav speed param check fixed #23544

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

rmackay9
Copy link
Contributor

This is an alternative to #23220

This PR fixes an issue where RTL_SPEED = 400 but if users changed the WPNAV_SPEED parameter the vehicle would immediately change to this new speed.

This has been tested in SITL to confirm that user changes to WPNAV_SPEED will only take effect if the WPNAV_SPEED parameter value was used to initialise the vehicle's speed in the current mode. The results are slightly unintuitive in some situations though so I'm happy to discuss if people think the behaviour is odd.

  1. Fly in Auto mode, waypoint command, changes to WPNAV_SPEED take effect immediately
  2. Fly in Auto mode, RTL command, if RTL_SPEED was zero when command started meaning WPNAV_SPEED was used, changes to WPNAV_SPEED will take effect immediately. If RTL_SPEED was non-zero when command started, WPNAV_SPEED will not take effect. Changes to RTL_SPEED while vehicle is executing RTL never take effect immediately
  3. Fly in RTL mode acts just like 2 above

Below are some screenshots of SITL testing because PRs with pictures are nicer to look at.
image

@rmackay9 rmackay9 added the BUG label Apr 19, 2023
Copy link
Contributor

@lthall lthall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't something we should think of as anything more than a very temporary fix but it works.

@rmackay9 rmackay9 merged commit 8d8d11a into ArduPilot:master Apr 24, 2023
@rmackay9
Copy link
Contributor Author

I'm merging to save us some time in tomorrow's dev call because I think we've already discussed this issue enough as a team to know the direction forward.

@rmackay9 rmackay9 deleted the wpnav-speed-override-fix1 branch April 24, 2023 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants