Tridge was kind enough to merge his new APJ Tool into master today. This allows you to bake default parameters into any firmware file. This totally eliminates the need to bake vehicle/project specific parameters into the build. You can grab the px4 file (for example) off the firmware server. Run the APJ python tool on it, and bake a parameter file into it. Super easy, took like 2 minutes to setup and use with no prior experience.
In the above, I took a PX4 file and baked in my solo parameters file into it. Loaded the firmware onto my solo, and I now have ArduCopter 3.5.4 with the Solo’s defaults instead of generic defaults.
awesome right there. great job
The tool works great. But, I’m having Problem setting BATT_MONITOR. All the parameters except BATT_MONITOR seems to get set using apj_tool.py. What am I doing wrong?
@Pedals2Paddles did you have any problem setting BATT_MONITOR to 5 (for solo)?
Any help is appreciated.
That’s odd. I just tried it and it worked fine setting
I made a separate param file with just the BATT_MONITOR param and the parameter is definitely baked in to the firmware file:
$ ~$ python apj_tool.py --show arducopter.px4
Loaded apj file of length 1097080
Found param defaults max_length=8192 length=16
But, still BATT_MONITOR is 0 after flashing the Cube.
ohhh. That is probably because you set it for 0 at some point while editing parameters. When you install firmware, it will not overwrite parameters you previous set manually. Do a parameter reset, and I bet you’ll see
BATT_MONITOR reset to your new default.
That was it. I did a parameter reset and that seemed to have done it.
This sounds interesting enough to ask a dumb question or 3. I assume from what I have read this means that it takes the Arducopter code and some how combines the param file from my say favorite UAV and sort of makes a custom version with my favorite UAV paramaters as the new defaults.
If so that’s cool…but I confess I am not sure that’s what everyone just said.
Basically yes. It changes the specified default values on that firmware file.
Does anyone know the reason for the 8k parameter file size limit? Ideally I’m looking to have around 12k worth of parameters baked in…
You should be able to vastly reduce that by only changing the parameters that aren’t defaults.
Thanks James, I came to the same conclusion myself. It was easy enough to compare a list of the default parameters versus the final parameters and extract the non-default values.