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

fix automatic filter bandwidth selection #38

Merged
merged 1 commit into from
Sep 25, 2022

Conversation

mossmann
Copy link
Contributor

There was a bug in setBandwidth() in which a value of zero would be turned into a nonzero value by hackrf_compute_baseband_filter_bw(). This made (_current_bandwidth > 0) always true, resulting in the baseband filter bandwidth being set to the minimum (nominally 1.75 MHz) instead of being automatic. Although setSampleRate() did set automatic filter bandwidth correctly, it was subsequently set incorrectly by setBandwidth().

I removed the call to hackrf_compute_baseband_filter_bw() as hackrf_set_baseband_filter_bandwidth() does this for you.

I also removed the automatic bandwidth filter setting in setSampleRate() as hackrf_set_sample_rate() does this for you.

@mossmann
Copy link
Contributor Author

This may fix #23, although I can't be certain without more information from the user.

@guruofquality guruofquality merged commit 6c0c33f into pothosware:master Sep 25, 2022
@mossmann mossmann deleted the bandwidth-bug branch September 26, 2022 13:06
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.

2 participants