1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

Lime: Report calibration errors in GUI. Check LPF is reasonable for up/downconversion.

This commit is contained in:
Jon Beniston
2022-08-27 17:08:03 +01:00
parent d1a4fca49b
commit d04b4840a9
13 changed files with 183 additions and 40 deletions
@@ -45,6 +45,7 @@ MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetStreamInfo, Message)
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetDeviceInfo, Message)
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportStreamInfo, Message)
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgStartStop, Message)
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgCalibrationResult, Message)
LimeSDRInput::LimeSDRInput(DeviceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
@@ -1227,19 +1228,20 @@ 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(),
double bw = std::max((double)m_settings.m_devSampleRate, 2500000.0); // Min supported calibration bandwidth is 2.5MHz
bool calibrationOK = LMS_Calibrate(m_deviceShared.m_deviceParams->getDevice(),
LMS_CH_RX,
m_deviceShared.m_channel,
bw,
0) != 0)
{
0) == 0;
if (!calibrationOK) {
qCritical("LimeSDRInput::applySettings: calibration failed on Rx channel %d", m_deviceShared.m_channel);
}
else
{
} else {
qDebug("LimeSDRInput::applySettings: calibration successful on Rx channel %d", m_deviceShared.m_channel);
}
if (m_guiMessageQueue) {
m_guiMessageQueue->push(MsgCalibrationResult::create(calibrationOK));
}
}
if (doLPCalibration)