Skip to content

Commit

Permalink
pqm/harmonics: THD Windows test (TBD).
Browse files Browse the repository at this point in the history
Signed-off-by: andrei.danila <andrei.danila@analog.com>
  • Loading branch information
andreidanila1 committed Jun 25, 2024
1 parent 91f361d commit 0ad1bab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions plugins/pqm/include/pqm/harmonicsinstrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ private Q_SLOTS:
// keys - used for UI labels; values - context channels name
const QMap<QString, QString> m_chnls = {{"Ia", "ia"}, {"Ib", "ib"}, {"Ic", "ic"},
{"Ua", "ua"}, {"Ub", "ub"}, {"Uc", "uc"}};

double test_increment = 0.1;
};
} // namespace scopy::pqm
#endif // HARMONICSINSTRUMENT_H
3 changes: 2 additions & 1 deletion plugins/pqm/src/harmonicsinstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ void HarmonicsInstrument::onAttrAvailable(QMap<QString, QMap<QString, QString>>
m_yValues[ch].push_back(val.toDouble());
}
// thd labels update
m_labels[ch]->setValue(attr[ch]["thd"].toDouble());
m_labels[ch]->setValue(attr[ch]["thd"].toDouble() + test_increment);
}
test_increment += 0.1;
updateTable();
m_plot->replot();
if(m_singleBtn->isChecked()) {
Expand Down

0 comments on commit 0ad1bab

Please sign in to comment.