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

Vehicles: Unmark FORMAT_VERSION as read-only #26693

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Apr 4, 2024

Match behavior of all vehicles. Allows GCSes to use documented behavior of a zero write to FORMAT_VERSION to reset EEPROM contents.

Verified that this does not change the built firmware contents. Presumably GCSes will need to update their parameter metadata.

tpwrules added 3 commits April 4, 2024 17:20
Matches other vehicles and allows GCSes to use documented behavior of a
zero write to FORMAT_VERSION to reset EEPROM contents.
Matches other vehicles and allows GCSes to use documented behavior of a
zero write to FORMAT_VERSION to reset EEPROM contents.
Matches other vehicles and allows GCSes to use documented behavior of a
zero write to FORMAT_VERSION to reset EEPROM contents.
@peterbarker
Copy link
Contributor

Match behavior of all vehicles. Allows GCSes to use documented behavior of a zero write to FORMAT_VERSION to reset EEPROM contents.

Verified that this does not change the built firmware contents. Presumably GCSes will need to update their parameter metadata.

You know the "correct" way to do this is not via setting a parameter, but rather to send in a mavlink command explicitly designed to clear parameter storage? The Sub guys implemented that feature, they might be a little miffed if we un-READONLY the parameter.

i.e. the correct fix is to fix the documentation (and the GCSs).

Consistency is good. We should hide this parameter eventually. But we should mark all of these read-only or merge this PR.

@tpwrules
Copy link
Contributor Author

tpwrules commented Apr 4, 2024

The wiki notes that writing 0 to FORMAT_VERSION resets more than parameters: https://ardupilot.org/copter/docs/common-parameter-reset.html

I talked with Andrew Tridgell on discord and he said that not being read only is a bug.

@peterbarker
Copy link
Contributor

I talked with Andrew Tridgell on discord and he said that not being read only is a bug.

DYM the fact it is marked read-only is a bug? I agree with that bit :-) Just saying that others may not.

@Williangalvani do you see any problems marking FORMAT_VERSION as not read-only in sub? For consistency, basically.

@tpwrules
Copy link
Contributor Author

tpwrules commented Apr 8, 2024

Sorry, yes, he agreed all of the instances should not be read only.

Does Sub support erasing the parameters and auxiliary data by writing that parameter the same way the other vehicles do? If not then it doesn't make sense to have it be read-write.

@peterbarker
Copy link
Contributor

Sorry, yes, he agreed all of the instances should not be read only.

Does Sub support erasing the parameters and auxiliary data by writing that parameter the same way the other vehicles do? If not then it doesn't make sense to have it be read-write.

It does - it's just that the Sub guys tend to use QGC which I think has an erase-parameters button which sends in a standard mavlink-ish way of erasing the state.

Labelling for DevCallEu where we'll probably merge...

@tridge tridge merged commit 319d1a7 into ArduPilot:master Apr 10, 2024
77 checks passed
@tpwrules tpwrules deleted the rw-format-version branch April 10, 2024 13:56
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.

4 participants