bugfix sym2lib

This commit is contained in:
Philipp Rauch 2014-01-15 13:10:22 +01:00
parent 6a9caf648f
commit 4916261e78

View file

@ -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")