From 54de2a295dac7d595b0090a280234059513ab1ff Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Thu, 31 Aug 2023 09:18:05 -0400 Subject: [PATCH] move --- selfdrive/car/hyundai/interface.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index eb88670bb1..2635b2344c 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -20,6 +20,14 @@ BUTTONS_DICT = {Buttons.RES_ACCEL: ButtonType.accelCruise, Buttons.SET_DECEL: Bu Buttons.GAP_DIST: ButtonType.gapAdjustCruise, Buttons.CANCEL: ButtonType.cancel} +def set_safety_config_canfd(CAN, can_fd=True): + platform = SafetyModel.hyundai if can_fd else SafetyModel.hyundaiCanfd + cfgs = [get_safety_config(platform), ] + if CAN.ECAN >= 4: + cfgs.insert(0, get_safety_config(SafetyModel.noOutput)) + return cfgs + + class CarInterface(CarInterfaceBase): @staticmethod def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs): @@ -354,11 +362,3 @@ class CarInterface(CarInterfaceBase): def apply(self, c, now_nanos): return self.CC.update(c, self.CS, now_nanos) - - -def set_safety_config_canfd(CAN, can_fd=True): - platform = SafetyModel.hyundai if can_fd else SafetyModel.hyundaiCanfd - cfgs = [get_safety_config(platform), ] - if CAN.ECAN >= 4: - cfgs.insert(0, get_safety_config(SafetyModel.noOutput)) - return cfgs