Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

namespace scopy::adrv9009 {

class AgcSetupWidget;

class SCOPY_ADRV9009PLUGIN_EXPORT Adrv9009Advanced : public QWidget
{
Q_OBJECT
Expand Down Expand Up @@ -74,7 +76,7 @@ class SCOPY_ADRV9009PLUGIN_EXPORT Adrv9009Advanced : public QWidget
QWidget *m_fhmSetup = nullptr;
QWidget *m_paProtection = nullptr;
QWidget *m_gainSetup = nullptr;
QWidget *m_agcSetup = nullptr;
AgcSetupWidget *m_agcSetup = nullptr;
QWidget *m_gpioConfig = nullptr;
QWidget *m_auxDac = nullptr;
QWidget *m_jesd204Settings = nullptr;
Expand All @@ -87,4 +89,4 @@ class SCOPY_ADRV9009PLUGIN_EXPORT Adrv9009Advanced : public QWidget
};

} // namespace scopy::adrv9009
#endif // ADRV9009ADVANCED_H
#endif // ADRV9009ADVANCED_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2025 Analog Devices Inc.
*
* This file is part of Scopy
* (see https://www.github.com/analogdevicesinc/scopy).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef AGCSETUPWIDGET_H
#define AGCSETUPWIDGET_H

#include <QWidget>
#include <iio.h>
#include <gui/widgets/menusectionwidget.h>

namespace scopy::adrv9009 {

class AgcSetupWidget : public QWidget
{
Q_OBJECT

public:
explicit AgcSetupWidget(iio_device *device, QWidget *parent = nullptr);
~AgcSetupWidget();

Q_SIGNALS:
void readRequested();

private:
void setupUi();
QWidget *createRxTddPowerGroup(int channel, QWidget *parent);
QWidget *createAgcRxChannelGroup(const QString &baseAttr, const QString &displayName, const QString &range,
QWidget *parent);

iio_device *m_device;
};

} // namespace scopy::adrv9009

#endif // AGCSETUPWIDGET_H
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/

#include "adrv9009advanced.h"
#include "advanced/agcsetupwidget.h"
#include <QFutureWatcher>
#include <QtConcurrent>
#include <QLabel>
Expand Down Expand Up @@ -237,7 +238,7 @@ void Adrv9009Advanced::createContentWidgets()
m_fhmSetup = createPlaceholderWidget("FHM Setup");
m_paProtection = createPlaceholderWidget("PA Protection");
m_gainSetup = createPlaceholderWidget("GAIN Setup");
m_agcSetup = createPlaceholderWidget("AGC Setup");
m_agcSetup = new AgcSetupWidget(m_device, this);
m_gpioConfig = createPlaceholderWidget("GPIO Config");
m_auxDac = createPlaceholderWidget("AUX DAC");
m_jesd204Settings = createPlaceholderWidget("JESD204 Settings");
Expand All @@ -260,6 +261,10 @@ void Adrv9009Advanced::createContentWidgets()

// Set first widget as current (CLK Settings)
m_centralWidget->setCurrentWidget(m_clkSettings);

if(m_agcSetup) {
connect(this, &Adrv9009Advanced::readRequested, m_agcSetup, &AgcSetupWidget::readRequested);
}
}

QWidget *Adrv9009Advanced::createPlaceholderWidget(const QString &sectionName)
Expand Down
Loading
Loading