Merge opendbc subtree

This commit is contained in:
Vehicle Researcher
2020-05-31 13:22:45 -07:00
36 changed files with 942 additions and 855 deletions
+4 -4
View File
@@ -19,10 +19,11 @@ def process(in_fn, out_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]
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())
if can_dbc.name.startswith(("honda_", "acura_")):
@@ -46,7 +47,7 @@ def process(in_fn, out_fn):
checksum_start_bit = 0
counter_start_bit = 0
little_endian = True
elif can_dbc.name.startswith(("subaru_")):
elif can_dbc.name.startswith(("subaru_global_")):
checksum_type = "subaru"
checksum_size = 8
counter_size = None
@@ -123,4 +124,3 @@ def main():
if __name__ == '__main__':
main()