You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1006 B
29 lines
1006 B
from opendbc.car import get_safety_config, structs
|
|
from opendbc.car.interfaces import CarInterfaceBase
|
|
from opendbc.car.nissan.carcontroller import CarController
|
|
from opendbc.car.nissan.carstate import CarState
|
|
from opendbc.car.nissan.values import CAR, NissanSafetyFlags
|
|
|
|
|
|
class CarInterface(CarInterfaceBase):
|
|
CarState = CarState
|
|
CarController = CarController
|
|
|
|
@staticmethod
|
|
def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_long, docs) -> structs.CarParams:
|
|
ret.brand = "nissan"
|
|
ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.nissan)]
|
|
ret.autoResumeSng = False
|
|
|
|
ret.steerLimitTimer = 1.0
|
|
|
|
ret.steerActuatorDelay = 0.1
|
|
|
|
ret.steerControlType = structs.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 |= NissanSafetyFlags.ALT_EPS_BUS.value
|
|
|
|
return ret
|
|
|