set point in base class only

This commit is contained in:
Jason Wen
2024-09-13 00:32:30 -04:00
parent 43b87b53f5
commit cecf82e951
2 changed files with 4 additions and 7 deletions
@@ -18,9 +18,6 @@ class CustomStockLongitudinalController(CustomStockLongitudinalControllerBase):
self.set_speed_buttons = (ButtonType.accelCruise, ButtonType.decelCruise)
def get_set_point(self, is_metric: bool) -> float:
return 30 if is_metric else int(20 * CV.MPH_TO_KPH)
def create_can_mock_button_messages(self, CS: car.CarState, CC: car.CarControl) -> list[SendCan]:
can_sends = []
if not (CC.cruiseControl.cancel or CC.cruiseControl.resume) and CS.out.cruiseState.enabled:
@@ -144,12 +144,12 @@ class CustomStockLongitudinalControllerBase(ABC):
return cruise_button
@abstractmethod
def create_mock_button_messages(self, CS: car.CarState, CC: car.CarControl) -> list[SendCan]:
pass
@staticmethod
def get_set_point(is_metric: bool) -> float:
return 30 if is_metric else int(20 * CV.MPH_TO_KPH)
@abstractmethod
def get_set_point(self, is_metric: bool) -> float:
def create_mock_button_messages(self, CS: car.CarState, CC: car.CarControl) -> list[SendCan]:
pass
def update(self, CS: car.CarState) -> None: