Use camera brake hold on Corolla TSS2 hybrids

This commit is contained in:
firestar5683
2026-11-27 23:13:04 -06:00
parent 1066c1e0f2
commit 439ac2274e
3 changed files with 10 additions and 3 deletions
@@ -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)
+2 -1
View File
@@ -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):
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "917ebecfb26f587b3d5d1f889e0e9e289f8305205fcde85f6aaa98b9bcc2fab4", "schema_version": 1}
{"protected_inventory_sha256": "91597d85f715a8447ecc79f9fddca1590791c3e25278a9816c850bc2362a83db", "schema_version": 1}