Skip to content

Commit

Permalink
Merge pull request #459 from jpineda3/test-fix-ad9081
Browse files Browse the repository at this point in the history
Update AD9081 scale_field method to trim parameter list
  • Loading branch information
tfcollins authored Aug 10, 2023
2 parents e89dc87 + 28352f4 commit d5dc0bd
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 d5dc0bd

Please sign in to comment.