mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-06 14:16:39 +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
28 lines
854 B
Python
28 lines
854 B
Python
from cereal import car
|
|
from panda import Panda
|
|
from openpilot.selfdrive.car import get_safety_config
|
|
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
|
from openpilot.selfdrive.car.nissan.values import CAR
|
|
|
|
|
|
class CarInterface(CarInterfaceBase):
|
|
|
|
@staticmethod
|
|
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
|
|
ret.carName = "nissan"
|
|
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.nissan)]
|
|
ret.autoResumeSng = False
|
|
|
|
ret.steerLimitTimer = 1.0
|
|
|
|
ret.steerActuatorDelay = 0.1
|
|
|
|
ret.steerControlType = car.CarParams.SteerControlType.angle
|
|
ret.radarUnavailable = True
|
|
|
|
if candidate == CAR.NISSAN_ALTIMA:
|
|
# Altima has EPS on C-CAN unlike the others that have it on V-CAN
|
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_NISSAN_ALT_EPS_BUS
|
|
|
|
return ret
|