Skip to content

Write captured samples to file in the FFT viewer - #220

Open
dmitrymmm wants to merge 1 commit into
myriadrf:developfrom
dmitrymmm:fix-fftviewer-capture
Open

Write captured samples to file in the FFT viewer#220
dmitrymmm wants to merge 1 commit into
myriadrf:developfrom
dmitrymmm:fix-fftviewer-capture

Conversation

@dmitrymmm

Copy link
Copy Markdown
Contributor

The FFT viewer capture loop filled captureBuffer but no code ever wrote it to the file chosen in the save dialog, so the capture silently produced nothing and never finished. The shared sample counters also advanced inside the per channel loop, corrupting two channel captures.

The samples are now written as tab separated text (AI AQ, plus BI BQ for two channels) once the requested count is reached, and the capture stops.

Verified the exact old and new logic in a standalone harness with synthetic two channel data arriving in uneven chunks: the old code corrupted the channel data and wrote nothing, the fixed code writes every value correctly. A quick run with a board would be a welcome confirmation, streaming in the viewer needs a device.

Fixes #126

🤖 Generated with Claude Code

The capture loop filled the buffer but no code ever wrote it to the
selected file, and the shared sample counters advanced inside the per
channel loop, corrupting two channel captures. Write the samples as
tab separated text when the requested count is reached and stop the
capture.

Fixes myriadrf#126

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

FFT viewer don't save captured samples buffers to file

1 participant