Skip to content

Commit 18caa68

Browse files
committed
adrv9009: create ADRV9009 advanced tool
Signed-off-by: IonutMuthi <ionut.muthi@analog.com>
1 parent 0cd60ba commit 18caa68

File tree

6 files changed

+505
-4
lines changed

6 files changed

+505
-4
lines changed

packages/adrv9009/plugins/adrv9009plugin/CMakeLists.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,23 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
4747
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
4848
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
4949

50-
file(GLOB SRC_LIST src/*.cpp src/*.cc)
51-
file(GLOB HEADER_LIST include/${SCOPY_MODULE}/*.h include/${SCOPY_MODULE}/*.hpp)
50+
file(
51+
GLOB
52+
SRC_LIST
53+
src/*.cpp
54+
src/*.cc
55+
src/advanced/*.cpp
56+
src/advanced/*.cc
57+
)
58+
file(
59+
GLOB
60+
HEADER_LIST
61+
include/${SCOPY_MODULE}/*.h
62+
include/${SCOPY_MODULE}/*.hpp
63+
include/${SCOPY_MODULE}/advanced/*.h
64+
include/${SCOPY_MODULE}/advanced/*.hpp
65+
)
66+
5267
file(GLOB UI_LIST ui/*.ui)
5368

5469
set(ENABLE_TESTING ON)
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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 ADRV9009ADVANCED_H
22+
#define ADRV9009ADVANCED_H
23+
24+
#include "scopy-adrv9009plugin_export.h"
25+
#include <QWidget>
26+
#include <QStackedWidget>
27+
#include <QPushButton>
28+
#include <QButtonGroup>
29+
#include <QVBoxLayout>
30+
#include <tooltemplate.h>
31+
#include <animatedrefreshbtn.h>
32+
#include <iio.h>
33+
34+
namespace scopy::adrv9009 {
35+
36+
class SCOPY_ADRV9009PLUGIN_EXPORT Adrv9009Advanced : public QWidget
37+
{
38+
Q_OBJECT
39+
public:
40+
Adrv9009Advanced(iio_device *device, QWidget *parent = nullptr);
41+
~Adrv9009Advanced();
42+
43+
Q_SIGNALS:
44+
void readRequested();
45+
46+
private:
47+
iio_device *m_device = nullptr;
48+
ToolTemplate *m_tool;
49+
QVBoxLayout *m_mainLayout;
50+
AnimatedRefreshBtn *m_refreshButton;
51+
QStackedWidget *m_centralWidget;
52+
53+
// Navigation buttons (13 sections)
54+
QPushButton *m_clkSettingsBtn = nullptr;
55+
QPushButton *m_calibrationsBtn = nullptr;
56+
QPushButton *m_txSettingsBtn = nullptr;
57+
QPushButton *m_rxSettingsBtn = nullptr;
58+
QPushButton *m_orxSettingsBtn = nullptr;
59+
QPushButton *m_fhmSetupBtn = nullptr;
60+
QPushButton *m_paProtectionBtn = nullptr;
61+
QPushButton *m_gainSetupBtn = nullptr;
62+
QPushButton *m_agcSetupBtn = nullptr;
63+
QPushButton *m_gpioConfigBtn = nullptr;
64+
QPushButton *m_auxDacBtn = nullptr;
65+
QPushButton *m_jesd204SettingsBtn = nullptr;
66+
QPushButton *m_bistBtn = nullptr;
67+
68+
// Content widgets (placeholders for Phase 1)
69+
QWidget *m_clkSettings = nullptr;
70+
QWidget *m_calibrations = nullptr;
71+
QWidget *m_txSettings = nullptr;
72+
QWidget *m_rxSettings = nullptr;
73+
QWidget *m_orxSettings = nullptr;
74+
QWidget *m_fhmSetup = nullptr;
75+
QWidget *m_paProtection = nullptr;
76+
QWidget *m_gainSetup = nullptr;
77+
QWidget *m_agcSetup = nullptr;
78+
QWidget *m_gpioConfig = nullptr;
79+
QWidget *m_auxDac = nullptr;
80+
QWidget *m_jesd204Settings = nullptr;
81+
QWidget *m_bist = nullptr;
82+
83+
void setupUi();
84+
void createNavigationButtons();
85+
void createContentWidgets();
86+
QWidget *createPlaceholderWidget(const QString &sectionName);
87+
};
88+
89+
} // namespace scopy::adrv9009
90+
#endif // ADRV9009ADVANCED_H

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class SCOPY_ADRV9009PLUGIN_EXPORT Adrv9009WidgetFactory
3939
QWidget *parent = nullptr);
4040
static IIOWidget *createComboWidget(iio_device *device, QString attr, QString availableAttr, QString title,
4141
QWidget *parent = nullptr);
42+
static IIOWidget *createCustomComboWidget(iio_device *device, QString attr, QMap<QString, QString> *optionsMap,
43+
QString title, QWidget *parent = nullptr);
4244
static IIOWidget *createRangeWidget(iio_device *device, QString attr, QString range, QString title,
4345
QWidget *parent = nullptr);
4446
static IIOWidget *createReadOnlyWidget(iio_device *device, QString attr, QString title, bool compactMode = true,

0 commit comments

Comments
 (0)