CP to carcontroller.py

This commit is contained in:
discountchubbs
2025-03-21 07:01:04 -07:00
parent 5a44f5aaaa
commit ae5fe3a6fc
2 changed files with 4 additions and 4 deletions
@@ -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()