Skip to content

Commit

Permalink
Merge pull request #3 from andlaus/PR92_fixes
Browse files Browse the repository at this point in the history
moar fixes for #92
  • Loading branch information
kayoub5 authored Nov 15, 2022
2 parents d61a92d + 77cd4ab commit a6ec5eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/somersaultecu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from itertools import chain
from typing import Any
from xml.etree import ElementTree
import pathlib
import odxtools

from odxtools.utils import short_name_as_id
from odxtools import PhysicalConstantParameter
Expand Down Expand Up @@ -1271,11 +1273,12 @@ def extract_constant_bytes(params):

# read the communication parameters
comparam_subsets = []
odx_cs_dir = pathlib.Path(odxtools.__file__).parent / "pdx_stub"
for odx_cs_filename in ("ISO_11898_2_DWCAN.odx-cs",
"ISO_11898_3_DWFTCAN.odx-cs",
"ISO_15765_2.odx-cs",
"ISO_15765_3_CPSS.odx-cs"):
odx_cs_root = ElementTree.parse(odx_cs_filename).getroot()
odx_cs_root = ElementTree.parse(odx_cs_dir/odx_cs_filename).getroot()
subset = odx_cs_root.find("COMPARAM-SUBSET")
if subset is not None:
comparam_subsets.append(read_comparam_subset_from_odx(subset))
Expand Down

0 comments on commit a6ec5eb

Please sign in to comment.