Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/instruments/abstract_instruments/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def binblockread(self, data_width, fmt=None):
as EOL terminators naturally can not be used in binary transfers.

The format is as follows:
#{number of following digits:1-9}{num of bytes to be read}{data bytes}
#{number of following digits:1-F}{num of bytes to be read}{data bytes}

:param int data_width: Specify the number of bytes wide each data
point is. One of [1,2,4].
Expand All @@ -291,7 +291,7 @@ def binblockread(self, data_width, fmt=None):
)
else:
# Read in the num of digits for next part
digits = int(self._file.read_raw(1))
digits = int(self._file.read_raw(1), 16)

# Read in the num of bytes to be read
num_of_bytes = int(self._file.read_raw(digits))
Expand All @@ -313,7 +313,7 @@ def binblockread(self, data_width, fmt=None):
tries -= 1
if tries == 0:
raise OSError(
"Did not read in the required number of bytes"
"Did not read in the required number of bytes "
"during binblock read. Got {}, expected "
"{}".format(len(data), num_of_bytes)
)
Expand Down
Loading