Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default rxtx binary mode configuration reflects bitmode value #934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Algafix
Copy link

@Algafix Algafix commented Aug 23, 2023

Doing:

bladeRF> set frequency rx 1575.42M
bladeRF> set bandwidth rx 20M
bladeRF> set samplerate rx 20M
bladeRF> set bitmode 8
bladeRF> rx config file=test_8bits.bin n=1200M timeout=60000

Does not set the file format to 8 bits:

bladeRF> rx

  State: Idle
  Channels: RX1
  Last error: None
  File: test_8bits.bin
  File format: SC16 Q11, Binary
  # Samples: 1258291200
  # Buffers: 32
  # Samples per buffer: 32768
  # Transfers: 16
  Timeout (ms): 60000

That's because the file format is updated inside the rxtx_str2fmt function only if the format option is provided on the rx/tx config command. I think it makes sense to use as default SC8Q7 if the user specifies 8 bits instead of the default SC16Q11.

My idea was to update the default mode when the set bitmode command is processed, but when looking at how the code is organized I thought this was a better idea. Let me know if you are ok with it or would prefer another approach.

Thanks!

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.

None yet

1 participant