set safety config/configure experimental longitudinal

pull/28196/head
Cameron Clough 2 years ago
parent 964d3addfe
commit e373d76cc3
  1. 12
      selfdrive/car/ford/interface.py

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from cereal import car from cereal import car
from panda import Panda
from common.conversions import Conversions as CV from common.conversions import Conversions as CV
from selfdrive.car import STD_CARGO_KG, get_safety_config from selfdrive.car import STD_CARGO_KG, get_safety_config
from selfdrive.car.ford.values import CAR, Ecu from selfdrive.car.ford.values import CAR, Ecu
@ -13,18 +14,25 @@ class CarInterface(CarInterfaceBase):
@staticmethod @staticmethod
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs): def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
ret.carName = "ford" ret.carName = "ford"
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.ford)] ret.radarUnavailable = True
# These cars are dashcam only for lack of test coverage. # These cars are dashcam only for lack of test coverage.
# Once a user confirms each car works and a test route is # Once a user confirms each car works and a test route is
# added to selfdrive/car/tests/routes.py, we can remove it from this list. # added to selfdrive/car/tests/routes.py, we can remove it from this list.
ret.dashcamOnly = candidate in {CAR.FOCUS_MK4} ret.dashcamOnly = candidate in {CAR.FOCUS_MK4}
ret.radarUnavailable = True ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.ford)]
ret.steerControlType = car.CarParams.SteerControlType.angle ret.steerControlType = car.CarParams.SteerControlType.angle
ret.steerActuatorDelay = 0.2 ret.steerActuatorDelay = 0.2
ret.steerLimitTimer = 1.0 ret.steerLimitTimer = 1.0
ret.experimentalLongitudinalAvailable = True
if experimental_long:
# Panda ALLOW_DEBUG firmware required
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_FORD_LONG_CONTROL
ret.openpilotLongitudinalControl = True
if candidate == CAR.BRONCO_SPORT_MK1: if candidate == CAR.BRONCO_SPORT_MK1:
ret.wheelbase = 2.67 ret.wheelbase = 2.67
ret.steerRatio = 17.7 ret.steerRatio = 17.7

Loading…
Cancel
Save