bugfix
This commit is contained in:
parent
28e22c20ee
commit
d34df5ba18
1 changed files with 4 additions and 3 deletions
|
|
@ -26,7 +26,8 @@ def readSym(symfile):
|
|||
continue
|
||||
if name == "":
|
||||
continue
|
||||
tmp["CycleTime"] = 0
|
||||
if not tmp.has_key("CycleTime"):
|
||||
tmp["CycleTime"] = 0
|
||||
message[name] = tmp
|
||||
tmp = {}
|
||||
name = ""
|
||||
|
|
@ -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 ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue