LimeSDR: DeviceLimeSDRParams::open: set message level to critical when returning false status

pull/127/head
f4exb 2017-11-12 03:12:01 +01:00
rodzic 715222365f
commit 8e20d9f390
1 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -23,13 +23,13 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
if (LMS_Open(&m_dev, deviceStr, 0) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot open device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot open device " << deviceStr;
return false;
}
if (LMS_Init(m_dev) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot init device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot init device " << deviceStr;
return false;
}
@ -37,7 +37,7 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
if ((n = LMS_GetNumChannels(m_dev, LMS_CH_RX)) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot get the number of Rx channels for device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot get the number of Rx channels for device " << deviceStr;
return false;
}
else
@ -48,7 +48,7 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
if ((n = LMS_GetNumChannels(m_dev, LMS_CH_TX)) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot get the number of Tx channels for device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot get the number of Tx channels for device " << deviceStr;
return false;
}
else
@ -59,13 +59,13 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
if (LMS_GetLPFBWRange(m_dev, LMS_CH_RX, &m_lpfRangeRx) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot get the Rx LPF range for device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot get the Rx LPF range for device " << deviceStr;
return false;
}
if (LMS_GetLPFBWRange(m_dev, LMS_CH_TX, &m_lpfRangeTx) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot get the Tx LPF range for device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot get the Tx LPF range for device " << deviceStr;
return false;
}
@ -77,19 +77,19 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
if (LMS_GetLOFrequencyRange(m_dev, LMS_CH_TX, &m_loRangeTx) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot get the Tx LO range for device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot get the Tx LO range for device " << deviceStr;
return false;
}
if (LMS_GetSampleRateRange(m_dev, LMS_CH_RX, &m_srRangeRx) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot get the Rx sample rate range for device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot get the Rx sample rate range for device " << deviceStr;
return false;
}
if (LMS_GetSampleRateRange(m_dev, LMS_CH_TX, &m_srRangeTx) < 0)
{
qDebug() << "DeviceLimeSDRParams::open: cannot get the Tx sample rate range for device " << deviceStr;
qCritical() << "DeviceLimeSDRParams::open: cannot get the Tx sample rate range for device " << deviceStr;
return false;
}