mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
HackRF: fixed bandwidth selection
This commit is contained in:
parent
2ae702763b
commit
3b44a5367c
@ -296,7 +296,7 @@ bool HackRFOutput::applySettings(const HackRFOutputSettings& settings, bool forc
|
||||
{
|
||||
if (m_dev != 0)
|
||||
{
|
||||
uint32_t bw_index = hackrf_compute_baseband_filter_bw_round_down_lt(settings.m_bandwidth);
|
||||
uint32_t bw_index = hackrf_compute_baseband_filter_bw_round_down_lt(settings.m_bandwidth + 1); // +1 so the round down to lower than yields desired bandwidth
|
||||
rc = (hackrf_error) hackrf_set_baseband_filter_bandwidth(m_dev, bw_index);
|
||||
|
||||
if (rc != HACKRF_SUCCESS)
|
||||
|
@ -185,7 +185,7 @@ bool HackRFInput::handleMessage(const Message& message)
|
||||
MsgConfigureHackRF& conf = (MsgConfigureHackRF&) message;
|
||||
qDebug() << "HackRFInput::handleMessage: MsgConfigureHackRF";
|
||||
|
||||
bool success = applySettings(conf.getSettings(), false);
|
||||
bool success = applySettings(conf.getSettings(), conf.getForce());
|
||||
|
||||
if (!success)
|
||||
{
|
||||
@ -373,7 +373,7 @@ bool HackRFInput::applySettings(const HackRFInputSettings& settings, bool force)
|
||||
|
||||
if (m_dev != 0)
|
||||
{
|
||||
uint32_t bw_index = hackrf_compute_baseband_filter_bw_round_down_lt(m_settings.m_bandwidth);
|
||||
uint32_t bw_index = hackrf_compute_baseband_filter_bw_round_down_lt(m_settings.m_bandwidth + 1); // +1 so the round down to lower than yields desired bandwidth
|
||||
rc = (hackrf_error) hackrf_set_baseband_filter_bandwidth(m_dev, bw_index);
|
||||
|
||||
if (rc != HACKRF_SUCCESS)
|
||||
|
Loading…
Reference in New Issue
Block a user