-
Committer:
Eric Wild
-
Author(s):
Clayton Smith
-
Date:
2021-01-04 21:27:53 UTC
-
Revision ID:
git-v1:bc629b03fe133c81fc3ded4a9d040445cc265fe7
hackrf: fix bandwidth setting
The T/R switching code added in ae2253c516bfdc9ae4575ecd61fe0e6cd8608a0d
fails to set custom filter bandwidths because it sets bandwidth and
sample rate in the wrong order. As noted in the documentation for
hackrf_set_sample_rate: "If you want to override the baseband filter
selection, you must do so after setting the sample rate."
To solve this problem I moved the set_bandwidth call after
set_sample_rate. It was also necessary to skip the call if a custom
bandwidth was not requested.
Signed-off-by: Eric Wild <ewild@sysmocom.de>