diff --git a/.importlinter b/.importlinter index f2d1d4f2b0..38b7448ffc 100644 --- a/.importlinter +++ b/.importlinter @@ -37,9 +37,6 @@ ignore_imports = openpilot.selfdrive.car.fw_versions -> openpilot.common.params openpilot.selfdrive.car.ecu_addrs -> openpilot.common.params # requires generic CAN send/receive functions - openpilot.selfdrive.car.ecu_addrs -> openpilot.selfdrive.pandad - openpilot.selfdrive.car.interfaces -> openpilot.selfdrive.pandad - openpilot.selfdrive.car.isotp_parallel_query -> openpilot.selfdrive.pandad openpilot.selfdrive.car.tests.test_fw_fingerprint -> openpilot.selfdrive.pandad # these are okay diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index ab70b5045e..cfdfc7a55e 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -14,7 +14,7 @@ from openpilot.common.params import Params from openpilot.common.realtime import config_realtime_process, Priority, Ratekeeper from openpilot.common.swaglog import cloudlog, ForwardingHandler -from openpilot.selfdrive.pandad import can_list_to_can_capnp +from openpilot.selfdrive.pandad import can_list_to_can_capnp, can_capnp_to_list from openpilot.selfdrive.car import DT_CTRL, carlog from openpilot.selfdrive.car.can_definitions import CanSendCallable from openpilot.selfdrive.car.fw_versions import ObdCallback @@ -143,7 +143,7 @@ class Car: # Update carState from CAN can_strs = messaging.drain_sock_raw(self.can_sock, wait_for_one=True) - CS = self.CI.update(self.CC_prev, can_strs) + CS = self.CI.update(self.CC_prev, can_capnp_to_list(can_strs)) self.sm.update(0) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index 3e5ad5f073..e076ee6e49 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -18,7 +18,6 @@ from openpilot.selfdrive.car.conversions import Conversions as CV from openpilot.selfdrive.car.helpers import clip from openpilot.selfdrive.car.values import PLATFORMS from openpilot.selfdrive.controls.lib.events import Events -# from openpilot.selfdrive.pandad import can_capnp_to_list ButtonType = car.CarState.ButtonEvent.Type GearShifter = car.CarState.GearShifter @@ -231,12 +230,11 @@ class CarInterfaceBase(ABC): def _update(self, c: car.CarControl) -> car.CarState: pass - def update(self, c: car.CarControl, can_strings: list[bytes]) -> car.CarState: + def update(self, c: car.CarControl, can_packets: list[int, list[int, bytes, int]]) -> car.CarState: # parse can - can_list = can_capnp_to_list(can_strings) for cp in self.can_parsers: if cp is not None: - cp.update_strings(can_list) + cp.update_strings(can_packets) # get CarState ret = self._update(c)