Skip to content

Conversation

PatrickKa
Copy link
Contributor

Fixes #384

@PatrickKa PatrickKa force-pushed the file-transfer-thread branch 2 times, most recently from ff3a3f6 to 36e3ba4 Compare September 25, 2025 08:21
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 90.49080% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.33%. Comparing base (82d435e) to head (9924635).

Files with missing lines Patch % Lines
Sts1CobcSw/Outcome/Outcome.ipp 0.00% 24 Missing ⚠️
Sts1CobcSw/FileSystem/File.cpp 75.00% 4 Missing ⚠️
...1CobcSw/Firmware/StartupAndSpiSupervisorThread.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #468      +/-   ##
==========================================
- Coverage   90.57%   90.33%   -0.25%     
==========================================
  Files         120      122       +2     
  Lines        6613     6767     +154     
  Branches      310      320      +10     
==========================================
+ Hits         5990     6113     +123     
- Misses        623      654      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PatrickKa PatrickKa force-pushed the file-transfer-thread branch 8 times, most recently from 3bec62d to c2709ab Compare September 29, 2025 21:14
@PatrickKa PatrickKa force-pushed the file-transfer-thread branch 4 times, most recently from f75c38e to 2387150 Compare October 4, 2025 18:59
We can only send a single frame at once in the RF communication thread,
so we can always use the `tmBuffer` and don't need a second one (or a
local variable as it was in this case).
It is not necessary to send the whole channel access data unit, since
the attached sync marker is the same for all TM frames. Therefore it is
enough to send the encoded frame from the file transfer thread to the RF
communication thread.
Yes, I know, this seems like the obvious thing to do but I still forgot
it.
This file transfer info allows the RF communication thread to discard
received PDUs early if no transfer is active, the sequence number is not
the active one, or the direction or entity IDs are wrong. The status and
sequence number are also added to the telemetry record.
This is done because the attached sync marker is stored as a constant in
the internal flash which is not corrupted as fast as the buffer in RAM.
@PatrickKa PatrickKa force-pushed the file-transfer-thread branch 2 times, most recently from d5c4787 to 9523167 Compare October 5, 2025 15:14
We forgot the directive codes. Also fix the tests.
If we cancel the transfer we immediately set the status to canceled, but
we still wait for an ACK from the ground station.
Since we use a default RF data rate of 9600 Bd in stead of 1200 Bd now,
a 5 s margin is way too much.
Previously, we only received additional data if we had time for the full
RX time of 3 s plus data handling. Now, we reduced this to a min. RX
time of 1 s plus data handling. The current implementation, however, is
too simple and does not compute the remaining RX time at all. Therefore,
a beacon can be sent up to 2 s too late. This is not too big of a deal,
though, especially since it will only happen if we want to receive "the
whole time".
This allows us to create and resize the file before the file transfer
starts, which is important because the time it takes to resize depends
on the file size. According to the file system benchmark it takes ~23 s
to resize a file from 0 B to 1 MiB.
@PatrickKa PatrickKa force-pushed the file-transfer-thread branch from 9523167 to dc2bc71 Compare October 6, 2025 18:01
@PatrickKa PatrickKa merged commit 4b395e8 into master Oct 6, 2025
6 checks passed
@PatrickKa PatrickKa deleted the file-transfer-thread branch October 6, 2025 20:32
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.

Add file transfer thread

2 participants