Skip to content

Commit 6c5b3fc

Browse files
committed
adrv9009: adrv9009 advanced AGC setup
Signed-off-by: IonutMuthi <ionut.muthi@analog.com>
1 parent 1796ddf commit 6c5b3fc

File tree

4 files changed

+651
-2
lines changed

4 files changed

+651
-2
lines changed

packages/adrv9009/plugins/adrv9009plugin/include/adrv9009plugin/adrv9009advanced.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
namespace scopy::adrv9009 {
3535

36+
class AgcSetupWidget;
37+
3638
class SCOPY_ADRV9009PLUGIN_EXPORT Adrv9009Advanced : public QWidget
3739
{
3840
Q_OBJECT
@@ -81,7 +83,7 @@ class SCOPY_ADRV9009PLUGIN_EXPORT Adrv9009Advanced : public QWidget
8183
QWidget *m_fhmSetup = nullptr;
8284
QWidget *m_paProtection = nullptr;
8385
QWidget *m_gainSetup = nullptr;
84-
QWidget *m_agcSetup = nullptr;
86+
AgcSetupWidget *m_agcSetup = nullptr;
8587
QWidget *m_gpioConfig = nullptr;
8688
QWidget *m_auxDac = nullptr;
8789
QWidget *m_jesd204Settings = nullptr;
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright (c) 2025 Analog Devices Inc.
3+
*
4+
* This file is part of Scopy
5+
* (see https://www.github.com/analogdevicesinc/scopy).
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
#ifndef AGCSETUPWIDGET_H
22+
#define AGCSETUPWIDGET_H
23+
24+
#include <QWidget>
25+
#include <iio.h>
26+
#include <gui/widgets/menusectionwidget.h>
27+
28+
namespace scopy::adrv9009 {
29+
30+
class AgcSetupWidget : public QWidget
31+
{
32+
Q_OBJECT
33+
34+
public:
35+
explicit AgcSetupWidget(iio_device *device, QWidget *parent = nullptr);
36+
~AgcSetupWidget();
37+
38+
Q_SIGNALS:
39+
void readRequested();
40+
41+
private:
42+
void setupUi();
43+
QWidget *createAgcConfigurationWidget(QWidget *parent);
44+
QWidget *createAnalogPeakDetector(QWidget *parent);
45+
QWidget *createPowerMeasurementDetector(QWidget *parent);
46+
QWidget *createAgcRxChannelGroup(const QString &baseAttr, const QString &displayName, const QString &range,
47+
QWidget *parent);
48+
49+
iio_device *m_device;
50+
};
51+
52+
} // namespace scopy::adrv9009
53+
54+
#endif // AGCSETUPWIDGET_H

packages/adrv9009/plugins/adrv9009plugin/src/adrv9009advanced.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
#include "adrv9009advanced.h"
22+
#include "advanced/agcsetupwidget.h"
2223
#include <QFutureWatcher>
2324
#include <QtConcurrent>
2425
#include <QLabel>
@@ -252,7 +253,7 @@ void Adrv9009Advanced::createContentWidgets()
252253
m_fhmSetup = createPlaceholderWidget("FHM Setup");
253254
m_paProtection = createPlaceholderWidget("PA Protection");
254255
m_gainSetup = createPlaceholderWidget("GAIN Setup");
255-
m_agcSetup = createPlaceholderWidget("AGC Setup");
256+
m_agcSetup = new AgcSetupWidget(m_device, this);
256257
m_gpioConfig = createPlaceholderWidget("GPIO Config");
257258
m_auxDac = createPlaceholderWidget("AUX DAC");
258259
m_jesd204Settings = createPlaceholderWidget("JESD204 Settings");
@@ -275,6 +276,10 @@ void Adrv9009Advanced::createContentWidgets()
275276

276277
// Set first widget as current (CLK Settings)
277278
m_centralWidget->setCurrentWidget(m_clkSettings);
279+
280+
if(m_agcSetup) {
281+
connect(this, &Adrv9009Advanced::readRequested, m_agcSetup, &AgcSetupWidget::readRequested);
282+
}
278283
}
279284

280285
void Adrv9009Advanced::updateNavigationButtonsLayout()

0 commit comments

Comments
 (0)