Skip to content

Commit 7f3a861

Browse files
luiztaufferzm711
andauthored
Update neo/rawio/blackrockrawio.py
Co-authored-by: Zach McKenzie <[email protected]>
1 parent eaaff57 commit 7f3a861

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

neo/rawio/blackrockrawio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,9 @@ def __read_nev_data(self, nev_data_masks, nev_data_types):
12541254
# read all raw data packets and markers
12551255
dt0 = [("timestamp", ts_format), ("packet_id", "uint16"), ("value", f"S{data_size - header_skip}")]
12561256

1257-
# expected number of data packets
1257+
# expected number of data packets. We are not sure why, but it seems we can get partial data packets
1258+
# based on blackrock's own code this is okay so applying an int to round down is necessary to obtain the
1259+
# memory map of full packets and toss the partial packet.
12581260
n_packets = int(
12591261
(self.__get_file_size(filename) - header_size) / data_size
12601262
)

0 commit comments

Comments
 (0)