Skip to content

Conversation

@Maarrk
Copy link
Contributor

@Maarrk Maarrk commented Nov 25, 2025

Description

Use the correct RTL_ALTITUDE parameter for ArduPlane > 4.5.

Reuses logic introduced to other QML files referencing ALT_HOLD_RTL.
It was originally done in 2db7285 PR #12195, but this file wasn't changed then.

Test Steps

  1. Connect ArduPlane 4.6 or newer
  2. Open QGC logo -> Vehicle Configuration -> Safety
  3. Set "Return at specified altitude:" to some positive value
  4. Open Summary tab
  5. Check the value in "RTL min alt:" row - should be the same as set in step 3, but is missing without this fix

Checklist:

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

Contribution on behalf of @FlyfocusUAV

@DonLakeFlyer
Copy link
Contributor

So in looking at this, both this change and #12195 were not done correctly. They should be using the built in FirmwarePlugin::paramNameRemapMajorVersionMap functionality to provide parameter name remapping between versions. This way the qml code only needs to be updated once to use the "r.FOO" variants of parameter names and then the FirmwarePlugin will switch to the right parameter name based on firmware version.

@Maarrk
Copy link
Contributor Author

Maarrk commented Nov 25, 2025

Thanks @DonLakeFlyer! I'll update this and have a look for other spots where this should be changed.

@Maarrk Maarrk marked this pull request as draft November 25, 2025 19:42
@DonLakeFlyer
Copy link
Contributor

I'll update this and have a look for other spots where this should be changed.

Awesome, thanks so much

@Maarrk
Copy link
Contributor Author

Maarrk commented Dec 5, 2025

I had a look through 4.5 release notes and searched the codebase for any usage of renamed parameters, only ALT_HOLD_RTL and ARSPD_FBW_{MIN|MAX} were used.
https://github.com/ArduPilot/ardupilot/blob/fbf146fc357d35aef28c7816df93db40d1729464/ArduPlane/ReleaseNotes.txt#L1224-L1242

7) Parameters renamed and rescaled
    - COMPASS_TYPEMASK renamed to COMPASS_DISBLMSK
    - SYS_NUM_RESETS replaced by STAT_BOOTCNT
    - AIRSPEED_CRUISE replaces TRIM_ARSPD_CM
    - AIRSPEED_MIN replaces ARSPD_FBW_MIN
    - AIRSPEED_MAX replaces ARSPD_FBW_MAX
    - CRUISE_ALT_FLOOR replaces ALT_HOLD_FBWCM
    - LAND_FINAL_SPD replaces LAND_SPEED
    - LAND_PITCH_DEG replaces LAND_PITCH_CD
    - MIN_GROUNDSPEED replaces MIN_GNDSPD_CM
    - PTCH_LIM_MAX_DEG replaces LIM_PITCH_MAX
    - PTCH_LIM_MIN_DEG replaces LIM_PITCH_MIN
    - PTCH_TRIM_DEG replaces TRIM_PITCH_CD
    - Q_LAND_FINAL_SPD replaces Q_LAND_SPEED
    - Q_PILOT_ACCEL_Z replaces Q_ACCEL_Z
    - Q_PILOT_SPD_UP replaces Q_VELZ_MAX
    - Q_PILOT_SPD_DN replaces Q_VELZ_MAX_DN
    - ROLL_LIMIT_DEG replaces LIM_ROLL_CD
    - RTL_ALTITUDE replaces ALT_HOLD_RTL

Also there I checked that ArduPilot team didn't rename any parameters in 4.6, should I bump this number? I believe they don't do breaking changes to parameters on patch releases.

int ArduPlaneFirmwarePlugin::remapParamNameHigestMinorVersionNumber(int majorVersionNumber) const
{
// Remapping supports up to 4.5
return ((majorVersionNumber == 4) ? 5 : Vehicle::versionNotSetValue);
}


I also searched for firmwareMajorVersion to detect other renames handled the incorrect way. The only remaining result related to parameters is in PX4 SensorsComponent. But I don't have experience with PX4 and a simple replacement won't be enough there, so I'd rather not touch it.

@Maarrk Maarrk force-pushed the pr-rtl-param-name branch from 04c7b31 to 365cd6c Compare December 5, 2025 13:16
@Maarrk
Copy link
Contributor Author

Maarrk commented Dec 5, 2025

I have confirmed the RTL altitude works correctly everywhere in GUI with ArduPlane 4.6, but can't test 4.4 to ensure the remapping works, because of Python problems with sim_vehicle.py, sorry.

But I consider this tested enough, because the remapping system was already tested with airspeed.

@Maarrk Maarrk marked this pull request as ready for review December 5, 2025 13:36
@DonLakeFlyer
Copy link
Contributor

This looks all good, thanks so much. I'm just gonna do a quick SITL test as well and then merge.

@DonLakeFlyer DonLakeFlyer merged commit bc3da78 into mavlink:master Dec 10, 2025
13 checks passed
@Maarrk Maarrk deleted the pr-rtl-param-name branch December 11, 2025 01:00
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