Skip to content

Add a hash to force QSPI memory reset if persistent data structure changes#85

Merged
xconverge merged 2 commits intobkshepherd:mainfrom
chattob:feature/persistent-data-hash
Mar 6, 2026
Merged

Add a hash to force QSPI memory reset if persistent data structure changes#85
xconverge merged 2 commits intobkshepherd:mainfrom
chattob:feature/persistent-data-hash

Conversation

@chattob
Copy link
Copy Markdown
Contributor

@chattob chattob commented Mar 6, 2026

Switching back to main branch from my personnal dev branch, I hit hard faults caused by incompatible persisted settings data.

This PR adds a layout hash to persistent settings. At startup, if the stored hash does not match the current layout hash, the firmware calls RestoreDefaults() to reset stale data and avoid loading invalid settings.

@xconverge
Copy link
Copy Markdown
Collaborator

Thanks for this, I will peek when I get a chance, I think it makes sense. I think the number of people who run into issues related to this is greater than the number of people who save settings and would be bummed to "lose them all". Especially since this mostly impacts someone doing development of some sort. I wont need to tell people to just temporarily adjust SETTINGS_FILE_FORMAT_VERSION anymore to force the behavior

@xconverge
Copy link
Copy Markdown
Collaborator

LGTM, thanks!

@xconverge xconverge merged commit 44e50ba into bkshepherd:main Mar 6, 2026
1 check passed
@chattob chattob deleted the feature/persistent-data-hash branch March 7, 2026 14:34
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.

2 participants