diff --git a/pyren/mod_ecu.py b/pyren/mod_ecu.py index 7f2bbe8..9431dc4 100755 --- a/pyren/mod_ecu.py +++ b/pyren/mod_ecu.py @@ -32,6 +32,7 @@ import sys import os import time import gc +import re os.chdir(os.path.dirname(os.path.realpath(sys.argv[0]))) @@ -536,7 +537,7 @@ class ECU: kb.set_getch_term() else: if mod_globals.opt_csv and (c in mod_globals.opt_usrkey): - csvline += ";" + c + csvline += ";" + pyren_encode(c) continue kb.set_normal_term() if mod_globals.opt_csv and csvf!=0: @@ -563,7 +564,7 @@ class ECU: clearScreen() continue if mod_globals.opt_csv and (c in mod_globals.opt_usrkey): - csvline += ";" + c + csvline += ";" + pyren_encode(c) continue kb.set_normal_term() if mod_globals.opt_csv and csvf!=0: diff --git a/pyren/mod_ecu_mnemonic.py b/pyren/mod_ecu_mnemonic.py index 438293d..d1c0b30 100755 --- a/pyren/mod_ecu_mnemonic.py +++ b/pyren/mod_ecu_mnemonic.py @@ -98,6 +98,9 @@ def get_SnapShotMnemonic(m, se, elm, dataids): dataId = did startByte = dataids[dataId].mnemolocations[m.name].startByte startBit = dataids[dataId].mnemolocations[m.name].startBit + + if dataId not in didDict: + didDict[dataId] = '0' * (int(dataids[dataId].dataBitLength)/8) hexval = getHexVal(m, startByte, startBit, didDict[dataId]) return hexval