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

Conversation

JJuanill
Copy link

Adding implementation of ADMT4000 Harmonic Calibration plugin to Scopy

@andrei47w
Copy link
Contributor

andrei47w commented Feb 3, 2025

I see the PR is still in progess, but I noticed a few things that might need changing before this is ready for complete review.

  • create an xml for emulator so we can test the plugin without needing the hardware (https://github.com/analogdevicesinc/iio-emu/tree/main/tools)
  • format code using clang-format version 10 (run tools/format.sh)
  • revert change in the main CMakeLists.txt
  • admt/CMakeLists:
    • remove unused liked libs from cmake (scopy-gr-util, scopy-iio-widgets)
    • remove UI_LIST uses
  • all larger stylesheets from inside .cpp files should be moved to qss using the style infrastructure
  • migrate admtstylehelper.cpp to qss style and use Style::getChannelColor instead of redefining colors
  • HorizontalSpinBox::setEnabled argument should be bool ?
  • rebase with main

Copy link
Contributor

@andrei47w andrei47w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can include the emulator xml you generated in this PR as is, since iio-emu does not support regmaps. Also use the xml to test the plugin as a demo (functionalities are not expected to work, but it should not crash)

Fix the failing tests:
https://github.com/analogdevicesinc/scopy/actions/runs/13560535173/job/37910054758?pr=1878#step:5:1307

@JJuanill JJuanill changed the base branch from dev to main March 10, 2025 07:20
@JJuanill JJuanill force-pushed the dev_admt branch 2 times, most recently from 35bc8d7 to 82eb140 Compare March 10, 2025 07:48
@JJuanill JJuanill requested a review from andrei47w March 13, 2025 05:14
@JJuanill JJuanill force-pushed the dev_admt branch 6 times, most recently from 229c485 to aa54bcf Compare March 20, 2025 01:16
@JJuanill JJuanill requested a review from andrei47w March 20, 2025 01:51
@adisuciu
Copy link
Contributor

This looks good ..

Can you clean up the commit history a little bit ?
We can also squash and have a single commit for this pull request.

- Added logic for compatible
- Changed Harmonic Calibration icon
- Changed plugin description

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
U-ANALOG\JJuanill and others added 27 commits April 21, 2025 09:37
- Added style for checkbox LED

Signed-off-by: U-ANALOG\JJuanill <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: U-ANALOG\JJuanill <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: U-ANALOG\JJuanill <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Migrating styles to separate .qss
- Changed status LED behavior

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Removed UI_LIST uses

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Added sequence mode 2 graph checkboxes
- Updated calibration graphs to align with styles infrastructure
- Added formatter for graphs
- Added colored checkbox
- Disabled SPI CRC and Flag
- Set default motor RPM to 30
- Changed uint16_t to quint16 for slot and signals

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Removed ADMTStyleHelper and dependencies
- Removed unused horizontal spinbox
- Updated labels to subtle style
- Set fixed size for custom switch

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Removed graph update interval
- Optimized GUI updates using slots and signals
- Removed threaded UI update for acquisition tab

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Code cleanup

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
…isters

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Code cleanup potential memory leaks
- Disabled ECC on startup
- Adusted layout for calibration tab
- Replaced maps with QMap

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Revised displayed turn count in acquisition tab

Signed-off-by: John Lloyd Juanillo <[email protected]>
Signed-off-by: JJuanill <[email protected]>
- Removed raw motor target and current position
- Added reset motor position button
- Revised ABS angle turn count calculation
- Code cleanup

Signed-off-by: John Lloyd Juanillo <[email protected]>

Signed-off-by: JJuanill <[email protected]>
- Added call to stop reset to zero
- Clear harmonic registers on init

Signed-off-by: John Lloyd Juanillo <[email protected]>

Signed-off-by: JJuanill <[email protected]>
- Revised CSV saving format
- Included post calibration samples, corrected errors, and FFTs

Signed-off-by: John Lloyd Juanillo <[email protected]>

Signed-off-by: JJuanill <[email protected]>
- Changed CNV page to uint8_t
- Added registry read for rotation, angle, count, temp channels
- Added disable state for lineedit
- Changed error value for double to UINT32_MAX

Signed-off-by: John Lloyd Juanillo <[email protected]>

Signed-off-by: JJuanill <[email protected]>
- Added conversion restart on calibration
- Fixed bug when deselect all graph channel in acquisition
- Changed ramp mode variable for reset motor to zero
- Remove unused methods

Signed-off-by: John Lloyd Juanillo <[email protected]>

Signed-off-by: JJuanill <[email protected]>
Signed-off-by: John Lloyd Juanillo <[email protected]>

Signed-off-by: JJuanill <[email protected]>
- Added disable state for colored checkbox

Signed-off-by: JJuanill <[email protected]>
- Changed fast motor RPM to 200

Signed-off-by: JJuanill <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants