diff --git a/opendbc_repo/opendbc/car/gm/interface.py b/opendbc_repo/opendbc/car/gm/interface.py index 2779d92c8..a2643c5aa 100755 --- a/opendbc_repo/opendbc/car/gm/interface.py +++ b/opendbc_repo/opendbc/car/gm/interface.py @@ -667,7 +667,8 @@ class CarInterface(CarInterfaceBase): ret.alphaLongitudinalAvailable = False ret.openpilotLongitudinalControl = not disable_openpilot_long ret.pcmCruise = False - ret.minEnableSpeed = 24 * CV.MPH_TO_MS + if candidate not in (CAR.CHEVROLET_SILVERADO, CAR.CHEVROLET_SILVERADO_CC): + ret.minEnableSpeed = 24 * CV.MPH_TO_MS ret.radarUnavailable = True ret.safetyConfigs[0].safetyParam |= GMSafetyFlags.FLAG_GM_CC_LONG.value diff --git a/opendbc_repo/opendbc/car/gm/tests/test_gm.py b/opendbc_repo/opendbc/car/gm/tests/test_gm.py index d55bed9ca..42308fb04 100644 --- a/opendbc_repo/opendbc/car/gm/tests/test_gm.py +++ b/opendbc_repo/opendbc/car/gm/tests/test_gm.py @@ -309,6 +309,30 @@ class TestGMInterface: assert list(car_params.longitudinalTuning.kiBP) == pytest.approx([0.0, 5.0, 15.0, 35.0]) assert list(car_params.longitudinalTuning.kiV) == pytest.approx([0.20, 0.18, 0.13, 0.08]) + def test_silverado_camera_acc_allows_engage_from_stop(self): + CarInterface = interfaces[CAR.CHEVROLET_SILVERADO] + fingerprint = _empty_fingerprint() + fingerprint[0] = FINGERPRINTS[CAR.CHEVROLET_SILVERADO][0].copy() + + car_params = CarInterface.get_params(CAR.CHEVROLET_SILVERADO, fingerprint, [], alpha_long=False, is_release=False, + docs=False, starpilot_toggles=_test_starpilot_toggles()) + + assert car_params.minEnableSpeed == pytest.approx(0.0) + + def test_silverado_cc_allows_engage_from_stop(self): + CarInterface = interfaces[CAR.CHEVROLET_SILVERADO_CC] + car_params = CarInterface.get_params( + CAR.CHEVROLET_SILVERADO_CC, + _empty_fingerprint(), + [], + alpha_long=False, + is_release=False, + docs=False, + starpilot_toggles=_test_starpilot_toggles(), + ) + + assert car_params.minEnableSpeed == pytest.approx(0.0) + def test_blazer_uses_softer_low_speed_stop_hold_tune(self): CarInterface = interfaces[CAR.CHEVROLET_BLAZER] fingerprint = _empty_fingerprint()