Skip to content

feat(gs): add factory tools, firmware updates, and simulator coverage - #415

Merged
stojadin2701 merged 10 commits into
mainfrom
feat/gs-simulator-light-mode
Sep 5, 2026
Merged

stojadin2701 merged 10 commits into
mainfrom
feat/gs-simulator-light-mode

Conversation

@stojadin2701

@stojadin2701 stojadin2701 commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Preparing a production batch currently requires ad hoc checks, and firmware identity and receiver updates are not available from one on-device workflow. This PR prepares Ground Station 1.3.0 with a guided factory self-test, firmware update tools, and live guidance toward the rocket, backed by the production-rendered simulator.

Factory self-test

  • Start on battery power with USB disconnected. Step 0 measures stationary gyroscope offsets, saves and verifies them in NVS, and reuses them on future starts. The initial automatic checks cover GNSS, IMU, magnetometer, battery, and storage.
  • Test both receivers independently across dual, swapped-phrase, single, and receiver-alone modes using temporary cats_test_1 / cats_test_2 phrases; restore the saved receiver settings afterward. Require at least 8 packets/s, mean link quality of at least 80%, SNR strictly above -5 dB in every quality report, and no reception gap longer than one second.
  • Gate manual checks behind a fresh Start press. Check the six physical buttons, hold each display pattern for four seconds, and observe LEDs during telemetry reception. The final USB check requires a fresh successful host read after storage is shared; connection alone does not pass.

Live guidance and settings

  • Calculate signed bearing relative to the Ground Station heading: ahead 0, right 90, behind 180, left -90. Dual mode calculates guidance for each link. Bearing and distance refresh as the Ground Station rotates or moves and remain blank without both Ground Station and rocket coordinates.
  • Fix intermittent left/right view switching and stale bearing text. GNSS coordinates omit the degree symbol; bearing uses a larger degree symbol. Keep the existing live age display unchanged.
  • Organize Settings into Telemetry, Preferences, and System pages; keep Link Phrase 2 visible in single mode. Improve the startup animation and compass/orientation view, including magnetometer alignment and simulator compass direction.

Firmware and release support

  • Show Ground Station and receiver versions in Settings and USB version.json. Provide System > Update Firmware targets for the Ground Station and Radio Receivers, and refresh cached receiver versions after verified updates.
  • Install one telemetry .bin on both internal STM32G071 receivers from the Ground Station through their factory ROM bootloaders, with guarded storage ownership, full readback, and application-version verification. Simplify the bootloader-entry command to a zero-length payload with CRC8.
  • Keep only the WROVER TinyUF2 0.35.0 factory combined-ota BIN and updater UF2, document their distinct uses, and remove the WROOM artifact. Include firmware versions in release artifact names.

Receiver updates have no rollback slot; interruption during final vector activation can require ST-Link recovery. Older receiver applications without bootloader-entry support need a one-time ST-Link installation. See receiver update instructions, self-test instructions, and WROVER provisioning instructions.

Validation

  • ground_station/gs-precommit.ps1, including firmware builds, static analysis, and native regression checks.
  • 21 deterministic simulator scenarios, 12 shared fixtures, and 22 browser/WebAssembly regression checks.
  • Focused button-timing and incremental-redraw checks, plus visual inspection of live guidance, Settings, self-test, and firmware-update screens.
  • All 11 PR checks pass on 1ddfdf0, including Windows/Linux firmware builds and the Windows simulator.

Physical display, sensor, GNSS, RF, USB timing, flashing, and recovery qualification remain hardware checks.

Enlarge the startup rocket and draw a fuller animated flame with a contrasting inner core. Update the matching deterministic renderer and snapshots while preserving the existing startup timing.
Add a Sensors orientation view showing magnetic heading, pitch, roll, and field magnitude while retaining the existing calibration algorithm. Include the related coordinate and numeric display fixes, atomic calibration-progress redraw, and simulator support for the shared screen.
Add the simplified browser demo, real-time recorded flight replay, optional phone sensor input, declarative fixtures, and browser regression coverage. Expand deterministic scenarios and document the simulator controls and coverage gaps.
Add the three-phase factory self-test with telemetry, sensor, radio, storage, and gated manual checks.

Report Ground Station and telemetry versions through Settings and version.json, reorganize the Settings pages, and cover the workflows in the simulator.
@stojadin2701
stojadin2701 force-pushed the feat/gs-simulator-light-mode branch from 52a0a9c to a4baf98 Compare September 3, 2026 20:36
@stojadin2701 stojadin2701 changed the title feat(gs): expand simulator and add compass view feat(gs): add factory tools, firmware updates, and simulator coverage Sep 3, 2026
@stojadin2701
stojadin2701 force-pushed the feat/gs-simulator-light-mode branch from 2798737 to ab44d8e Compare September 4, 2026 20:43
Accept bootloader entry only for an empty payload and remove the unused request signature and constants.
Add the official combined-ota factory image, retain the matching updater UF2, and remove the WROOM variant. Document the verified release checksums and factory versus updater usage.
Bump the Ground Station to 1.3.0. Add persistent gyro calibration, stricter reception checks, automatic battery checks, verified USB host reads, longer display presets, and checks for the six physical buttons.

Correct compass alignment and signed per-link GPS guidance, keep live buttons responsive, render degree symbols without leftover pixels, and show Link Phrase 2 in Single mode. Refresh verified receiver versions and align bootloader entry with the telemetry zero-payload command.

Update simulator coverage and tooling. Validation: Ground Station pre-commit checks and 22 browser checks passed; physical hardware qualification remains pending.
Remove degree symbols from live GNSS coordinates and enlarge the bearing degree symbol while keeping it within the cleared row. Update the visually verified framebuffer references.

Validation: Ground Station pre-commit checks, 22 browser checks, and 3600 dual-link angle redraw checks passed.
@jbinz
jbinz self-requested a review September 5, 2026 16:38
@stojadin2701
stojadin2701 merged commit d03fa47 into main Sep 5, 2026
11 checks passed
@stojadin2701
stojadin2701 deleted the feat/gs-simulator-light-mode branch September 5, 2026 16:49
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