From a0b52ed254b67d05f600393d5c2b0f98d83d9d14 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 30 Jul 2025 18:27:56 -0700 Subject: [PATCH] a few more spi error counts --- python/__init__.py | 2 +- tests/hitl/5_spi.py | 4 ++-- tests/hitl/conftest.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/__init__.py b/python/__init__.py index 2493ff05..1edaa9f2 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -562,7 +562,7 @@ class Panda: "interrupt_load": a[18], "fan_power": a[19], "safety_rx_checks_invalid": a[20], - "spi_checksum_error_count": a[21], + "spi_error_count": a[21], "fan_stall_count": a[22], "sbu1_voltage_mV": a[23], "sbu2_voltage_mV": a[24], diff --git a/tests/hitl/5_spi.py b/tests/hitl/5_spi.py index f9a4e28d..1861ffef 100644 --- a/tests/hitl/5_spi.py +++ b/tests/hitl/5_spi.py @@ -82,12 +82,12 @@ class TestSpi: self._ping(mocker, p) def test_bad_checksum(self, mocker, p): - cnt = p.health()['spi_checksum_error_count'] + cnt = p.health()['spi_error_count'] with patch('panda.python.spi.PandaSpiHandle._calc_checksum', return_value=0): with pytest.raises(PandaSpiNackResponse): p._handle.controlRead(Panda.REQUEST_IN, 0xd2, 0, 0, p.HEALTH_STRUCT.size, timeout=50) self._ping(mocker, p) - assert (p.health()['spi_checksum_error_count'] - cnt) > 0 + assert (p.health()['spi_error_count'] - cnt) > 0 def test_non_existent_endpoint(self, mocker, p): for _ in range(10): diff --git a/tests/hitl/conftest.py b/tests/hitl/conftest.py index c831e849..ecc3a455 100644 --- a/tests/hitl/conftest.py +++ b/tests/hitl/conftest.py @@ -121,7 +121,7 @@ def func_fixture_panda(request, module_panda): assert p.health()['fault_status'] == 0 # Check for SPI errors - #assert p.health()['spi_checksum_error_count'] == 0 + #assert p.health()['spi_error_count'] == 0 # Check health of each CAN core after test, normal to fail for test_gen2_loopback on OBD bus, so skipping mark = request.node.get_closest_marker('panda_expect_can_error')