Skip to content

plugin: Add ADMT Plugin for ADMT4000 #1878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 112 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
f50531f
admt: Configured ADMT plugin
JJuanill May 30, 2024
b8fca81
admt: Added test GUI textbox and button for rotation, count, and angle
JJuanill Jun 3, 2024
412b67d
admt: Renamed plugin and include directories
JJuanill Jun 6, 2024
557997e
admt: Connected button to output to text field
JJuanill Jun 10, 2024
ce5de5e
admt: Added GRTimePlotAddon
JJuanill Jun 12, 2024
17aa764
admt: Implemented channel control and init methods
JJuanill Jun 14, 2024
671e0b1
admt: Update CMakeList
JJuanill Jun 18, 2024
65741a1
admt: Added historical graph
JJuanill Jun 26, 2024
2f4d1bf
admt: Implemented GUI interface and controller
JJuanill Jul 9, 2024
6f27ed0
admt: Fixed axis scales when changing displayed graph
JJuanill Jul 9, 2024
0409458
admt: Added calibration tab
JJuanill Jul 16, 2024
905081a
admt: Implemented export and import raw calibration data
JJuanill Jul 18, 2024
ae01308
admt: Implemented calibration routine in controller
JJuanill Jul 23, 2024
c882759
admt: Layout for motor controls
JJuanill Jul 31, 2024
2400d1f
admt: Added stepper motor control for calibration
JJuanill Aug 9, 2024
05d14a4
admt: Adjusted Calibration GUI
JJuanill Aug 15, 2024
d4ea2c8
admt: Added read device registry
JJuanill Aug 15, 2024
96a2d40
admt: Removed raw motor controls
JJuanill Aug 29, 2024
bebf35c
admt: Added registers tab
JJuanill Sep 2, 2024
901004c
admt: Added Sine and Cosine channels to raw calibration graph
JJuanill Sep 5, 2024
5a512f1
admt: Added calibration graph toggles
JJuanill Sep 6, 2024
23e813e
admt: Refactored read and write to registry
JJuanill Sep 9, 2024
88e99d8
admt: Implement compatible selected plugin
JJuanill Sep 10, 2024
014bc10
admt: Adjusted UI
JJuanill Sep 10, 2024
a94f677
admt: Set debug to false
JJuanill Sep 11, 2024
95fdbb9
admt: Implemented status indicators for registers in utility tab
JJuanill Sep 25, 2024
cdced43
Update admtcontroller.cpp
RainDalena Sep 25, 2024
3d4b2ed
admt: Implemented sequence read and write
JJuanill Sep 26, 2024
8d2358a
admt: Corrected string output for binary and hex values
JJuanill Sep 26, 2024
12c2529
admt: Fixed pre-calibration FFT calculation
JJuanill Sep 26, 2024
044e564
admt: Fixed replot pre-calibration FFT graph after clear
JJuanill Sep 26, 2024
7daae5c
admt: Implemented GMR reset
JJuanill Sep 27, 2024
72cd7bf
admt: Added min and max for line edit
JJuanill Oct 7, 2024
49d3068
Update admtcontroller.cpp
RainDalena Oct 7, 2024
712b002
Update admtcontroller.cpp
RainDalena Oct 7, 2024
d545759
admt: Implemented GPIO Control
JJuanill Oct 8, 2024
27b8d15
admt: Implemented multithread for calibration data sampling
JJuanill Oct 10, 2024
b0c1cc2
Update admtcontroller.cpp
RainDalena Oct 10, 2024
828a02b
admt: Fixed controls for post calibration data
JJuanill Oct 10, 2024
87d3e5f
Update admtcontroller.cpp
RainDalena Oct 10, 2024
d8de554
Update admtcontroller.cpp
RainDalena Oct 10, 2024
31a1b5a
Mag FFT and Harmonic Cal Algorithm adjustments.
RainDalena Oct 11, 2024
54d1aa5
admt: Adjusted calibration and post calibration behaviors
JJuanill Oct 14, 2024
1bcae9a
Wrap angle errors to [-π, π] range
JJuanill Oct 15, 2024
f959618
Update admtcontroller.cpp
RainDalena Oct 15, 2024
33f3a42
Update admtcontroller.cpp
RainDalena Oct 16, 2024
a8d75ac
Refactor angle error calculations and FFT in ADMTController
JJuanill Oct 16, 2024
d065bf9
Update admtcontroller.cpp
RainDalena Oct 16, 2024
73dca00
Update admtcontroller.cpp
RainDalena Oct 16, 2024
c04c573
Update admtcontroller.cpp
RainDalena Oct 16, 2024
6ebd3a9
Revert "Update admtcontroller.cpp"
RainDalena Oct 17, 2024
71deaee
Revert "Update admtcontroller.cpp"
RainDalena Oct 17, 2024
8b03765
Revert "Update admtcontroller.cpp"
RainDalena Oct 17, 2024
f134c33
Revert "Refactor angle error calculations and FFT in ADMTController"
RainDalena Oct 17, 2024
5b27bfc
Revert "Update admtcontroller.cpp"
RainDalena Oct 17, 2024
9111cf5
admt: Fixed admtcontroller.h
JJuanill Oct 22, 2024
3d28246
admt: Adjusted UI to hide and show specific fault registers based on …
JJuanill Oct 30, 2024
bf20a45
admt: Included motor controls in acquisition tab
JJuanill Oct 31, 2024
4bcbe29
admt: Merge to latest dev build
JJuanill Nov 4, 2024
1077522
admt: Hide MT Diagnostic indicator and register
JJuanill Nov 4, 2024
f382e50
admt: Hide registers on sequence mode
JJuanill Nov 4, 2024
bd8e165
admt: Updated graph style
JJuanill Nov 5, 2024
5718ea2
admt: Add read all registers
JJuanill Nov 6, 2024
77d144a
admt: Reverted changes to calibration samples graph
doun-doughnut Nov 12, 2024
747e20c
admt: Initial implement of style helper
doun-doughnut Nov 12, 2024
fcc372c
admt: Included import samples in calibration data
doun-doughnut Nov 13, 2024
4bd1a04
admt: Initial implement of acquisition graph data
doun-doughnut Nov 13, 2024
d16c81d
admt: Added state for MT Diagnostics
doun-doughnut Nov 15, 2024
93e9e29
admt: Removed resizing acquisition list
doun-doughnut Nov 15, 2024
7d8d716
admt: Improved stability for applying sequence
JJuanill Nov 25, 2024
a02a443
admt: Write zeros to fault register before read
JJuanill Nov 25, 2024
68fc009
admt: Added fine control for DIGIOEN register
JJuanill Nov 26, 2024
12247bf
admt: Applied fixes for calibration
JJuanill Nov 27, 2024
65c67bc
admt: Implemented multi-channel acquisition graph
JJuanill Dec 2, 2024
dd1e049
admt: Fixed crashing issue when calibrating
JJuanill Dec 5, 2024
15329de
admt: Implemented mapping and graph for acquisition graph variables
JJuanill Jan 7, 2025
156447f
admt: Implemented multi-thread operations to acquisition tab
JJuanill Jan 8, 2025
99a122a
admt: Implemented device status fault monitoring
JJuanill Jan 10, 2025
64af56a
admt: Code cleanup
JJuanill Jan 15, 2025
0366903
admt: Added disable states for tab widget while calibrating
JJuanill Jan 15, 2025
3ea2220
admt: Adjusted GPIO Monitor and Control
JJuanill Jan 16, 2025
8a109ff
admt: Applied latest dev branch
JJuanill Jan 17, 2025
8b4e39d
admt: Added spinbox to new style property
JJuanill Jan 22, 2025
b5daa22
admt: Replaced timers with threads for utility tab
Jan 31, 2025
9db87d8
admt: Added license headers
Jan 31, 2025
3bcf131
admt: Cleanup license headers for remaining files
Jan 31, 2025
ed51605
admt: Added regmap debug method
JJuanill Feb 3, 2025
7d65183
admt: Implemented continuous calibration
JJuanill Feb 26, 2025
d0d7de4
admt: Removed unused libraries in CMakeLists
JJuanill Feb 26, 2025
dce09f3
admt: Format C++ and CMakeLists
JJuanill Feb 27, 2025
32930e8
admt: Applied clang-format for C++ files
JJuanill Feb 27, 2025
ebd1329
admt: Styles cleanup
JJuanill Mar 7, 2025
84a1e98
admt: Include XML IIO Emulator for ADMT4000
JJuanill Mar 9, 2025
86effff
admt: Migrated styles
JJuanill Mar 12, 2025
3148c4e
admt: Added slot and signal for acquisition tab data
JJuanill Mar 12, 2025
166848d
admt: Moved XML emulator file
JJuanill Mar 13, 2025
97b1027
admt: Added slot and signal for calibration UI updates
JJuanill Mar 13, 2025
ad213e6
admt: Handled validations for register maps for emulator
JJuanill Mar 13, 2025
6272a42
resources: Added ADMT4000 emulator device
JJuanill Mar 13, 2025
e805fa8
admt: Disable ECC when configuring DIGIOEN, GENERAL, and Harmonic reg…
JJuanill Mar 14, 2025
b915d47
admt: Use general_use_native_dialogs preference
JJuanill Mar 17, 2025
c464b91
admt: Resolve tests
JJuanill Mar 17, 2025
2028da1
admt: Fix displayed turn count
JJuanill Mar 28, 2025
98ba8c6
admt: Changed samples per cycle to total samples in calibration tab
JJuanill Mar 31, 2025
bf024c6
admt: Added turn count to acquisition tab
JJuanill Apr 2, 2025
aafd094
admt: Inverted CW and CCW motor direction
JJuanill Apr 3, 2025
381b841
admt: Save calibration coeff. hex code to CSV
JJuanill Apr 3, 2025
0ae5e80
admt: Updated CNV change method
JJuanill Apr 10, 2025
b968ad9
admt: Fixed sequence configuration
JJuanill Apr 10, 2025
5652da8
admt: Updated channel read value
JJuanill Apr 14, 2025
fd704c3
admt: Updated channel read
JJuanill Apr 28, 2025
63eb05a
admt: Added mixed read mode
JJuanill Apr 29, 2025
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
2 changes: 2 additions & 0 deletions gui/style/json/Harmonic dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
"interactive_primary_hover": "#C6D8F6",
"interactive_primary_pressed": "#abc4ed",
"interactive_primary_disabled": "#0067B9",
"interactive_primary_faint": "#00549A",
"interactive_secondary_idle": "#92BEFC",
"interactive_secondary_hover": "#C6D8F6",
"interactive_secondary_pressed": "#abc4ed",
"interactive_secondary_disabled": "#4B545D",
"interactive_silent_hover": "#3A424B",
"content_default": "#FFFFFF",
"content_subtle": "#B7BBC3",
"content_silent": "#848B95",
Expand Down
4 changes: 3 additions & 1 deletion gui/style/json/Harmonic light.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
"interactive_primary_hover": "#00427A",
"interactive_primary_pressed": "#003969",
"interactive_primary_disabled": "#92BEFC",
"interactive_primary_faint": "#C6D8F6",
"interactive_secondary_idle": "#0067B9",
"interactive_secondary_hover": "#00427A",
"interactive_secondary_pressed": "#003969",
"interactive_secondary_disabled": "#d5d7db",
"interactive_secondary_disabled": "#c1c3c7",
"interactive_silent_hover": "#D5D8DC",
"content_default": "#101820",
"content_subtle": "#5E6773",
"content_silent": "#9FA4AD",
Expand Down
2 changes: 2 additions & 0 deletions gui/style/json/Scopy.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
"interactive_primary_hover": "#697EFF",
"interactive_primary_pressed": "#7084fa",
"interactive_primary_disabled": "#2E3874",
"interactive_primary_faint": "#00549A",
"interactive_secondary_idle": "#5b5b6b",
"interactive_secondary_hover": "#535361",
"interactive_secondary_pressed": "#4c4c59",
"interactive_secondary_disabled": "#35353d",
"interactive_silent_hover": "#3A424B",
"content_default": "#e1e1e3",
"content_subtle": "#bac2cc",
"content_silent": "#848491",
Expand Down
6 changes: 6 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ option(ENABLE_PLUGIN_SWIOT "Enable SWIOT plugin" ON)
option(ENABLE_PLUGIN_PQM "Enable PQM plugin" ON)
option(ENABLE_PLUGIN_DATALOGGER "Enable DATALOGGER plugin" ON)
option(ENABLE_PLUGIN_DAC "Enable DAC plugin" ON)
option(ENABLE_PLUGIN_ADMT "Enable ADMT plugin" ON)

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCOPY_PLUGIN_BUILD_PATH})
Expand Down Expand Up @@ -125,6 +126,11 @@ if(ENABLE_PLUGIN_M2K)
endif()
endif()

