Skip to content

Commit

Permalink
Don't set uint64_t to -1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Diamond committed Jun 20, 2024
1 parent 7601749 commit 36f9f6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/fusion_engine_client/parsers/file_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class FileIndex(object):
# - Fractional timestamp is floored so time 123.4 becomes 123. The data read should not assume that an entry's
# timestamp is its exact time
_RAW_DTYPE = np.dtype([('int', '<u4'), ('type', '<u2'), ('offset', '<u8')])

_INVALID_INDEX = 0xFFFFFFFFFFFFFFFF
_DTYPE = np.dtype([('time', '<f8'), ('type', '<u2'), ('offset', '<u8'), ('message_index', '<u8')])

def __init__(self,
Expand Down Expand Up @@ -282,7 +282,7 @@ def save(self, index_path: str, data_path: str):
data = self._data
if data['type'][-1] != self.enum_class_invalid and data_path is not None:
file_size_bytes = os.stat(data_path).st_size
data = np.append(data, np.array((np.nan, self.enum_class_invalid, file_size_bytes, -1),
data = np.append(data, np.array((np.nan, self.enum_class_invalid, file_size_bytes, self._INVALID_INDEX),
dtype=FileIndex._DTYPE))

raw_data = FileIndex._to_raw(data)
Expand Down

0 comments on commit 36f9f6b

Please sign in to comment.