Conversation
BanjoR
marked this pull request as ready for review
August 17, 2026 09:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR defines a platform-neutral persistence boundary for the existing settings store. It is scoped to the persistence access layer and preserves existing settings compatibility.
Related issues:
Superseded fork-only PR: BanjoR/CommandStation-EX#4, now closed in favor of this upstream-targeted PR.
Bounded scope
EEStore::read,EEStore::write, andEEStore::capacity.EESTORE_READ,EESTORE_WRITE, andEESTORE_CAPACITYhooks while retaining Arduino EEPROM behavior by default.EEStoreDatabyte layout:DCC++1identifier plus the three 16-bit object counts.Validation
Pass:
tests/host_eestore_format.ps1— passed:EEStore host format test passed.python -m platformio run -e mega2560using isolated task-local PlatformIO directories — passed; firmware linked and produced HEX, RAM 1357/8192 (16.6%), Flash 58190/253952 (22.9%).git diff --check upstream/master...HEAD— passed.Final checkout cleanliness/path audit — passed: clean worktree; only the ten bounded files in the diff; no generated
.pio,work, orconfig.hfiles; no forbidden/unrelated paths.Direct EEPROM access audit — passed: production call sites use the EEStore boundary; the only remaining
EEPROM.*references are the documented default hook definitions.PASS - Exact default
python -m platformio runin a clean task checkout with an isolated PlatformIO core completed for all five configured environments:mega2560,ESP32,Nucleo-F411RE,Nucleo-F446RE, andNucleo-F429ZI.Exact-head fork CI: PASS - CI run 31951891358 completed successfully for head 0a50786. The upstream PR has no firmware check attached because the main workflow is push-triggered. The C++ host test source contains compile-time layout assertions, but a native host C++ compiler is not installed in this environment; the AVR PlatformIO build validates the shared production format header instead.
Hardware validation
Not run—no hardware available.
Maintainer bench criteria: build with the intended board configuration; flash a Mega2560 or equivalent EEPROM-backed target; load at least one turnout, sensor, and output; issue
<E>; power-cycle; verify the same counts and definitions reload; issue<e>and verify a subsequent reboot loads an empty store. For a non-EEPROM target, define the board backend hooks and repeat the same round-trip and clear tests, including capacity reporting and preservation of an existing legacyDCC++1header.