Main Content

createCustomPX4Parameter

Create custom PX4 parameter for writing to the PX4 system parameter

Since R2025a

    Add-On Required: This feature requires the UAV Toolbox Support Package for PX4 Autopilots add-on.

    Description

    createCustomPX4Parameter() creates a custom PX4 parameter and also allows easy parameter modification.

    example

    Examples

    collapse all

    Create a new custom PX4 Parameter, with the required parameter type and corresponding values.

    This example shows the functioning of the API with the changes that are being made in the Firmware.

    createCustomPX4Parameter()

    add parameter information

    In the Add Parameter Information dialog box, add the information for the parameter.

    1. Specify a name for the parameter and select the parameter type.

      Note

      Parameter name must be less than 16 characters.

    2. Specify the group for the parameter.

    3. Specify minimum and maximum values.

    4. Specify default value, which must be within minimum and maximum value specified.

    5. Select the unit and category type for the parameter.

    6. Specify short and long description for the parameter.

      Note

      Short description must be less than 70 characters.

    7. Click Add Parameter to add the parameter.

    To remove a parameter, click Remove Parameter. This provides an option to remove any specific parameter or to remove all parameters.

    add parameter information

    Click Remove All to remove all the parameters. Clicking Remove Specific provides an option to select and remove specific parameter.

    Note

    After adding or deleting a parameter, you must build the PX4 firmware by clicking Build Firmware.

    Version History

    Introduced in R2025a