bugfix sym2lib
This commit is contained in:
parent
6a9caf648f
commit
4916261e78
1 changed files with 4 additions and 4 deletions
|
|
@ -120,12 +120,13 @@ def Add2Adapter(pcan, symfile):
|
|||
@attention: not tested
|
||||
'''
|
||||
mes = readSym(symfile)
|
||||
print ""
|
||||
for i in mes.keys():
|
||||
pcan.addMessage(CanMessage(mes[i]["ID"],
|
||||
mes[i]["DLC"],
|
||||
mes[i]["CycleTime"],
|
||||
i))
|
||||
print "add %s - %s to pcan" % (i, mes[i]["ID"])
|
||||
print "add %s - %s to pcan" % (i, hex(mes[i]["ID"]))
|
||||
for sig in mes[i]:
|
||||
if isinstance(mes[i].get(sig), dict):
|
||||
pcan.Messages[i].addSignal(CanSignal(mes[i][sig]["begin"],
|
||||
|
|
@ -134,7 +135,6 @@ def Add2Adapter(pcan, symfile):
|
|||
mes[i][sig]["factor"],
|
||||
mes[i][sig]["data"],
|
||||
sig))
|
||||
print "add sig %s to msg %s" (sig, i)
|
||||
print "add sig %s to msg %s" % (sig, i)
|
||||
print ""
|
||||
return pcan
|
||||
|
||||
Sym2Code("symfiles/MAB_Module_BMS.sym")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue