Files
sunnypilot/selfdrive/pandad/__init__.py
Shane Smiskol 799fabd707 Reapply "update to new opendbc API (#32009)" (#33151)
This reverts commit f2f01e3afaeaa267af61c8d7ab918da04d3411f2.
old-commit-hash: 7c112341c3
2024-07-31 15:37:39 -07:00

12 lines
378 B
Python

# Cython, now uses scons to build
from openpilot.selfdrive.pandad.pandad_api_impl import can_list_to_can_capnp, can_capnp_to_list
assert can_list_to_can_capnp
assert can_capnp_to_list
def can_capnp_to_can_list(can, src_filter=None):
ret = []
for msg in can:
if src_filter is None or msg.src in src_filter:
ret.append((msg.address, msg.dat, msg.src))
return ret