From 3277e9098f9f7cc806c837233b5af67a4377ea2d Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 28 Oct 2024 15:10:52 +0100 Subject: [PATCH] attempt to fix issue #354 and #355 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 Signed-off-by: David Helwig --- odxtools/dtcdop.py | 1 + odxtools/dyndefinedspec.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/odxtools/dtcdop.py b/odxtools/dtcdop.py index 0fd6cc2a..2f0eb06d 100644 --- a/odxtools/dtcdop.py +++ b/odxtools/dtcdop.py @@ -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, diff --git a/odxtools/dyndefinedspec.py b/odxtools/dyndefinedspec.py index e1e34637..d32b7077 100644 --- a/odxtools/dyndefinedspec.py +++ b/odxtools/dyndefinedspec.py @@ -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())