mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-14 04:11:48 -05:00
Fixed LO PPM calculation for the HackRF and Airspy
This commit is contained in:
parent
fd78dda566
commit
f331a3986e
@ -266,7 +266,8 @@ bool AirspyInput::handleMessage(const Message& message)
|
||||
|
||||
void AirspyInput::setCenterFrequency(quint64 freq_hz)
|
||||
{
|
||||
freq_hz += (freq_hz * m_settings.m_LOppmTenths) / 10000000ULL;
|
||||
qint64 df = ((qint64)freq_hz * m_settings.m_LOppmTenths) / 10000000LL;
|
||||
freq_hz += df;
|
||||
|
||||
airspy_error rc = (airspy_error) airspy_set_freq(m_dev, static_cast<uint32_t>(freq_hz));
|
||||
|
||||
|
@ -227,7 +227,8 @@ bool HackRFInput::handleMessage(const Message& message)
|
||||
|
||||
void HackRFInput::setCenterFrequency(quint64 freq_hz)
|
||||
{
|
||||
freq_hz += (freq_hz * m_settings.m_LOppmTenths) / 10000000ULL;
|
||||
qint64 df = ((qint64)freq_hz * m_settings.m_LOppmTenths) / 10000000LL;
|
||||
freq_hz += df;
|
||||
|
||||
hackrf_error rc = (hackrf_error) hackrf_set_freq(m_dev, static_cast<uint64_t>(freq_hz));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user