From ec46cd61a385f702fcf3766fcab9933afc918bc8 Mon Sep 17 00:00:00 2001 From: Dom <168790843+firestar5683@users.noreply.github.com> Date: Wed, 14 Oct 2026 15:57:38 -0500 Subject: [PATCH] Cover admitted Bolt pedal stop hold in joined wire test --- .../longitudinal/tests/test_gm_bolt_pedal_stop.py | 11 ++++++++++- prebuilt.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/openpilot/starpilot/longitudinal/tests/test_gm_bolt_pedal_stop.py b/openpilot/starpilot/longitudinal/tests/test_gm_bolt_pedal_stop.py index a6836f0f46..98c0086344 100644 --- a/openpilot/starpilot/longitudinal/tests/test_gm_bolt_pedal_stop.py +++ b/openpilot/starpilot/longitudinal/tests/test_gm_bolt_pedal_stop.py @@ -111,6 +111,9 @@ class TestBoltPedalMovingStop(unittest.TestCase): cancel_seen |= any(m[0] == 0x1e1 and m[2] == 2 for m in sent[-1][0]) self.assertEqual(cc.actuators.longControlState, controls.LoC.long_control_state if controls.longitudinal_inputs.gm_start_enabled else prior) prior = controls.LoC.long_control_state + # Stock ACC releases at tick 6; the stopped hold releases with the plan at tick 12. + stop_hold = candidate == CAR.CHEVROLET_BOLT_ACC_2022_2023_PEDAL and speed == 0. and 6 <= tick < 12 + self.assertEqual(ci.CC.bolt_acc_pedal_stop_hold, stop_hold) if tick < 12: expected = stopping_step(expected, -2., out.vEgo) self.assertAlmostEqual(cc.actuators.accel, expected, places=6) @@ -141,7 +144,13 @@ class TestBoltPedalMovingStop(unittest.TestCase): self.assertEqual(tuple(getattr(ci.CC, name) for name in calc_fields), calc_before) self.assertFalse(any(m[0] == 0x315 for m in sent[-1][0])) continue - steady = target if steady is None else pedal_step(target, steady, accel, out.vEgo) + if stop_hold: + steady = 0. + self.assertEqual(ci.CC.pedal_steady, 0.) + else: + steady = target if steady is None else pedal_step(target, steady, accel, out.vEgo) + if candidate == CAR.CHEVROLET_BOLT_ACC_2022_2023_PEDAL and speed == 0. and tick == 12: + self.assertGreater(steady, 0.) self.assertFalse(ci.CC.regen_paddle_pressed) self.assertEqual(next(m[1] for m in sent[-1][0] if m[0] == 0x200), pedal_wire(steady, tick // 4)) if tick == 20: diff --git a/prebuilt.json b/prebuilt.json index fa17016cfe..76655239ab 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "a94700717917cfeea48e548967f06e6fe45255090326dd86d9787173e2bd53ec", "schema_version": 1} +{"protected_inventory_sha256": "184f78989a0b0829b0e4933bd3618b53ca87675028008b911cddc5d95ff38028", "schema_version": 1}