Update interface.py
This commit is contained in:
parent
8555e48fc9
commit
77edcc0058
|
@ -228,14 +228,7 @@ class CarInterface(CarInterfaceBase):
|
|||
ret.longitudinalTuning.kiV = [0.0]
|
||||
ret.experimentalLongitudinalAvailable = candidate not in (LEGACY_SAFETY_MODE_CAR | CAMERA_SCC_CAR)
|
||||
|
||||
params = Params()
|
||||
dp_atl = int(params.get("dp_atl").decode('utf-8'))
|
||||
if dp_atl > 0:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HYUNDAI_ALKA
|
||||
if dp_atl == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
|
||||
ret.openpilotLongitudinalControl = experimental_long and ret.experimentalLongitudinalAvailable and dp_atl != 1
|
||||
ret.openpilotLongitudinalControl = experimental_long and ret.experimentalLongitudinalAvailable
|
||||
ret.pcmCruise = not ret.openpilotLongitudinalControl
|
||||
|
||||
ret.stoppingControl = True
|
||||
|
@ -276,6 +269,15 @@ class CarInterface(CarInterfaceBase):
|
|||
if candidate in CAMERA_SCC_CAR:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HYUNDAI_CAMERA_SCC
|
||||
|
||||
params = Params()
|
||||
dp_atl = int(params.get("dp_atl").decode('utf-8'))
|
||||
if dp_atl > 0:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HYUNDAI_ALKA
|
||||
if dp_atl == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
# update pcmCruise again
|
||||
ret.pcmCruise = not ret.openpilotLongitudinalControl
|
||||
|
||||
if ret.openpilotLongitudinalControl:
|
||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_LONG
|
||||
if candidate in HYBRID_CAR:
|
||||
|
|
Loading…
Reference in New Issue