Skip to content

usdr_dm_create: fix TX generator format check#111

Open
cvalentine99 wants to merge 1 commit intowavelet-lab:mainfrom
cvalentine99:fix/tx-generator-format-check
Open

usdr_dm_create: fix TX generator format check#111
cvalentine99 wants to merge 1 commit intowavelet-lab:mainfrom
cvalentine99:fix/tx-generator-format-check

Conversation

@cvalentine99
Copy link
Copy Markdown

Summary

In usdr_dm_create.c, the TX sine generator thread selection (lines
1149-1157) compares fmt_rx (set by -F) instead of fmt_tx (set by
-i). The TX stream itself is correctly created with fmt_tx (line 1072),
so when RX and TX formats differ, the TX generator can select the wrong
sample-generation path. The bug is latent when both formats match (the
default case). Also updates the error message to print fmt_tx and
reference the TX format option.

Validation

  • Verified -F sets fmt_rx and -i sets fmt_tx (lines 796-800)
  • Verified TX stream creation already uses fmt_tx (line 1072)
  • Verified TX sine generator thread selection now uses fmt_tx consistently
  • Build verification: clean build with gcc 15.2.0, zero warnings

Behavioral expectation

  • No behavior change when fmt_rx == fmt_tx (the default and most common usage)
  • Correct generator selection when RX and TX formats differ

TX sine generator thread selection compared fmt_rx instead of fmt_tx,
selecting the wrong sample-generation path when RX and TX formats differ.

Co-Authored-By: Claude Opus 4.6 <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.

1 participant