Skip to content

Copter: PHLD_BRAKE_xxx params renamed and converted to meters#32169

Merged
rmackay9 merged 3 commits intoArduPilot:masterfrom
rmackay9:copter47-phld-parm-conv
Feb 17, 2026
Merged

Copter: PHLD_BRAKE_xxx params renamed and converted to meters#32169
rmackay9 merged 3 commits intoArduPilot:masterfrom
rmackay9:copter47-phld-parm-conv

Conversation

@rmackay9
Copy link
Copy Markdown
Contributor

@rmackay9 rmackay9 commented Feb 10, 2026

This PR updates two PosHold mode parameters:

  • PHLD_BRAKE_ANGLE (centi-degrees) is renamed to PHLD_BRK_ANGLE (degrees)
  • PHLD_BRAKE_RATE (deg/sec) is renamed to PHLD_BRK_RATE (still in deg/sec)

This is a follow up to PR #32147 and helps resolve issue #31562

This has been lightly tested in SITL to confirm the vehicle flies correct and also to confirm that the parameter conversion is working correct
param-conversion-before-vs-after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Copter PosHold braking parameters by renaming them to the newer shortened naming scheme and converting the braking angle parameter from centi-degrees to degrees, including firmware-side parameter conversion for existing setups.

Changes:

  • Rename PHLD_BRAKE_RATEPHLD_BRK_RATE (units unchanged).
  • Rename and convert PHLD_BRAKE_ANGLE (cdeg) → PHLD_BRK_ANGLE (deg), implemented as a mode-specific parameter with an EEPROM conversion path.
  • Wire PosHold mode parameters into ParametersG2 and invoke PosHold parameter conversion during parameter load.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/defaults.parm Removes Solo default overrides for PosHold brake params (currently without replacement using new param names/units).
libraries/AP_HAL_ChibiOS/hwdef/CubeGreen-solo/defaults.parm Same as above for Green Cube Solo defaults.
Tools/Frame_params/Solo-Copter-GreenCube.param Removes PosHold brake params from the frame param set (currently without replacement using new names/units).
ArduCopter/mode_poshold.cpp Adds PHLD_BRK_ANGLE as a mode-specific parameter, default initialization, and conversion from the deprecated stored value; updates runtime usage to degrees.
ArduCopter/mode.h Adds ModePosHold constructor and parameter plumbing declarations.
ArduCopter/config.h Removes the old POSHOLD_BRAKE_ANGLE_DEFAULT macro path (now hard-errors if used).
ArduCopter/Parameters.h Removes the old global brake-angle parameter storage and adds a mode_poshold_ptr hook in ParametersG2.
ArduCopter/Parameters.cpp Renames the brake rate parameter name, registers the PosHold subgroup in ParametersG2, calls PosHold conversion during load, and updates TradHeli defaults table names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ArduCopter/config.h Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/defaults.parm
Comment thread libraries/AP_HAL_ChibiOS/hwdef/CubeGreen-solo/defaults.parm
Comment thread Tools/Frame_params/Solo-Copter-GreenCube.param
Comment thread ArduCopter/mode_poshold.cpp Outdated
Comment thread ArduCopter/Parameters.cpp
@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Feb 11, 2026
Copy link
Copy Markdown
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.

Happy for this to go in with the changes.

Comment thread ArduCopter/mode_poshold.cpp
Comment thread ArduCopter/Parameters.cpp
Comment thread ArduCopter/mode_poshold.cpp Outdated
Comment thread ArduCopter/config.h Outdated
@rmackay9 rmackay9 force-pushed the copter47-phld-parm-conv branch from da12b2f to 70768cc Compare February 13, 2026 00:42
@rmackay9
Copy link
Copy Markdown
Contributor Author

rebased on master after BillG's PR has been merged #31843

@rmackay9 rmackay9 merged commit 93c72ef into ArduPilot:master Feb 17, 2026
85 of 87 checks passed
@rmackay9 rmackay9 deleted the copter47-phld-parm-conv branch February 17, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Copter WikiNeeded needs wiki update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants