mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-14 13:22:09 +08:00
set point in base class only
This commit is contained in:
-3
@@ -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:
|
||||
|
||||
+4
-4
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user