Release 260111
This commit is contained in:
0
opendbc_repo/opendbc/car/gm/tests/__init__.py
Normal file
0
opendbc_repo/opendbc/car/gm/tests/__init__.py
Normal file
20
opendbc_repo/opendbc/car/gm/tests/test_gm.py
Normal file
20
opendbc_repo/opendbc/car/gm/tests/test_gm.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from parameterized import parameterized
|
||||
|
||||
from opendbc.car.gm.fingerprints import FINGERPRINTS
|
||||
from opendbc.car.gm.values import CAMERA_ACC_CAR, GM_RX_OFFSET
|
||||
|
||||
CAMERA_DIAGNOSTIC_ADDRESS = 0x24b
|
||||
|
||||
|
||||
class TestGMFingerprint:
|
||||
@parameterized.expand(FINGERPRINTS.items())
|
||||
def test_can_fingerprints(self, car_model, fingerprints):
|
||||
assert len(fingerprints) > 0
|
||||
|
||||
assert all(len(finger) for finger in fingerprints)
|
||||
|
||||
# The camera can sometimes be communicating on startup
|
||||
if car_model in CAMERA_ACC_CAR:
|
||||
for finger in fingerprints:
|
||||
for required_addr in (CAMERA_DIAGNOSTIC_ADDRESS, CAMERA_DIAGNOSTIC_ADDRESS + GM_RX_OFFSET):
|
||||
assert finger.get(required_addr) == 8, required_addr
|
||||
Reference in New Issue
Block a user