if(ENABLE_PLUGIN_ADMT)
add_subdirectory(admt)
list(APPEND PLUGINS ${ADMT_TARGET_NAME})
endif()

install(TARGETS ${PLUGINS} LIBRARY DESTINATION ${SCOPY_PLUGIN_INSTALL_PATH})

set(PLUGINS ${PLUGINS} PARENT_SCOPE)
Expand Down
2 changes: 2 additions & 0 deletions plugins/admt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include/admt/scopy-admt_export.h
include/admt/scopy-admt_config.h
113 changes: 113 additions & 0 deletions plugins/admt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#
# Copyright (c) 2024 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/>.
#

cmake_minimum_required(VERSION 3.9)

set(SCOPY_MODULE admt)

message(STATUS "building plugin: " ${SCOPY_MODULE})

project(scopy-${SCOPY_MODULE} VERSION 0.1 LANGUAGES CXX)

set(PLUGIN_DISPLAY_NAME "ADMT")
set(PLUGIN_DESCRIPTION "Plugin for ADMT Harmonic Calibration")

include(GenerateExportHeader)

# TODO: split stylesheet/resources and add here TODO: export header files correctly

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)

file(
GLOB
SRC_LIST
src/*.cpp
src/*.cc
src/widgets/*.cpp
)
file(
GLOB
HEADER_LIST
include/${SCOPY_MODULE}/*.h
include/${SCOPY_MODULE}/*.hpp
include/${SCOPY_MODULE}/widgets/*.h
)

set(ENABLE_TESTING ON)
if(ENABLE_TESTING)
add_subdirectory(test)
endif()

set(PROJECT_SOURCES ${SRC_LIST} ${HEADER_LIST})
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS REQUIRED Widgets Core)

qt_add_resources(PROJECT_RESOURCES res/resources.qrc)

add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCES} ${PROJECT_RESOURCES})

generate_export_header(
${PROJECT_NAME} EXPORT_FILE_NAME ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/${PROJECT_NAME}_export.h
)

include(ScopyStyle)
generate_style("--plugin" ${CMAKE_CURRENT_SOURCE_DIR}/style ${CMAKE_CURRENT_SOURCE_DIR}/include/admt)

set(INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE} ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}
${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE} ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/widgets
)

configure_file(
include/${SCOPY_MODULE}/scopy-${SCOPY_MODULE}_config.h.cmakein
${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/scopy-${SCOPY_MODULE}_config.h @ONLY
)

target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(${PROJECT_NAME} PRIVATE ${INCLUDE_DIRECTORIES})

target_include_directories(${PROJECT_NAME} PUBLIC scopy-pluginbase scopy-gui)
target_include_directories(${PROJECT_NAME} PRIVATE ${IIO_INCLUDE_DIRS} scopy-gui scopy-iioutil)

target_link_libraries(
${PROJECT_NAME}
PUBLIC Qt::Widgets
Qt::Core
scopy-pluginbase
scopy-gui
scopy-iioutil
)

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(INSTALLER_DESCRIPTION "${PLUGIN_DISPLAY_NAME} ${PLUGIN_DESCRIPTION}")
configureinstallersettings(${SCOPY_MODULE} ${INSTALLER_DESCRIPTION} TRUE)
endif()

set(ADMT_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE)
Loading