This commit is contained in:
Philipp Rauch 2014-01-15 18:00:28 +01:00
parent 28e22c20ee
commit d34df5ba18

View file

@ -26,6 +26,7 @@ def readSym(symfile):
continue
if name == "":
continue
if not tmp.has_key("CycleTime"):
tmp["CycleTime"] = 0
message[name] = tmp
tmp = {}
@ -52,7 +53,7 @@ def readSym(symfile):
elif line.find("ID") == 0:
msg_id = line.split("=")[1].strip().rstrip("h")
tmp["ID"] = int(msg_id, 16)
tmp["ID"] = int(msg_id, 16) # convert hex to int
elif line.find("DLC") == 0:
tmp["DLC"] = int(line.split("=")[1].strip())
@ -117,7 +118,7 @@ def Sym2Code(symfile, adapter = "pcan"):
def Add2Adapter(pcan, symfile):
'''
@attention: not tested
'''
mes = readSym(symfile)
print ""