mirror of https://github.com/commaai/openpilot.git
interfaces returns RadarInterfaces (#33444)
* interfaces returns radarinterface * bump * bump * bump
This commit is contained in:
parent
239cc69a20
commit
f94ef10df7
|
@ -1 +1 @@
|
|||
Subproject commit 7bf0ecd822fb42c18a5356cefe27bd3cb7b85175
|
||||
Subproject commit f383e5cc64d105e90b8133d58dc18490b79153fb
|
|
@ -35,7 +35,7 @@ class TestCarInterfaces:
|
|||
phases=(Phase.reuse, Phase.generate, Phase.shrink))
|
||||
@given(data=st.data())
|
||||
def test_car_interfaces(self, car_name, data):
|
||||
CarInterface, CarController, CarState = interfaces[car_name]
|
||||
CarInterface, CarController, CarState, RadarInterface = interfaces[car_name]
|
||||
|
||||
args = get_fuzzy_car_interface_args(data.draw)
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import capnp
|
|||
import copy
|
||||
import dataclasses
|
||||
import os
|
||||
import importlib
|
||||
import pytest
|
||||
import random
|
||||
import unittest # noqa: TID251
|
||||
|
@ -173,7 +172,7 @@ class TestCarModelBase(unittest.TestCase):
|
|||
|
||||
cls.can_msgs = sorted(can_msgs, key=lambda msg: msg.logMonoTime)
|
||||
|
||||
cls.CarInterface, cls.CarController, cls.CarState = interfaces[cls.platform]
|
||||
cls.CarInterface, cls.CarController, cls.CarState, cls.RadarInterface = interfaces[cls.platform]
|
||||
cls.CP = cls.CarInterface.get_params(cls.platform, cls.fingerprint, car_fw, experimental_long, docs=False)
|
||||
assert cls.CP
|
||||
assert cls.CP.carFingerprint == cls.platform
|
||||
|
@ -234,8 +233,7 @@ class TestCarModelBase(unittest.TestCase):
|
|||
self.assertEqual(can_invalid_cnt, 0)
|
||||
|
||||
def test_radar_interface(self):
|
||||
RadarInterface = importlib.import_module(f'opendbc.car.{self.CP.carName}.radar_interface').RadarInterface
|
||||
RI = RadarInterface(self.CP)
|
||||
RI = self.RadarInterface(self.CP)
|
||||
assert RI
|
||||
|
||||
# Since OBD port is multiplexed to bus 1 (commonly radar bus) while fingerprinting,
|
||||
|
|
|
@ -18,7 +18,7 @@ class TestLatControl:
|
|||
|
||||
@parameterized.expand([(HONDA.HONDA_CIVIC, LatControlPID), (TOYOTA.TOYOTA_RAV4, LatControlTorque), (NISSAN.NISSAN_LEAF, LatControlAngle)])
|
||||
def test_saturation(self, car_name, controller):
|
||||
CarInterface, CarController, CarState = interfaces[car_name]
|
||||
CarInterface, CarController, CarState, RadarInterface = interfaces[car_name]
|
||||
CP = CarInterface.get_non_essential_params(car_name)
|
||||
CI = CarInterface(CP, CarController, CarState)
|
||||
CP = convert_to_capnp(CP)
|
||||
|
|
|
@ -28,7 +28,7 @@ def make_event(event_types):
|
|||
class TestStateMachine:
|
||||
|
||||
def setup_method(self):
|
||||
CarInterface, CarController, CarState = interfaces[MOCK.MOCK]
|
||||
CarInterface, CarController, CarState, RadarInterface = interfaces[MOCK.MOCK]
|
||||
CP = CarInterface.get_non_essential_params(MOCK.MOCK)
|
||||
CI = CarInterface(CP, CarController, CarState)
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ def card_fingerprint_callback(rc, pm, msgs, fingerprint):
|
|||
def get_car_params_callback(rc, pm, msgs, fingerprint):
|
||||
params = Params()
|
||||
if fingerprint:
|
||||
CarInterface, _, _ = interfaces[fingerprint]
|
||||
CarInterface, _, _, _ = interfaces[fingerprint]
|
||||
CP = CarInterface.get_non_essential_params(fingerprint)
|
||||
else:
|
||||
can = DummySocket()
|
||||
|
|
Loading…
Reference in New Issue