From 4deb38d4ed99e43721960f69da1dd46a1069eb42 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 7 Aug 2024 15:36:11 -0700 Subject: [PATCH] better name --- selfdrive/car/interfaces.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index a64eabc168..1f3708afb3 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -51,7 +51,7 @@ class LatControlInputs(NamedTuple): aego: float -CanType = tuple[int, bytes, int] +CanMsgType = tuple[int, bytes, int] TorqueFromLateralAccelCallbackType = Callable[[LatControlInputs, car.CarParams.LateralTorqueTuning, float, float, bool, bool], float] @@ -108,7 +108,7 @@ class CarInterfaceBase(ABC): dbc_name = "" if self.cp is None else self.cp.dbc_name self.CC: CarControllerBase = CarController(dbc_name, CP) - def apply(self, c: car.CarControl, now_nanos: int) -> tuple[car.CarControl.Actuators, list[CanType]]: + def apply(self, c: car.CarControl, now_nanos: int) -> tuple[car.CarControl.Actuators, list[CanMsgType]]: return self.CC.update(c, self.CS, now_nanos) @staticmethod @@ -228,7 +228,7 @@ class CarInterfaceBase(ABC): def _update(self, c: car.CarControl) -> car.CarState: pass - def update(self, c: car.CarControl, can_packets: list[tuple[int, list[CanType]]]) -> car.CarState: + def update(self, c: car.CarControl, can_packets: list[tuple[int, list[CanMsgType]]]) -> car.CarState: # parse can for cp in self.can_parsers: if cp is not None: @@ -467,7 +467,7 @@ class CarControllerBase(ABC): self.frame = 0 @abstractmethod - def update(self, CC: car.CarControl.Actuators, CS: car.CarState, now_nanos: int) -> tuple[car.CarControl.Actuators, list[CanType]]: + def update(self, CC: car.CarControl.Actuators, CS: car.CarState, now_nanos: int) -> tuple[car.CarControl.Actuators, list[CanMsgType]]: pass