feat: locoProgramming modes (BigFred dcc-bus or direct Z21) - #5
Merged
Conversation
Add a locoProgramming config block (mode bigfred|direct). BigFred mode can pin dcc-bus-id + layout-id instead of catalogue autodetection. Direct mode talks UDP CV/POM to a Z21/RailBOX via a small z21-lan crate so the kiosk can program locos without a live dcc-bus daemon. Co-authored-by: Cursor <cursoragent@cursor.com>
The hub rootfs is read-only and /etc/init.d/bigfred-wizard prefers /data/opt/bigfred/bin/bigfred-wizard over the image copy. Upload beside the target and rename, because writing in place fails with ETXTBSY once the hub runs the /data copy. Co-authored-by: Cursor <cursoragent@cursor.com>
cargo fmt resolves the workspace and needs the wireless-programmer sibling checkout; cloning wp-proto after the format step broke CI. Co-authored-by: Cursor <cursoragent@cursor.com>
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
locoProgrammingblock inbigfred-wizard.json:modeisbigfred(default) ordirect.dccBusIdandlayoutIdare set, skip catalogue autodetection and use that command-station id on/api/v1/dcc-bus/{id}/ws.locoProgramming.z21.address:portvia a newz21-lancrate (spec §6 encode/parse + send-and-await). Programming HTTP APIs stay the same.Example:
Set
"mode": "direct"to bypass dcc-bus for decoder CVs.Test plan
cargo test --workspaceandcargo clippy --all-targets -- -D warningsdccBusId+layoutIdset, About / programming uses that station idMade with Cursor