From ae5fe3a6fcbcb4fb41eb4b9d14febbb1a07ba19e Mon Sep 17 00:00:00 2001 From: discountchubbs Date: Fri, 21 Mar 2025 07:01:04 -0700 Subject: [PATCH] CP to carcontroller.py --- opendbc_repo | 2 +- sunnypilot/selfdrive/car/hkg_specific_params.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opendbc_repo b/opendbc_repo index b0a6e7c14c..a409c3131f 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit b0a6e7c14cf57927be67b4bb3a18585b30b6795f +Subproject commit a409c3131fcbfc65bb5f50e9ce41b4b6fdf0642d diff --git a/sunnypilot/selfdrive/car/hkg_specific_params.py b/sunnypilot/selfdrive/car/hkg_specific_params.py index 1af932e0f5..a04cc99437 100644 --- a/sunnypilot/selfdrive/car/hkg_specific_params.py +++ b/sunnypilot/selfdrive/car/hkg_specific_params.py @@ -2,13 +2,13 @@ from opendbc.car import structs from opendbc.sunnypilot.car.hyundai.values import HyundaiFlagsSP from openpilot.common.params import Params - class HyundaiLongTuneParams: @staticmethod def param(params, key: str) -> bool: val = params.get(key) - return val in [b"1", b"2"] - + if isinstance(val, bytes): + val = val.decode("utf-8") + return val in ["1", "2"] def set_hyundai_long_tune_flag(CP: structs.CarParams): params = Params()