Skip to content

feat: locoProgramming modes (BigFred dcc-bus or direct Z21) - #5

Merged
keskad merged 3 commits into
mainfrom
feat/loco-programming-modes
Aug 23, 2026
Merged

feat: locoProgramming modes (BigFred dcc-bus or direct Z21)#5
keskad merged 3 commits into
mainfrom
feat/loco-programming-modes

Conversation

@keskad

@keskad keskad commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New locoProgramming block in bigfred-wizard.json: mode is bigfred (default) or direct.
  • BigFred mode: if both dccBusId and layoutId are set, skip catalogue autodetection and use that command-station id on /api/v1/dcc-bus/{id}/ws.
  • Direct mode: the daemon talks UDP CV/POM to locoProgramming.z21.address:port via a new z21-lan crate (spec §6 encode/parse + send-and-await). Programming HTTP APIs stay the same.

Example:

"locoProgramming": {
  "mode": "bigfred",
  "dccBusId": 1,
  "layoutId": 1,
  "z21": { "address": "192.168.0.10", "port": 21105 }
}

Set "mode": "direct" to bypass dcc-bus for decoder CVs.

Test plan

  • cargo test --workspace and cargo clippy --all-targets -- -D warnings
  • Default config still uses BigFred autodetection
  • With dccBusId+layoutId set, About / programming uses that station id
  • Direct mode against an RB1110 at the configured UDP address: read/write a CV on the programming track

Made with Cursor

keskad and others added 3 commits August 23, 2026 12:33
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>
@keskad
keskad merged commit 54bfe2a into main Aug 23, 2026
3 checks passed
@keskad
keskad deleted the feat/loco-programming-modes branch August 23, 2026 11:08
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.

1 participant