Adding new parameter to pixhawk

Hi, i am still new to pixhawk.

how do i access the parameter.h file? Because i want to add a custom parameter to my pixhawk

Thanks.

A parameter for a module with modulename is defined in the file modulename_params.c. For instance mc_att_control has params defined in https://github.com/PX4/Firmware/blob/master/src/modules/mc_att_control/mc_att_control_params.c.

Then you can search for an existing parameter in the files and see how it’s done and then copy that. Let me know if that works for you.

1 Like

Hey, we are building our custom firmware and want to hard code the parameter values so GCS cannot change it. Which files should we modify?

I think the best option is to create a custom airframe inside the init.d/airframe folder Adding a Frame Configuration | PX4 User Guide (v1.14)
Good practice is to start from a model that is already similar to your configuration
Than just add the parameters you want to hardcode by using param set-default
If you open an already existing airframe you will see it

1 Like