Skip to content

[3/4] Simulate UART reception and exercise vcfront GNSS streams - #673

Merged
joshlafleur-zip merged 4 commits into
jl/gnss-stack-2-receiverfrom
jl/gnss-stack-3-simulation
Nov 2, 2026
Merged

joshlafleur-zip merged 4 commits into
jl/gnss-stack-2-receiverfrom
jl/gnss-stack-3-simulation

Conversation

@joshlafleur-zip

@joshlafleur-zip joshlafleur-zip commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Reason for Change

The simulator could not deliver receiver bytes through the firmware's actual UART DMA buffer. Add reusable UART reception and verify that streamed GNSS data reaches the CAN outputs correctly.

Changes

  • Add circular DMA, single-shot DMA, and polling UART backends, status/byte counters, and a Python injection interface supporting scheduled streams.
  • Configure vcfront's GPS UART before module initialization and expose it through the controller model.
  • Exercise receiver startup, 10 Hz navigation updates, partial sentences, circular-buffer wrapping, CAN diagnostics, and sentence/error counts.
  • Reset CAN transmit table state during initialization so simulated controller restarts do not retain deadlines from the previous clock epoch.

Test Plan

Validated at this PR's tip (26b09cc1), with all checks passing:

  • buckle test //sim/bindings/firmware/uart:unit //sim/bindings/firmware/uart/tests:python_unit //sim/tests:vcfront_cluster
    • 5 Rust UART tests and 4 Python UART tests pass.
    • 44 vcfront tests pass on each of CFR25 and CFR26.
  • buckle build //components/vc/front:elf — STM32 firmware builds.

Byte injection is deterministic at simulation boundaries; it does not model baud-rate serialization.

Additional validation after formatting cleanup:

  • prek run --all-files --show-diff-on-failure --color never passes at every commit in this PR; formatting corrections are folded into the introducing commits.
  • buckle test //components/... //tools/rig/... //sim/... passes all 41 test targets at this PR's updated tip.

Stack

Merge in order; each later PR targets the previous branch.

  1. [1/4] Harden NVM recovery with reusable C test helpers
  2. [2/4] Recover GNSS DMA reception and validate navigation data
  3. [3/4] Simulate UART reception and exercise vcfront GNSS streams (this PR)
  4. [4/4] Disable the GNSS transceiver after repeated UART errors

Signed-off-by: Josh Lafleur <josh.lafleur@flyzipline.com>
Signed-off-by: Josh Lafleur <josh.lafleur@flyzipline.com>
Signed-off-by: Josh Lafleur <josh.lafleur@flyzipline.com>
Signed-off-by: Josh Lafleur <josh.lafleur@flyzipline.com>
@joshlafleur-zip
joshlafleur-zip force-pushed the jl/gnss-stack-3-simulation branch from 415374a to 26b09cc Compare November 1, 2026 23:32
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Firmware artifact diff: embedded-cfr26

Base run: not found
PR run: https://github.com/concordia-fsae/firmware/actions/runs/41362597935

Summary:

  • Added: 0
  • Deleted: 0
  • Changed: 0
  • Unchanged: 0

Added:
None

Deleted:
None

Changed:
None

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Firmware artifact diff: embedded-cfr25

Base run: not found
PR run: https://github.com/concordia-fsae/firmware/actions/runs/41362597935

Summary:

  • Added: 0
  • Deleted: 0
  • Changed: 0
  • Unchanged: 0

Added:
None

Deleted:
None

Changed:
None

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Firmware artifact diff: drive-stack-arm64

Base run: https://github.com/concordia-fsae/firmware/actions/runs/41362597245
PR run: https://github.com/concordia-fsae/firmware/actions/runs/41362597935

Summary:

  • Added: 0
  • Deleted: 0
  • Changed: 1
  • Unchanged: 7

Added:
None

Deleted:
None

Changed:

Path Base SHA256 PR SHA256
carputer-cfr26.tgz e028a8c2e138a4eed1d23f42fe112cdaca396e1ef7d35b2e7b4a920e57c63a04 4465dadaab5d3a82d21b6519cf901dade84bd705b3468c98d9b4c3e7f533064c

@joshlafleur-zip
joshlafleur-zip merged commit 4fb9d8d into master Nov 2, 2026
21 of 38 checks passed
@joshlafleur-zip
joshlafleur-zip deleted the jl/gnss-stack-3-simulation branch November 2, 2026 01:02
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