Skip to content

Add support for AD7091R-2, AD7091R-4 and AD7091R-8 #64

Add support for AD7091R-2, AD7091R-4 and AD7091R-8

Add support for AD7091R-2, AD7091R-4 and AD7091R-8 #64

GitHub Actions / Test Results failed Sep 2, 2024 in 0s

1 fail, 1 244 skipped, 357 pass in 11m 50s

1 602 tests  ±0     357 ✅ +320   11m 50s ⏱️ - 18m 30s
    1 suites ±0   1 244 💤  -   2 
    1 files   ±0       1 ❌  - 318 

Results for commit 3241f77. ± Comparison against earlier commit 2aec079.

Annotations

Check warning on line 0 in test.test_ad7091r

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ad7091rx_rx_data[0-adi.ad7091rx] (test.test_ad7091r) failed

results.xml [took 3s]
Raw output
AttributeError: 'NoneType' object has no attribute 'channels'
test_dma_rx = <function dma_rx at 0x7f6326c8a5e0>, iio_uri = 'ip:10.1.0.144'
classname = 'adi.ad7091rx', channel = 0

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0])
    def test_ad7091rx_rx_data(test_dma_rx, iio_uri, classname, channel):
>       test_dma_rx(iio_uri, classname, channel)

test/test_ad7091r.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/dma_tests.py:49: in dma_rx
    sdr = eval(classname + "(uri='" + uri + "')")
<string>:1: in <module>
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ad7091r.ad7091rx object at 0x7f631e8ca7c0>, uri = 'ip:10.1.0.144'
device_name = 'ad7091r-2'

    def __init__(self, uri="", device_name=""):
    
        context_manager.__init__(self, uri, self._device_name)
    
        compatible_parts = [
            "ad7091r-2",
            "ad7091r-4",
            "ad7091r-8",
        ]
    
        self._ctrl = None
    
        if not device_name:
            device_name = compatible_parts[0]
        else:
            if device_name not in compatible_parts:
                raise Exception("Not a compatible device: " + device_name)
    
        # Selecting the device matching device_name AD7091RX family as working device.
        for device in self._ctx.devices:
            if device.name == device_name:
                self._ctrl = device
                self._rxadc = device
                break
    
>       for ch in self._ctrl.channels:
E       AttributeError: 'NoneType' object has no attribute 'channels'

adi/ad7091r.py:78: AttributeError