better name

pull/33222/head
Shane Smiskol 1 year ago
parent da78413581
commit 4deb38d4ed
  1. 8
      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

Loading…
Cancel
Save