Files
sunnypilot-byd/opendbc_repo/opendbc/sunnypilot/car/honda/test_honda.py
T
github-actions[bot] de77c89cf6 sunnypilot v2026.002.000
version: sunnypilot v2026.002.000 (staging)
date: 2026-07-21T07:44:02
master commit: 2c334ede443d7391d27575af8c854a095ba702a8
2026-07-21 07:44:02 +00:00

32 lines
1.2 KiB
Python

"""
Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors.
This file is part of sunnypilot and is licensed under the MIT License.
See the LICENSE.md file in the root directory for more details.
"""
import unittest
from opendbc.testing import parameterized
from opendbc.car import gen_empty_fingerprint
from opendbc.car.structs import CarParams
from opendbc.car.car_helpers import interfaces
from opendbc.car.honda.values import CAR
CarFw = CarParams.CarFw
class TestHondaEpsMod(unittest.TestCase):
@parameterized("car_name, fw", [(CAR.HONDA_CIVIC, b'39990-TBA,A030\x00\x00'), (CAR.HONDA_CIVIC, b'39990-TBA-A030\x00\x00'),
(CAR.HONDA_CLARITY, b'39990-TRW-A020\x00\x00'), (CAR.HONDA_CLARITY, b'39990,TRW,A020\x00\x00')])
def test_eps_mod_fingerprint(self, car_name, fw):
fingerprint = gen_empty_fingerprint()
car_fw = [CarFw(ecu="eps", fwVersion=fw)]
CarInterface = interfaces[car_name]
CP = CarInterface.get_params(car_name, fingerprint, car_fw, False, False, False)
_ = CarInterface.get_params_sp(CP, car_name, fingerprint, car_fw, False, False, False)
self.assertFalse(CP.dashcamOnly)