Skip to content
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

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented Apr 2, 2019

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).

@julianoes julianoes requested review from dagar and julianoes April 2, 2019 09:54
@dagar
Copy link
Member

dagar commented Apr 2, 2019

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

@dagar
Copy link
Member

dagar commented Apr 2, 2019

@bkueng bkueng force-pushed the param_airframe_versioning branch from 9056545 to 4a2ac4c Compare April 4, 2019 08:03
@bkueng
Copy link
Member Author

bkueng commented Apr 4, 2019

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.

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.

@dagar
Copy link
Member

dagar commented Apr 4, 2019

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.

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.

@bkueng bkueng merged commit 0bb5225 into master Apr 5, 2019
@bkueng bkueng deleted the param_airframe_versioning branch April 5, 2019 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants