1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

Merge pull request #1391 from srcejon/fix_1389

Lime - Partially implement #1389
This commit is contained in:
Edouard Griffiths 2022-08-21 22:07:52 +02:00 committed by GitHub
commit 3c7e7974aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 6 deletions

View File

@ -1066,11 +1066,12 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
if (doCalibration)
{
double bw = std::min((double)m_settings.m_devSampleRate, 2500000.0); // Min supported calibration bandwidth is 2.5MHz
if (LMS_Calibrate(m_deviceShared.m_deviceParams->getDevice(),
LMS_CH_TX,
m_deviceShared.m_channel,
m_settings.m_devSampleRate,
0) < 0)
bw,
0) != 0)
{
qCritical("LimeSDROutput::applySettings: calibration failed on Tx channel %d", m_deviceShared.m_channel);
}

View File

@ -151,8 +151,10 @@ void LimeSDROutputGUI::updateFrequencyLimits()
m_limeSDROutput->getLORange(minF, maxF);
qint64 minLimit = minF/1000 + deltaFrequency;
qint64 maxLimit = maxF/1000 + deltaFrequency;
// Min freq is 30MHz - NCO must be used to go below this
qint64 minFreq = m_settings.m_ncoEnable ? 30000 + m_settings.m_ncoFrequency/1000 : 30000;
minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
minLimit = minLimit < minFreq ? minFreq : minLimit > 9999999 ? 9999999 : minLimit;
maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
qDebug("LimeSDROutputGUI::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
@ -515,6 +517,7 @@ void LimeSDROutputGUI::on_centerFrequency_changed(quint64 value)
void LimeSDROutputGUI::on_ncoFrequency_changed(qint64 value)
{
m_settings.m_ncoFrequency = value;
updateFrequencyLimits();
setCenterFrequencyDisplay();
sendSettings();
}
@ -522,6 +525,7 @@ void LimeSDROutputGUI::on_ncoFrequency_changed(qint64 value)
void LimeSDROutputGUI::on_ncoEnable_toggled(bool checked)
{
m_settings.m_ncoEnable = checked;
updateFrequencyLimits();
setCenterFrequencyDisplay();
sendSettings();
}

View File

@ -64,6 +64,8 @@ Transmission latency depends essentially in the delay in the sample FIFO. The si
This is the center frequency of transmission in kHz.
The NCO must be enabled with a negative value in order to set this below 30MHz.
<h3>3A: Center frequency units</h3>
This is the center frequency units thus kHz (fixed)
@ -171,6 +173,8 @@ The LMS7002M uses the same clock for both the ADCs and DACs therefore this sampl
This is the Tx hardware filter bandwidth in kHz in the LMS7002M device for the given channel. Boundaries are updated automatically but generally are from 5 to 130 MHz in 1 kHz steps. Use the wheels to adjust the value. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.
The filter is centered at the LO frequency, so if using the NCO to achieve frequencies below 30MHz, the filter bandwidth needs to be set wide enough for not only your desired signal but the offset from the 30MHz LO as well.
<h3>12: TSP FIR filter toggle</h3>
The TSP in the LMS7002M chip has a FIR filter chain per channel. Use this button to activate or deactivate the TSP FIR filter.

View File

@ -1227,11 +1227,12 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
if (doCalibration)
{
double bw = std::min((double)m_settings.m_devSampleRate, 2500000.0); // Min supported calibration bandwidth is 2.5MHz
if (LMS_Calibrate(m_deviceShared.m_deviceParams->getDevice(),
LMS_CH_RX,
m_deviceShared.m_channel,
m_settings.m_devSampleRate,
0) < 0)
bw,
0) != 0)
{
qCritical("LimeSDRInput::applySettings: calibration failed on Rx channel %d", m_deviceShared.m_channel);
}

View File

@ -262,8 +262,10 @@ void LimeSDRInputGUI::updateFrequencyLimits()
m_limeSDRInput->getLORange(minF, maxF);
qint64 minLimit = minF/1000 + deltaFrequency;
qint64 maxLimit = maxF/1000 + deltaFrequency;
// Min freq is 30MHz - NCO must be used to go below this
qint64 minFreq = m_settings.m_ncoEnable ? 30000 + m_settings.m_ncoFrequency/1000 : 30000;
minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
minLimit = minLimit < minFreq ? minFreq : minLimit > 9999999 ? 9999999 : minLimit;
maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
qDebug("LimeSDRInputGUI::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
@ -548,6 +550,7 @@ void LimeSDRInputGUI::on_centerFrequency_changed(quint64 value)
void LimeSDRInputGUI::on_ncoFrequency_changed(qint64 value)
{
m_settings.m_ncoFrequency = value;
updateFrequencyLimits();
setCenterFrequencyDisplay();
sendSettings();
}
@ -555,6 +558,7 @@ void LimeSDRInputGUI::on_ncoFrequency_changed(qint64 value)
void LimeSDRInputGUI::on_ncoEnable_toggled(bool checked)
{
m_settings.m_ncoEnable = checked;
updateFrequencyLimits();
setCenterFrequencyDisplay();
sendSettings();
}

View File

@ -24,6 +24,8 @@ The top and bottom bars of the device window are described [here](../../../sdrgu
This is the center frequency of reception in kHz.
The NCO must be enabled with a negative value in order to set this below 30MHz.
<h4>1.2: Start/Stop</h4>
Device start / stop button.
@ -133,6 +135,8 @@ The LMS7002M uses the same clock for both the ADCs and DACs therefore this sampl
This is the Rx hardware filter bandwidth in kHz in the LMS7002M device for the given channel. Boundaries are updated automatically but generally are from 1.4 to 130 MHz in 1 kHz steps. Use the wheels to adjust the value. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.
The filter is centered at the LO frequency, so if using the NCO to achieve frequencies below 30MHz, the filter bandwidth needs to be set wide enough for not only your desired signal but the offset from the 30MHz LO as well.
<h4>7.2: TSP FIR filter toggle</h4>
The TSP in the LMS7002M chip has a FIR filter chain per channel. Use this button to activate or deactivate the TSP FIR filter.