Repository navigation
fix(ground-station): protect flight logs with Live-only recording (1.3.3) - #421
Merged
Merged
Conversation
stojadin2701
marked this pull request as ready for review
October 17, 2026 16:02
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.
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.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.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
#pragma oncedirective for new header filesChecklist for Releases
Related issues
Reported Ground Station log loss and inability to leave Live after re-entering at DOWN.