-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rcS: add airframe parameter versioning and extend SYS_AUTOCONFIG #11760
Conversation
I'm fine with this solution if we treat airframe and vehicle type defaults appropriately. For example we'd need to stop setting parameters like this that are perhaps good starting values for most multicopters, but certainly not safe to reset if changed by a user. https://github.com/PX4/Firmware/blob/0b548fa6849e7a608b4c120fb66a760e51806056/ROMFS/px4fmu_common/init.d/rc.mc_defaults#L18-L20 |
TODO: review vehicle defaults
|
9056545
to
4a2ac4c
Compare
The use-case is a bit different for these: they are not meant to be changed by a user, since it's a fixed & finished airframe. Like the teal one for example. It also overrides these in its own airframe config. For others like RTL parameters, I agree, they should not be there. |
Ok that's fine, I thought it was going to be an overall version number we could increment, but I see the intended usage now. Ultimately we still need a solution for handling upgrades on generic setups. |
It is currently not easy for downstream adopters to update airframe parameters, while still allowing for some other customizations.
This PR provides a minimal solution for that, by adding an (optional) airframe parameter versioning variable, that is compared against
SYS_PARAM_VER
. Airframe defaults are reloaded if they don't match.While this has limitations, it has proven to be useful and effective in practice.
Ideally on an update we could show a param diff to the user, and let him/her decide which values to use.
To use it for an airframe, add
set PARAM_DEFAULTS_VER 2
to the airframe config, and whenever one of the parameters change, also increase that number.This reuses
SYS_PARAM_VER
, which is currently unused (in QGC as well).