From d35f01464a1cd1df1f12b69075bc73d541c8fac0 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 28 Feb 2024 20:22:59 -0800 Subject: [PATCH] move CarControllerBase up with other car classes old-commit-hash: f20bfacb9434d5f9d2a6692352c1f686dec9327f --- selfdrive/car/interfaces.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index 77912e478b..491138f788 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -456,6 +456,15 @@ class CarStateBase(ABC): return None +SendCan = tuple[int, int, bytes, int] + + +class CarControllerBase(ABC): + @abstractmethod + def update(self, CC, CS, now_nanos) -> tuple[car.CarControl.Actuators, list[SendCan]]: + pass + + INTERFACE_ATTR_FILE = { "FINGERPRINTS": "fingerprints", "FW_VERSIONS": "fingerprints", @@ -519,12 +528,3 @@ class NanoFFModel: pred = x[0] pred = pred * (self.weights['output_norm_mat'][1] - self.weights['output_norm_mat'][0]) + self.weights['output_norm_mat'][0] return pred - - -SendCan = tuple[int, int, bytes, int] - - -class CarControllerBase(ABC): - @abstractmethod - def update(self, CC, CS, now_nanos) -> tuple[car.CarControl.Actuators, list[SendCan]]: - pass