bring back `px4-rc.params` file to set user defined params
px4-rc.params file can be used to set/override parameters.
It was removed in https://github.com/PX4/PX4-Autopilot/pull/24600 and discussed to bring it back.
Test coverage
- Simulation testing :heavy_check_mark:
I think we need to do a little bit more, how does this make it into the ROMFS? @alexcekay added something similar recently https://github.com/PX4/PX4-Autopilot/pull/25449
The way it worked before (and should still) is, that we ensure the file px4-rc.params is present in the context and then gets applied.
There are still things missing to fully bing this back.
- Please have a look at https://github.com/PX4/PX4-Autopilot/pull/24600/files#diff-2a4aa749b0ac200cb520539a8171ae5f8dc353e08be7edd519e945a7e6e7422a
- The file
ROMFS/px4fmu_common/init.d-posix/px4-rc.paramsneeds to be created again - It needs to be added back to the ROMFS in
ROMFS/px4fmu_common/init.d-posix/CMakeLists.txt
Thx. Done.
So you want to edit the px4-rc.params file directly? Your comment in the code seems to indicate you want to use something in your PATH?
#user defined params for instances can be in PATH
With your latest commit you've added the file in-tree. If you want to have something in-tree then I would use the dynamic init system
CONFIG_BOARD_ADDITIONAL_INIT="rc.additional"
For hardware targets we also have config.txt and extras.txt. Maybe we want to bring this into SITL as well? We should try to simplify and minimize the configuration options
https://docs.px4.io/main/en/concept/system_startup.html#customizing-the-system-startup
So you want to edit the px4-rc.params file directly? Your comment in the code seems to indicate you want to use something in your PATH?
#user defined params for instances can be in PATH
With your latest commit you've added the file in-tree. If you want to have something in-tree then I would use the dynamic init system
CONFIG_BOARD_ADDITIONAL_INIT="rc.additional"
The way we used it so far was to add some path to "PATH" and put a file there called px4-rc.params, which then will be applied by the RCS file with
#user defined params for instances can be in PATH
. px4-rc.params
This PR was identified as stale and it will be closed in 30 days unless any activity is detected.
I see. https://github.com/PX4/PX4-Autopilot/blob/main/ROMFS/px4fmu_common/init.d-posix/rcS#L14
So it's a posix-only thing. It would be nice to do this in a more obvious and generalized way.
Not sure what you want to say?
I see. https://github.com/PX4/PX4-Autopilot/blob/main/ROMFS/px4fmu_common/init.d-posix/rcS#L14 So it's a posix-only thing. It would be nice to do this in a more obvious and generalized way.
Not sure what you want to say?
I am saying this is an empty file without clear purpose that gets put into the PATH in a non-obvious way that is specific to posix. Any reason why config.txt or extras.txt aren't suitable? We should try to minimize the number of configuration knobs. https://docs.px4.io/main/en/concept/system_startup#customizing-the-system-startup