assert openpilotLongitudinalControl not enabled for Hyundai legacy safety mode (#22778)

This commit is contained in:
Willem Melching
2021-11-02 11:22:38 +01:00
committed by GitHub
parent f8d050298e
commit 246a52166e

View File

@@ -250,6 +250,7 @@ class CarInterface(CarInterfaceBase):
if candidate in [CAR.HYUNDAI_GENESIS, CAR.IONIQ_EV_2020, CAR.IONIQ_EV_LTD, CAR.IONIQ_PHEV, CAR.IONIQ, CAR.KONA_EV, CAR.KIA_SORENTO,
CAR.SONATA_LF, CAR.KIA_NIRO_EV, CAR.KIA_OPTIMA, CAR.VELOSTER, CAR.KIA_STINGER,
CAR.GENESIS_G70, CAR.GENESIS_G80, CAR.KIA_CEED, CAR.ELANTRA, CAR.IONIQ_HEV_2022]:
assert not ret.openpilotLongitudinalControl # Legacy safety mode doesn't support longitudinal
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.hyundaiLegacy)]
# set appropriate safety param for gas signal