mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-08 01:45:54 +08:00
tiny dancer
This commit is contained in:
@@ -659,7 +659,6 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
volt_stock_auto_hold_safety = (
|
||||
gm_auto_hold and
|
||||
not ret.openpilotLongitudinalControl and
|
||||
candidate in {
|
||||
CAR.CHEVROLET_VOLT,
|
||||
CAR.CHEVROLET_VOLT_2019,
|
||||
@@ -668,8 +667,10 @@ class CarInterface(CarInterfaceBase):
|
||||
}
|
||||
)
|
||||
if volt_stock_auto_hold_safety:
|
||||
# Reuse the paddle-scheduler safety bit as a stock-Volt auto-hold marker on
|
||||
# non-pedal paths. The scheduler logic remains inactive without pedal-long.
|
||||
# Reuse the paddle-scheduler safety bit as a Volt auto-hold marker on
|
||||
# non-pedal paths. Hold can run while OP longitudinal is configured but
|
||||
# not currently active, so the bit must be present regardless of the
|
||||
# current long-control mode.
|
||||
ret.safetyConfigs[0].safetyParam |= GMSafetyFlags.FLAG_GM_PANDA_PADDLE_SCHED.value
|
||||
|
||||
use_panda_3d1_sched = (
|
||||
|
||||
@@ -132,6 +132,22 @@ class TestGMInterface:
|
||||
assert "ECMAcceleratorPos" not in pt_parser.vl
|
||||
assert "EBCMBrakePedalPosition" in pt_parser.vl
|
||||
|
||||
def test_volt_auto_hold_sets_stock_hold_safety_bit_with_op_long_enabled(self):
|
||||
CarInterface = interfaces[CAR.CHEVROLET_VOLT_ASCM]
|
||||
fingerprint = _empty_fingerprint()
|
||||
fingerprint[0][0x2FF] = 8
|
||||
|
||||
params = Params()
|
||||
try:
|
||||
params.put_bool("GMAutoHold", True)
|
||||
car_params = CarInterface.get_params(CAR.CHEVROLET_VOLT_ASCM, fingerprint, [], alpha_long=True, is_release=False,
|
||||
docs=False, starpilot_toggles=_test_starpilot_toggles())
|
||||
finally:
|
||||
params.remove("GMAutoHold")
|
||||
|
||||
assert car_params.openpilotLongitudinalControl
|
||||
assert car_params.safetyConfigs[0].safetyParam & GMSafetyFlags.FLAG_GM_PANDA_PADDLE_SCHED.value
|
||||
|
||||
@parameterized.expand(VOLT_CARS)
|
||||
def test_volt_bsm_is_enabled_without_fingerprint_match(self, car_model):
|
||||
CarInterface = interfaces[car_model]
|
||||
|
||||
Reference in New Issue
Block a user