remove pandad's capnp from selfdrive/car

pull/33215/head
Shane Smiskol 12 months ago
parent 3742625e85
commit 8379b709f5
  1. 3
      .importlinter
  2. 4
      selfdrive/car/card.py
  3. 6
      selfdrive/car/interfaces.py

@ -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

@ -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)

@ -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)

Loading…
Cancel
Save