a few more spi error counts

This commit is contained in:
Adeeb Shihadeh
2025-07-30 18:27:56 -07:00
parent 1d9aa1beba
commit a0b52ed254
3 changed files with 4 additions and 4 deletions

View File

@@ -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],

View File

@@ -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):

View File

@@ -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')