Skip to content

Conversation

rubenp02
Copy link
Contributor

Fix "Change Airspeed" guided action

Description

This PR restores the "Change Airspeed" Guided mode action for ArduPilot fixed-wing aircraft, which was inadvertently disabled due to changes in ArduPilot's parameter names. Additionally, it updates the airspeed slider's default value to the current airspeed, for consistency with the "Change Altitude" action.

Support new APM airspeed limits parameter names:

Added support for updated maximum and minimum airspeed parameter names in ArduPilot. This restores the "Change Airspeed" Guided mode action. Compatibility with the previous parameter names has been maintained.

Set airspeed slider default to current airspeed:

Made the default value of the airspeed slider in the "Change Airspeed" Guided mode action match the current airspeed, to match the behavior of the "Change Altitude" action.

Checklist:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rubenp02 rubenp02 force-pushed the bugfix/fix-change-airspeed-action branch from d6e57df to 33f421f Compare February 25, 2025 07:38
@DonLakeFlyer
Copy link
Contributor

So this happens so often, mostly with ArduPilot that QGC has a system to remap parameters names based on version. That way the main code can stay the same once updated to support remapping. You can see the remapping here in ArduCopter: https://github.com/mavlink/qgroundcontrol/blob/master/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc#L109. Then you use r.FOO for parameter names. For example: https://github.com/mavlink/qgroundcontrol/blob/master/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc#L109. ParameterManager always calls: FirmwarePlugin::paramNameRemapMajorVersionMap(void) const; in order to map r.FOO parameter names.

@rubenp02
Copy link
Contributor Author

Sounds good, will update this to use that.

@rubenp02 rubenp02 marked this pull request as draft March 2, 2025 16:15
Copy link
Contributor

@DonLakeFlyer DonLakeFlyer left a comment

Choose a reason for hiding this comment

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

Waiting on changes

Updated maximum and minimum airspeed parameter names in ArduPlane. This
restores the "Change Airspeed" Guided mode action. Compatibility with
the previous parameter names has been maintained.
Made the default value of the airspeed slider in the "Change Airspeed"
Guided mode action match the current airspeed, to match the behavior of
the "Change Altitude" action.
@rubenp02 rubenp02 force-pushed the bugfix/fix-change-airspeed-action branch from 33f421f to 581a1dc Compare March 14, 2025 20:52
@rubenp02 rubenp02 requested a review from DonLakeFlyer March 14, 2025 20:54
@rubenp02 rubenp02 marked this pull request as ready for review March 14, 2025 20:54
@DonLakeFlyer DonLakeFlyer merged commit 224794d into mavlink:master Mar 14, 2025
10 checks passed
@rubenp02 rubenp02 deleted the bugfix/fix-change-airspeed-action branch March 15, 2025 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants