Use firmware with embedded parameters and load it onto a drone without the need to reset calibrations

Hello everyone . Here’s what I’m trying to do .

I want to compile a firmware with a parameter list embedded in it , so that when I load it onto my drone the default parameters are overwritten and automatically saved without the need to ‘Reset’ the parameters .

To compile a firmware with embeddable parameters , I did this by inserting a defaults.param file inside my drone’s folder in hwdef , which contained my parameters with custom values .

Loading the firmware onto a drone, however, I noticed that after an initial reboot , the parameters had not been changed at all .

I asked around and experts told me that I have to do a “Reset to Defaults”. but this would also mean that the calibration parameters would be lost!

Here is my question :

How do I load a firmware with embedded parameters WITHOUT having to reset all the parameters ?
Since I work with many drones, I would just like to be able to load the firmaware and have the default parameters overwritten automatically

Thank you for your help @tridge , @rmackay9

Typically you do the reset to defaults, before calibrating the drone.

Thank you . But my aim is not to use the reset . I want to be able to upload a firmware with parameters embedded in a drone and when uploading these parameters will be overwritten to the current ones .

I have already tried this procedure but when I load the firmware and do a reboot, the parameters have not changed

Do you just need to load .param file with your specifics?

1 Like

We have a wiki page which describes the APJ Tools method including defining read-only parameters but I’m not sure if this will overwrite parameters that have already been set to other values.

So in short, I’m not aware of a way to current do exactly what you’re asking for without some code changes.

In a nutshell, I would like to upload a firmware with embedded parameters to a drone, and that when I upload the firmware with embedded parameters, they are overwritten with the existing ones and saved on the drone itself.

I was already aware of this method, but I have never tried it. I currently use a file “defaults.param” inside the hwdef folder of my drone , but I am having some problems loading all the parameters , some are not loading . However I could try to load the default parameters with this method, Should the formatting of the .param file be without a comma between the parameter name and its value ?

# Default parameter file for vehicleX
MOT_PWM_MIN 1000
ATC_RAT_RLL_P 0.100 @READONLY   # users will not be able to modify this parameter

Could you please explain to me the meaning of this sentence in the apj_tool guide :
The parameters will be the new default values only if the user has not modified them