Skip to content

Commit cb55f3b

Browse files
ad9084 & jesd: change logs to debug instead of warning
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
1 parent aefe315 commit cb55f3b

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

plugins/ad9084/src/ad9084.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#include <preferenceshelper.h>
3535
#include <iio-widgets/iiowidgetbuilder.h>
3636

37+
Q_LOGGING_CATEGORY(CAT_AD9084, "AD9084");
38+
3739
using namespace scopy;
3840
using namespace scopy::ad9084;
3941

@@ -377,7 +379,7 @@ void Ad9084::loadCfir(QString path)
377379
QString content = readFile(path);
378380
size_t ret = iio_device_attr_write_raw(m_device, "cfir_config", content.toStdString().c_str(), content.size());
379381
if(ret < 0)
380-
qWarning() << "Failed to load CFIR CONFIG file to CFIR_CONFIG attr";
382+
qDebug(CAT_AD9084) << "Failed to load CFIR CONFIG file to CFIR_CONFIG attr";
381383
}
382384

383385
void Ad9084::loadPfir(QString path)
@@ -389,5 +391,5 @@ void Ad9084::loadPfir(QString path)
389391
QString content = readFile(path);
390392
size_t ret = iio_device_attr_write_raw(m_device, "pfilt_config", content.toStdString().c_str(), content.size());
391393
if(ret < 0)
392-
qWarning() << "Failed to load PFIR CONFIG file to PFILT_CONFIG attr";
394+
qDebug(CAT_AD9084) << "Failed to load PFIR CONFIG file to PFILT_CONFIG attr";
393395
}

plugins/ad9084/src/ad9084channel.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include <QLabel>
2727
#include <QVBoxLayout>
2828

29+
Q_LOGGING_CATEGORY(CAT_AD9084CHANNEL, "AD9084Channel");
30+
2931
using namespace scopy;
3032
using namespace scopy::ad9084;
3133

@@ -386,7 +388,7 @@ QString Ad9084Channel::phaseUItoDS(QString data)
386388
tmp_data.replace(" ", "");
387389
double d_data = tmp_data.toDouble(&ok);
388390
if(!ok) {
389-
qWarning() << QString("Invalid phase value in UI %1").arg(data);
391+
qDebug(CAT_AD9084CHANNEL) << QString("Invalid phase value in UI %1").arg(data);
390392
return "";
391393
}
392394
d_data = d_data * 1000;
@@ -398,7 +400,7 @@ QString Ad9084Channel::phaseDStoUI(QString data)
398400
bool ok = true;
399401
double d_data = data.toInt(&ok);
400402
if(!ok) {
401-
qWarning() << QString("Invalid phase value on device %1").arg(data);
403+
qDebug(CAT_AD9084CHANNEL) << QString("Invalid phase value on device %1").arg(data);
402404
return data;
403405
}
404406
d_data = d_data / 1000;
@@ -414,7 +416,7 @@ QString Ad9084Channel::frequencyUItoDS(QString data)
414416
tmp_data = tmp_data.simplified();
415417
double d_data = tmp_data.toDouble(&ok);
416418
if(!ok) {
417-
qWarning() << QString("Invalid frequency value in UI %1").arg(data);
419+
qDebug(CAT_AD9084CHANNEL) << QString("Invalid frequency value in UI %1").arg(data);
418420
return "";
419421
}
420422
d_data = d_data * 1e6;
@@ -426,7 +428,7 @@ QString Ad9084Channel::frequencyDStoUI(QString data)
426428
bool ok;
427429
double d_data = data.toDouble(&ok);
428430
if(!ok) {
429-
qWarning() << QString("Invalid frequency value on device %1").arg(data);
431+
qDebug(CAT_AD9084CHANNEL) << QString("Invalid frequency value on device %1").arg(data);
430432
return data;
431433
}
432434
d_data = d_data / 1e6;

plugins/ad9084/src/ad9084plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool AD9084Plugin::compatible(QString m_param, QString category)
4040
auto &&cp = ConnectionProvider::GetInstance();
4141
Connection *conn = cp->open(m_param);
4242
if(!conn) {
43-
qWarning() << "The context is not compatible with the AD9084 Plugin!";
43+
qDebug(CAT_AD9084PLUGIN) << "The context is not compatible with the AD9084 Plugin!";
4444
return ret;
4545
}
4646

plugins/jesdstatus/src/jesdstatusplugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bool JesdStatusPlugin::compatible(QString m_param, QString category)
3636
auto &&cp = ConnectionProvider::GetInstance();
3737
Connection *conn = cp->open(m_param);
3838
if(!conn) {
39-
qWarning() << "The context is not compatible with the JesdStatus Plugin!";
39+
qDebug(CAT_JESDSTATUSPLUGIN) << "The context is not compatible with the JesdStatus Plugin!";
4040
return ret;
4141
}
4242

0 commit comments

Comments
 (0)