|
|
|
@ -7,6 +7,7 @@ from openpilot.selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
|
|
|
|
|
|
ButtonType = car.CarState.ButtonEvent.Type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CarInterface(CarInterfaceBase): |
|
|
|
|
|
|
|
|
|
@staticmethod |
|
|
|
@ -22,7 +23,7 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
|
|
|
|
|
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) |
|
|
|
|
|
|
|
|
|
if candidate not in (CAR.MAZDA_CX5_2022, ): |
|
|
|
|
if candidate not in (CAR.MAZDA_CX5_2022,): |
|
|
|
|
ret.minSteerSpeed = LKAS_LIMITS.DISABLE_SPEED * CV.KPH_TO_MS |
|
|
|
|
|
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -33,7 +34,7 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
def _update(self): |
|
|
|
|
ret = self.CS.update(self.cp, self.cp_cam) |
|
|
|
|
|
|
|
|
|
# TODO: add button types for inc and dec |
|
|
|
|
# TODO: add button types for inc and dec |
|
|
|
|
ret.buttonEvents = create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}) |
|
|
|
|
|
|
|
|
|
return ret |
|
|
|
|