mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 02:52:04 +08:00
35a99d7fc6
* use CP * no car control, consistent _update function signatures * eh it's fine to name it whatever * clean up * oops * !! * now we can delete this! * nobody does anymore old-commit-hash: 7248b00086f9b8d5d95c80a2eb7fe89c387f44ea
31 lines
966 B
Python
Executable File
31 lines
966 B
Python
Executable File
#!/usr/bin/env python3
|
|
from cereal import car
|
|
from openpilot.selfdrive.car import get_safety_config
|
|
from openpilot.selfdrive.car.conversions import Conversions as CV
|
|
from openpilot.selfdrive.car.mazda.values import CAR, LKAS_LIMITS
|
|
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
|
|
|
|
|
|
|
class CarInterface(CarInterfaceBase):
|
|
|
|
@staticmethod
|
|
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
|
|
ret.carName = "mazda"
|
|
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.mazda)]
|
|
ret.radarUnavailable = True
|
|
|
|
ret.dashcamOnly = candidate not in (CAR.MAZDA_CX5_2022, CAR.MAZDA_CX9_2021)
|
|
|
|
ret.steerActuatorDelay = 0.1
|
|
ret.steerLimitTimer = 0.8
|
|
|
|
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
|
|
|
|
if candidate not in (CAR.MAZDA_CX5_2022,):
|
|
ret.minSteerSpeed = LKAS_LIMITS.DISABLE_SPEED * CV.KPH_TO_MS
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41
|
|
|
|
return ret
|