From d69a7b2e16ae390a1f4e1ca25d354e7fefa7e1f8 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Wed, 13 Mar 2024 16:09:03 +0100 Subject: [PATCH] ReservedParameter: do not advance the cursor position twice `DecodeState.extract_atomic_value()` already does this. This caused decode errors for objects that contained reserved parameters... Signed-off-by: Andreas Lauser Signed-off-by: Christian Hackenbeck --- odxtools/parameters/reservedparameter.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/odxtools/parameters/reservedparameter.py b/odxtools/parameters/reservedparameter.py index 56af745b..c44b3482 100644 --- a/odxtools/parameters/reservedparameter.py +++ b/odxtools/parameters/reservedparameter.py @@ -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,