Skip to content

Skip and log for unrecognised values - #72

Merged
garethpotter merged 3 commits into
mainfrom
eeprom-continue-unrecognised-obj
Sep 11, 2026
Merged

garethpotter merged 3 commits into
mainfrom
eeprom-continue-unrecognised-obj

Conversation

@ethan-duckett-brill

Copy link
Copy Markdown
Collaborator

If the EEPROM sees a TS ID that is no longer recognised by the firmware (eg if a value was saved to the EEPROM, then the firmware is updated to a new version that removes said value) then it stops trying to interpret the rest of the EEPROM.

This MR proposes that we should instead just skip this value, log a warning and carry on processing the rest of the EEPROM in this case

@garethpotter

Copy link
Copy Markdown
Collaborator

This seems reasonable, though I wonder if it should be a configurable option? i.e. there could well be use cases where one should fail when there is unexpected data.

@ethan-duckett-brill

Copy link
Copy Markdown
Collaborator Author

This seems reasonable, though I wonder if it should be a configurable option? i.e. there could well be use cases where one should fail when there is unexpected data.

Good shout, has been changed!

@garethpotter

Copy link
Copy Markdown
Collaborator

I wondered whether this also needed to handle non-Zephyr usage (i.e. not just Kconfig), but I see that as it stands, ThingSetPersistence.cpp is only used by Zephyr, so this is fine.

@garethpotter
garethpotter merged commit c4c7e5d into main Sep 11, 2026
6 checks passed
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