diff --git a/opendbc_repo/opendbc/car/toyota/tests/test_auto_hold.py b/opendbc_repo/opendbc/car/toyota/tests/test_auto_hold.py index dd05eab006..86574110e1 100644 --- a/opendbc_repo/opendbc/car/toyota/tests/test_auto_hold.py +++ b/opendbc_repo/opendbc/car/toyota/tests/test_auto_hold.py @@ -89,7 +89,9 @@ class TestToyotaAutoHold(unittest.TestCase): self.assertTrue(owner.brake_hold_active) def test_detected_early_hybrid_uses_manual_aeb_hold(self): - for car, hybrid, aeb in ((CAR.TOYOTA_RAV4_TSS2, True, True), + for car, hybrid, aeb in ((CAR.TOYOTA_COROLLA_TSS2, True, True), + (CAR.TOYOTA_COROLLA_TSS2, False, False), + (CAR.TOYOTA_RAV4_TSS2, True, True), (CAR.TOYOTA_RAV4_TSS2, False, False), (CAR.TOYOTA_RAV4_TSS2_2022, True, False), (CAR.TOYOTA_CAMRY_TSS2, False, True)): @@ -136,6 +138,10 @@ class TestToyotaAutoHold(unittest.TestCase): self.assertTrue(owner.brake_hold_active) frame = next(frame for frame in frames if frame[0] == 0x344) self.assertEqual(decode(cp, frame, 'PRE_COLLISION_2')['DSS1GDRV'], -1.0) + state.out.brakePressed = False + released = [frame for _ in range(2) for frame in step_hold(owner, command, state) if frame[0] == 0x344] + self.assertTrue(owner.brake_hold_active) + self.assertEqual(decode(cp, released[0], 'PRE_COLLISION_2')['DSS1GDRV'], -1.0) state.out.gasPressed = True step_hold(owner, command, state) self.assertFalse(owner.brake_hold_active) diff --git a/opendbc_repo/opendbc/car/toyota/values.py b/opendbc_repo/opendbc/car/toyota/values.py index 9ac6912525..91f1fbc171 100644 --- a/opendbc_repo/opendbc/car/toyota/values.py +++ b/opendbc_repo/opendbc/car/toyota/values.py @@ -639,7 +639,8 @@ TOYOTA_AUTO_HOLD_AEB_CARS = {CAR.TOYOTA_CAMRY_TSS2} def uses_toyota_auto_hold_aeb(CP) -> bool: return (CP.carFingerprint in TOYOTA_AUTO_HOLD_AEB_CARS or - (CP.carFingerprint == CAR.TOYOTA_RAV4_TSS2 and bool(CP.flags & ToyotaFlags.HYBRID))) + (CP.carFingerprint in (CAR.TOYOTA_COROLLA_TSS2, CAR.TOYOTA_RAV4_TSS2) and + bool(CP.flags & ToyotaFlags.HYBRID))) def stopping_decel_rate(CP): diff --git a/prebuilt.json b/prebuilt.json index c78c01cfb3..296fef6f78 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "917ebecfb26f587b3d5d1f889e0e9e289f8305205fcde85f6aaa98b9bcc2fab4", "schema_version": 1} +{"protected_inventory_sha256": "91597d85f715a8447ecc79f9fddca1590791c3e25278a9816c850bc2362a83db", "schema_version": 1}