two spaces before inline comment
parent
73685b609d
commit
5d33ec0f18
|
@ -1,2 +1,2 @@
|
||||||
from opendbc.can.parser_pyx import CANDefine # pylint: disable=no-name-in-module, import-error
|
from opendbc.can.parser_pyx import CANDefine # pylint: disable=no-name-in-module, import-error
|
||||||
assert CANDefine
|
assert CANDefine
|
||||||
|
|
|
@ -55,7 +55,7 @@ class dbc():
|
||||||
|
|
||||||
name = dat.group(2)
|
name = dat.group(2)
|
||||||
size = int(dat.group(3))
|
size = int(dat.group(3))
|
||||||
ids = int(dat.group(1), 0) # could be hex
|
ids = int(dat.group(1), 0) # could be hex
|
||||||
if ids in self.msgs:
|
if ids in self.msgs:
|
||||||
sys.exit("Duplicate address detected %d %s" % (ids, self.name))
|
sys.exit("Duplicate address detected %d %s" % (ids, self.name))
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class dbc():
|
||||||
if dat is None:
|
if dat is None:
|
||||||
print("bad VAL {0}".format(l))
|
print("bad VAL {0}".format(l))
|
||||||
|
|
||||||
ids = int(dat.group(1), 0) # could be hex
|
ids = int(dat.group(1), 0) # could be hex
|
||||||
sgname = dat.group(2)
|
sgname = dat.group(2)
|
||||||
defvals = dat.group(3)
|
defvals = dat.group(3)
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,11 @@ def process(in_fn, out_fn):
|
||||||
|
|
||||||
can_dbc = dbc(in_fn)
|
can_dbc = dbc(in_fn)
|
||||||
|
|
||||||
msgs = [(address, msg_name, msg_size, sorted(msg_sigs, key=lambda s: s.name not in ("COUNTER", "CHECKSUM"))) # process counter and checksums first
|
# process counter and checksums first
|
||||||
|
msgs = [(address, msg_name, msg_size, sorted(msg_sigs, key=lambda s: s.name not in ("COUNTER", "CHECKSUM")))
|
||||||
for address, ((msg_name, msg_size), msg_sigs) in sorted(can_dbc.msgs.items()) if msg_sigs]
|
for address, ((msg_name, msg_size), msg_sigs) in sorted(can_dbc.msgs.items()) if msg_sigs]
|
||||||
|
|
||||||
def_vals = {a: sorted(set(b)) for a, b in can_dbc.def_vals.items()} # remove duplicates
|
def_vals = {a: sorted(set(b)) for a, b in can_dbc.def_vals.items()} # remove duplicates
|
||||||
def_vals = sorted(def_vals.items())
|
def_vals = sorted(def_vals.items())
|
||||||
|
|
||||||
if can_dbc.name.startswith(("honda_", "acura_")):
|
if can_dbc.name.startswith(("honda_", "acura_")):
|
||||||
|
|
Loading…
Reference in New Issue