I would like change some parameters and also add some. If I compile the new PX4 firmware, a new parameters.xml file is generated. However this file is not used by QGroundControl. That seems to use
Is it possible to use another parameters.xml file, without having to recompile QGroundControl?
You also need to bump the minor version number in order for it to override any other meta data you have in the cache.
So I guess then you have to update the firmware through QGC, otherwise it never sees the new parameters.xml? Or is al the meta-data actually compiled in the pixhawk firmware?
I changed the description of one parameter and incremented the version number in xmlout.py. But when running SITL simulation, the QGC still shows the old parameter description. Will try it later on real hardware and update through QGC.
The meta-data is all stored in PX4 firmware - which is why you need to flash with QGC so it can extract it from the firmware (generated by the xmlout.py as you well know).
I think we have a different definition of firmware. As far as I understand now, there is a *.px4 file which contains both the binary for the stm32 (that is the actual firmware) and the parameters.xml. This parameters.xml file is not flashed to the pixhawk if I am correct.
But having to flash it through QGC basically means that I cannot update parameters when running SITL, since I cannot upload anything in that case. It would be nice if the parameters used by QGC could be updated without having to flash firmware or recompile QGC.
How to add your custom parameter to QGC
Add New Parameter Meta Data to ~/src/modules/xxx/xxx_params.c
You need to bump minor version to override orders version
You can confirm present minor version here.
Add New Parameter to ~/src/modules/xxx/parameters.cpp
make clean;make target
Flash new firmware using QGC
You can confirm parameter list using [param show] command via nsh console.