From 2c2e10abd972b483d6a52d1f2c0ed98a7a72996b Mon Sep 17 00:00:00 2001 From: shrlnm Date: Sun, 1 Mar 2020 18:17:03 +0300 Subject: [PATCH] unknown dataId fix --- .idea/vcs.xml | 6 ++++++ pyren/mod_ecu_mnemonic.py | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pyren/mod_ecu_mnemonic.py b/pyren/mod_ecu_mnemonic.py index 2ff1efb..438293d 100755 --- a/pyren/mod_ecu_mnemonic.py +++ b/pyren/mod_ecu_mnemonic.py @@ -82,6 +82,8 @@ def get_SnapShotMnemonic(m, se, elm, dataids): for x in range(numberOfIdentifiers): dataId = resp[posInResp:posInResp + 2*3].replace(" ", "") posInResp += 2*3 + if dataId not in dataids.keys(): + continue didDataLength = int(dataids[dataId].dataBitLength)/8 didData = resp[posInResp: posInResp + didDataLength*3] posInResp += didDataLength*3