mirror of
https://github.com/infiniteCable2/opendbc.git
synced 2026-06-08 10:54:51 +08:00
# Conflicts: # docs/CARS.md # opendbc/car/car_helpers.py # opendbc/car/chrysler/carcontroller.py # opendbc/car/chrysler/values.py # opendbc/car/honda/carcontroller.py # opendbc/car/honda/hondacan.py # opendbc/car/hyundai/hyundaicanfd.py # opendbc/car/rivian/interface.py
32 lines
1.2 KiB
Python
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)
|