Skip to content

[RFC] Enforce parameter constraints at param::get() #28126

Description

@JBotwina

Not all parameters are validated at runtime, and values that make no physical sense (negative magnitudes) can produce unexpected behavior. PX4 policy has generally been to leave proper configuration to the user, and for most parameters that is the right call.

We've seen five reports in two weeks, each a different parameter, and #28104 was closed rather than add two more guards to MulticopterPositionControl::parameters_update().

Tracking the general fix @dakejahl proposed in [#28094 (comment)] — enforce the constraints once at the parameter accessor rather than per consumer.

Reports of this shape:

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triageAuto-assigned to new issues and removed after maintainers review it and assign the specific label.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions