Add a custom parameter

Hi all,

I’m trying to add a new custom parameter but I get the error “Failed to write some parameters. Please restart the vehicle and try again”.

I’m doing it throught the “BlueOS>Autopilot Parameters>Load” option and I’m using the Ardupilot 4.1.0 version but I also tried with the 4.5.0 version.

I saved the actual .params file and I edited it to add my parameter. There is not error when I load others originals parameters (some of them were removed when I updated Ardupilot), but my custom parameter is the only one wich gets that error.

How could I load a custom parameter?

Thank you so much

Hi @MiguelC -
Welcome to the forums!

Depending on what you’re trying to do, the autopilot firmware will likely need to be modified and compiled to support your custom parameter.

What would you like to control with your parameter? Only existing parameters in the autopilot can have their values modified…

Thanks for your answer, I want to connect an additional BMP280 on the I2C port. So I want to add a new parameter that stores that measurement so I can display it on the main QGroundControl screen as a ‘Value Display’.

So far I am testing and I have managed, using Python, to get messages in MAVLink Inspector (in System 255), but I have not been able to display those values on the main screen.

Hi @MiguelC -
Besides modifying the ArduSub firmware, you would also need to ensure that the second BMP280 has a different I2C address! That is the best approach if you want the autopilot to manage collecting the pressure data. It may be possible to read the data with a python script, but I would bet your script is just sending a general message?

By main screen, do you mean QGroundControl?

That’s right, I’m sending a test message right now.

So I understand that although they are on different buses (the original on bus 1 and the added one on bus 6) they must have different addresses, i.e. I must configure the added sensor at address 0x77, as the original one is at 0x76.

By main screen I meant the QGround Control, yes. So I will try to modify the firmware to add a parameter to display as ‘Value Display’.

Thank you very much!

Hi @MiguelC -
If they’re connected to different busses then the different address is not required.

It may be vastly simpler to communicate with the device via python or Node-RED, rather than modify the firmware!