Skip to content

ad9081/_mc: fix type and first channel defaulting #659

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

Merged
merged 1 commit into from
Apr 16, 2025
Merged

Conversation

gastmaier
Copy link
Contributor

@gastmaier gastmaier commented Apr 9, 2025

Description

Some attributes are fetched from the first channel, and if multichip, from the first device:

  • ad9081: [...]
  • ad9081_mc: {'dev1': [...], 'dev2': [...],}

Due to the type change, examples/QuadMxFE_dual_example.py was broken.
Use the method overwrite to fix the type and behavior.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • HW test DualQuadMXFE

Test Configuration:

  • Hardware:
  • OS:

Documentation

If this is a new feature or example please mention or link any documentation. All new hardware interface classes require documentation.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have signed off all commits and they contain "Signed-off by: "
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

github-actions bot commented Apr 9, 2025

Test Results

1 676 tests  ±0     442 ✅ ±0   11m 58s ⏱️ -2s
    1 suites ±0   1 232 💤 ±0 
    1 files   ±0       2 ❌ ±0 

For more details on these failures, see this check.

Results for commit c829354. ± Comparison against base commit 6ad6c49.

This pull request removes 4 and adds 4 tests. Note that renamed tests count towards both.
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[1.0, 11.0, 22.5, 19.5, 10.5, 24.0, 15.5, 27.5, 29.0, 8.0]-depends={'gain_control_mode_chan0': 'spi', 'rx_ensm_mode_chan0': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[25.0, 21.0, 12.0, 16.5, 34.0, 25.5, 0.5, 28.5, 2.0, 25.0]-depends={'gain_control_mode_chan1': 'spi', 'rx_ensm_mode_chan1': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan0-val=[-23.75, -1.55, -3.4, -21.7, -5.8, -4.75, -33.55, -33.2, -37.15, -15.35]-depends={'atten_control_mode_chan0': 'spi'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan1-val=[-6.4, -35.0, -19.9, -39.15, -10.65, -30.95, -21.2, -9.55, -26.85, -0.5]-depends={'atten_control_mode_chan1': 'spi'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[15.5, 0.0, 7.5, 11.0, 11.5, 19.0, 1.0, 28.0, 12.0, 31.5]-depends={'gain_control_mode_chan1': 'spi', 'rx_ensm_mode_chan1': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[8.5, 15.5, 15.5, 15.0, 32.0, 16.0, 15.0, 24.5, 19.0, 6.5]-depends={'gain_control_mode_chan0': 'spi', 'rx_ensm_mode_chan0': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan0-val=[-2.75, -23.45, -32.3, -36.1, -13.85, -36.2, -24.2, -3.5, -17.35, -22.9]-depends={'atten_control_mode_chan0': 'spi'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan1-val=[-33.55, -1.05, -5.75, -16.45, -25.8, -4.55, -28.9, -17.4, -8.35, -37.75]-depends={'atten_control_mode_chan1': 'spi'}-classname=adi.adrv9002]

♻️ This comment has been updated with latest results.

@gastmaier gastmaier force-pushed the ad9081-mc branch 2 times, most recently from 4cfb284 to 7e64edd Compare April 10, 2025 08:18
Copy link
Collaborator

@tfcollins tfcollins left a comment

Choose a reason for hiding this comment

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

Please run the linter precommit tool

Some attributes are fetched from the first channel, and if multichip,
first device:

* ad9081: []
* ad9081_mc: {'dev1': [...], 'dev2': [...],}

Due to the type change, examples/QuadMxFE_dual_example.py was broken.
Use the method overwrite to fix the type and behavior.

Signed-off-by: Jorge Marques <[email protected]>
@gastmaier
Copy link
Contributor Author

Hi, I run again with the exact black version

the differences from the updated #660 to the current version (broken for newer python) are pretty much the force push diff https://github.com/analogdevicesinc/pyadi-iio/compare/7e64edd25d2e38956f9d6ad254510402c2deebf7..c829354697aa6ff7507775a3850efe02ee7ffd89

@gastmaier gastmaier requested a review from tfcollins April 15, 2025 10:02
Copy link

Generated documentation for this PR is available at Link

@tfcollins tfcollins merged commit 231eff1 into main Apr 16, 2025
49 of 52 checks passed
@tfcollins tfcollins deleted the ad9081-mc branch April 16, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants