Skip to content

Commit

Permalink
ReservedParameter: do not advance the cursor position twice
Browse files Browse the repository at this point in the history
`DecodeState.extract_atomic_value()` already does this. This caused
decode errors for objects that contained reserved parameters...

Signed-off-by: Andreas Lauser <[email protected]>
Signed-off-by: Christian Hackenbeck <[email protected]>
  • Loading branch information
andlaus committed Mar 13, 2024
1 parent 90c2bff commit d69a7b2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions odxtools/parameters/reservedparameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ def get_coded_value_as_bytes(self, encode_state: EncodeState) -> bytes:

@override
def _decode_positioned_from_pdu(self, decode_state: DecodeState) -> ParameterValue:
decode_state.cursor_byte_position += ((self.bit_position or 0) + self.bit_length + 7) // 8

return decode_state.extract_atomic_value(
bit_length=self.bit_length,
base_data_type=DataType.A_UINT32,
Expand Down

0 comments on commit d69a7b2

Please sign in to comment.