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

Implement parameter backup for 4.0 #16442

Merged
merged 7 commits into from Feb 5, 2021

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Jan 26, 2021

This is a backport of #16304 which implements the parameter backup system to resolve the parameter reset problem seen on some boards.
I don't know if there will be another 4.0.x release, but as some people are being badly affected by this issue I am making it available as a PR for easy use with 4.0.x releases.

@rmackay9
Copy link
Contributor

rmackay9 commented Feb 3, 2021

I have done some light bench testing of this on a cubeorange and all seems fine but I'll continue with some more tests.

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// header doesn't match. We can't recover any variables. Wipe
// the header and setup the sentinal directly after the header
Debug("bad header in setup - erasing");
erase_all();
}

// ensure that backup is in sync with primary
_storage_bak.copy_area(_storage);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not checking return value here. Should probably be a flow-of-control internal error on failure.

In fact, copy_area should probably be void.

@rmackay9 rmackay9 moved this from PRs to 4.0.7-rc1 in Copter 4.0 backports Feb 5, 2021
@tridge tridge merged commit 5e1aef5 into ArduPilot:Copter-4.0 Feb 5, 2021
@rmackay9
Copy link
Contributor

rmackay9 commented Feb 5, 2021

This will be released with Copter-4.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Plane 4.0 Backports
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

5 participants