30 lines
897 B
Python
Executable File
30 lines
897 B
Python
Executable File
#!/usr/bin/env python3
|
|
from opendbc.car import structs
|
|
from opendbc.car.interfaces import CarInterfaceBase
|
|
|
|
|
|
class CarInterface(CarInterfaceBase):
|
|
|
|
@staticmethod
|
|
def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams:
|
|
ret.brand = "tesla"
|
|
|
|
# Needs safety validation and final testing before pulling out of dashcam
|
|
ret.dashcamOnly = True
|
|
|
|
# Not merged yet
|
|
#ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.tesla)]
|
|
|
|
ret.steerLimitTimer = 1.0
|
|
ret.steerActuatorDelay = 0.25
|
|
|
|
ret.steerControlType = structs.CarParams.SteerControlType.angle
|
|
ret.radarUnavailable = True
|
|
|
|
ret.experimentalLongitudinalAvailable = True
|
|
if experimental_long:
|
|
ret.openpilotLongitudinalControl = True
|
|
# ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TESLA_LONG_CONTROL
|
|
|
|
return ret
|