Copter: PHLD_BRAKE_xxx params renamed and converted to meters#32169
Merged
rmackay9 merged 3 commits intoArduPilot:masterfrom Feb 17, 2026
Merged
Copter: PHLD_BRAKE_xxx params renamed and converted to meters#32169rmackay9 merged 3 commits intoArduPilot:masterfrom
rmackay9 merged 3 commits intoArduPilot:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
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_RATE→PHLD_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
ParametersG2and 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.
lthall
approved these changes
Feb 11, 2026
Contributor
lthall
left a comment
There was a problem hiding this comment.
Happy for this to go in with the changes.
b3a8dd5 to
da12b2f
Compare
da12b2f to
70768cc
Compare
Contributor
Author
|
rebased on master after BillG's PR has been merged #31843 |
peterbarker
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates two PosHold mode parameters:
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
