From 246a52166ebf94fbea7bb45cfd0c4896b35b3a6c Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 2 Nov 2021 11:22:38 +0100 Subject: [PATCH] assert openpilotLongitudinalControl not enabled for Hyundai legacy safety mode (#22778) --- selfdrive/car/hyundai/interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index b738beb9fe..746c2a8c1e 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -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