Skip to content

Commit

Permalink
attempt to fix issue mercedes-benz#354 and mercedes-benz#355
Browse files Browse the repository at this point in the history
due to some copy-and-pasto, `DynDefinedSpec._build_odxlinks()`
unconditionally called itself and the `oid` parameter was missing from
the fallback code for DTC decoding. (Be aware that the latter points
towards an incomplete dataset.)

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: David Helwig <david.helwig@mbition.io>
  • Loading branch information
andlaus committed Oct 28, 2024
1 parent e2a3010 commit 3277e90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions odxtools/dtcdop.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def decode_from_pdu(self, decode_state: DecodeState) -> ParameterValue:
return DiagnosticTroubleCode(
trouble_code=trouble_code,
odx_id=cast(OdxLinkId, None),
oid=None,
short_name=f'DTC_{trouble_code:06x}',
long_name=None,
description=None,
Expand Down
2 changes: 0 additions & 2 deletions odxtools/dyndefinedspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ def from_et(et_element: ElementTree.Element,
def _build_odxlinks(self) -> Dict[OdxLinkId, Any]:
result: Dict[OdxLinkId, Any] = {}

result.update(self._build_odxlinks())

for didmi in self.dyn_id_def_mode_infos:
result.update(didmi._build_odxlinks())

Expand Down

0 comments on commit 3277e90

Please sign in to comment.