Skip to content

Commit

Permalink
Fixed incorrect default calcsize() for variable-sized messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamshapiro0 committed Mar 25, 2024
1 parent 5664946 commit 51794ba
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions python/fusion_engine_client/messages/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,8 @@ def unpack(self, buffer: bytes, offset: int = 0, message_version: int = _UNSPECI
else:
raise NotImplementedError('unpack() not implemented.')

@classmethod
def calcsize(cls) -> int:
construct = getattr(cls, 'Construct', None)
if construct is not None:
return construct.sizeof()
else:
raise NotImplementedError('calcsize() not implemented.')
def calcsize(self) -> int:
raise NotImplementedError('calcsize() not implemented.')

def get_p1_time(self) -> Timestamp:
measurement_details = getattr(self, 'details', None)
Expand Down

0 comments on commit 51794ba

Please sign in to comment.