Skip to content

fix(ground-station): protect flight logs with Live-only recording (1.3.3) - #421

Merged
stojadin2701 merged 1 commit into
mainfrom
fix/gs-live-recording
Oct 17, 2026
Merged

stojadin2701 merged 1 commit into
mainfrom
fix/gs-live-recording

Conversation

@stojadin2701

Copy link
Copy Markdown
Member

Description

Opening other screens while flight recording continued allowed filesystem reads to overlap recorder writes. Confine recording to Live: B leaves immediately when idle; while recording it offers B: Back to Live and A: Main menu, closing the log before returning to the menu. Re-entering during flight creates a new numbered log; DOWN-only telemetry cannot start one.

Keep the storage fix localized: suppress the status-bar free-space scan throughout Live, carry the confirmation decision in the recorder's queued reply, and retain the open file when finalization fails so closing can be retried. Update the simulator to match and bump Ground Station to 1.3.3.

Validation

  • ground_station/gs-precommit.ps1: Windows and WSL firmware builds, clang-format/diff checks, clang-tidy, 21 deterministic scenarios, 13 fixtures, and WebAssembly build passed.
  • Browser/WASM suite: all 27 groups passed, including idle exit, confirmation/cancel, mid-flight re-entry, DOWN re-entry, USB reclaim, and failed finalization. Confirmation, restored Live, and error screens inspected visually.
  • python3 ground_station/tests/recorder_host/run.py (WSL): production recorder, selected production HMI bodies, pinned SdFat and Adafruit FlashCache tested with ASan/UBSan on a 960 KiB FAT12 volume. All 71 filenames and full file contents survived fresh mounts, including four pre-existing logs and 64 flight segments across single/dual receiver and Never/landing modes.
  • Forced the touchdown-before-exit-reply race, queued liftoff, failed flush/retry, and stale-status filesystem scan cases. Three negative controls restore the old behaviors independently and each fails its regression assertion.

Hardware retest is pending; keep this draft until it passes. The host tests substitute FreeRTOS, physical flash transport, and USB handoff. They do not qualify ESP32 scheduling, physical LCD/buttons, USB MSC, power cycling, or retention on the actual device. Repeat the reported exit/re-entry/DOWN sequence and verify existing and new logs after USB reconnect and a power cycle before merging.

Checklist for changes

  • Feature tested manually [Mandatory] — simulator UI inspected; final firmware hardware test pending
  • Simulation flight performed [Optional] — final firmware with Vega pending
  • Drone flight performed [Optional]
  • Copyright notice for new files
  • #pragma once directive for new header files

Checklist for Releases

  • Simulation flight performed [Mandatory] — final firmware with Vega pending
  • Drone flight performed [Optional]
  • Version number incremented [Mandatory] — Ground Station 1.3.3
  • Develop and debug flag disabled [Mandatory] — release build; CATS_DEBUG disabled

Related issues

Reported Ground Station log loss and inability to leave Live after re-entering at DOWN.

@stojadin2701
stojadin2701 marked this pull request as ready for review October 17, 2026 16:02
@stojadin2701
stojadin2701 merged commit f366de8 into main Oct 17, 2026
5 checks passed
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