From c9f9eba61430269371f7d4be430a4bd64b2f2a9d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 16 Aug 2024 00:56:31 -0700 Subject: [PATCH 1/3] card: fix return signature for update_events --- selfdrive/car/card.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index a7cd2f5a4a..aab5070111 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -161,7 +161,7 @@ class Car: return CS - def update_events(self, CS: car.CarState) -> car.CarState: + def update_events(self, CS: car.CarState): self.events.clear() CS.events = self.car_events.update(self.CI.CS, self.CS_prev, self.CI.CC, self.CC_prev).to_msg() From a255b8043aa26c569e947e5e44e8f1dab29d45a5 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 16 Aug 2024 00:58:53 -0700 Subject: [PATCH 2/3] ecu_addrs.py: fix function argument typing --- selfdrive/car/ecu_addrs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/ecu_addrs.py b/selfdrive/car/ecu_addrs.py index 064b3e9258..6eba864c46 100644 --- a/selfdrive/car/ecu_addrs.py +++ b/selfdrive/car/ecu_addrs.py @@ -1,13 +1,12 @@ -import capnp import time from panda.python.uds import SERVICE_TYPE from openpilot.selfdrive.car import make_tester_present_msg, carlog -from openpilot.selfdrive.car.can_definitions import CanRecvCallable, CanSendCallable +from openpilot.selfdrive.car.can_definitions import CanData, CanRecvCallable, CanSendCallable from openpilot.selfdrive.car.fw_query_definitions import EcuAddrBusType -def _is_tester_present_response(msg: capnp.lib.capnp._DynamicStructReader, subaddr: int = None) -> bool: +def _is_tester_present_response(msg: CanData, subaddr: int = None) -> bool: # ISO-TP messages are always padded to 8 bytes # tester present response is always a single frame dat_offset = 1 if subaddr is not None else 0 From e6b29964785d836361636cee5c6e70af59d5fda0 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 16 Aug 2024 01:00:26 -0700 Subject: [PATCH 3/3] test_fw_fingerprint.py: fix RAM HD test --- selfdrive/car/tests/test_fw_fingerprint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/tests/test_fw_fingerprint.py b/selfdrive/car/tests/test_fw_fingerprint.py index 6391427bde..bd24054450 100644 --- a/selfdrive/car/tests/test_fw_fingerprint.py +++ b/selfdrive/car/tests/test_fw_fingerprint.py @@ -133,7 +133,7 @@ class TestFwFingerprint: elif CP.carName == "chrysler": # Some HD trucks have a combined TCM and ECM - if CP.carFingerprint.startswith("RAM HD"): + if CP.carFingerprint.startswith("RAM_HD"): for ecu in ecus.keys(): assert ecu[0] != Ecu.transmission, f"{car_model}: Blacklisted ecu: (Ecu.{ECU_NAME[ecu[0]]}, {hex(ecu[1])})"