Skip to content

Commit

Permalink
[FIX] Update condition to trim parameter list based on AD9081 configu…
Browse files Browse the repository at this point in the history
…ration

Signed-off-by: Julia Pineda <[email protected]>
  • Loading branch information
jpineda3 committed Aug 10, 2023
1 parent 13ddc17 commit 28352f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/test_ad9081.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ def scale_field(param_set, iio_uri):

dev = adi.ad9081(uri=iio_uri)
for field in param_set:
if param_set[field] is not list:
continue
existing_val = getattr(dev, field)
param_set[field] = param_set[field][0] * len(existing_val)
if isinstance(param_set[field], list):
existing_val = getattr(dev, field)
param_set[field] = [param_set[field][0]] * len(existing_val)
return param_set


Expand Down

0 comments on commit 28352f4

Please sign in to comment.