mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-26 18:22:07 +08:00
@@ -35,5 +35,5 @@ class CANDefine():
|
||||
self.dv[msgname] = {}
|
||||
|
||||
# two ways to lookup: address or msg name
|
||||
self.dv[address][sgname] = {v: d for v, d in zip(values, defs)} #build dict
|
||||
self.dv[address][sgname] = dict(zip(values, defs))
|
||||
self.dv[msgname][sgname] = self.dv[address][sgname]
|
||||
|
||||
@@ -21,7 +21,7 @@ class CANParser():
|
||||
# - frequency is the frequency at which health should be monitored.
|
||||
|
||||
checks = [] if checks is None else checks
|
||||
self.msgs_ck = set([check[0] for check in checks])
|
||||
self.msgs_ck = {check[0] for check in checks}
|
||||
self.frqs = dict(checks)
|
||||
self.can_valid = False # start with False CAN assumption
|
||||
# list of received msg we want to monitor counter and checksum for
|
||||
|
||||
@@ -42,7 +42,7 @@ def main():
|
||||
for address, ((msg_name, msg_size), msg_sigs) in sorted(can_dbc.msgs.items()) if msg_sigs]
|
||||
|
||||
def_vals = {a: set(b) for a,b in can_dbc.def_vals.items()} #remove duplicates
|
||||
def_vals = [(address, sig) for address, sig in sorted(def_vals.items())]
|
||||
def_vals = sorted(def_vals.items())
|
||||
|
||||
if can_dbc.name.startswith(("honda_", "acura_")):
|
||||
checksum_type = "honda"
|
||||
|
||||
Reference in New Issue
Block a user