diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-06-17 23:52:35 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-06-17 23:52:35 -0400 |
commit | b509c246a9d8a93b2f70b6f205ac3bf14d03d4fa (patch) | |
tree | 306bb3239299ee646157e93b210ae5da781dc660 /qolab/hardware | |
parent | 3caa835b22b6ba07481b272a32cab8daeb6b3f02 (diff) | |
download | qolab-b509c246a9d8a93b2f70b6f205ac3bf14d03d4fa.tar.gz qolab-b509c246a9d8a93b2f70b6f205ac3bf14d03d4fa.zip |
bug fix for the unit detection in response2numStr
Diffstat (limited to 'qolab/hardware')
-rw-r--r-- | qolab/hardware/scpi.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qolab/hardware/scpi.py b/qolab/hardware/scpi.py index 328e261..8564177 100644 --- a/qolab/hardware/scpi.py +++ b/qolab/hardware/scpi.py @@ -22,8 +22,9 @@ def response2numStr(strIn, firstSeparator=None, unit=None): rstr = spltStr[1] if unit is not None and unit != '': spltStr = re.split(unit, rstr) + if len(spltStr) == 1: + unit = None numberString = spltStr[0] - unit = spltStr[1] else: numberString = rstr return (prefix, numberString, unit) |