diff --git a/opendbc_repo/opendbc/car/gm/interface.py b/opendbc_repo/opendbc/car/gm/interface.py index ffe46c747..19f2c515f 100755 --- a/opendbc_repo/opendbc/car/gm/interface.py +++ b/opendbc_repo/opendbc/car/gm/interface.py @@ -680,17 +680,6 @@ class CarInterface(CarInterfaceBase): # Reuse the no-camera safety bit as an ASCM Volt selector for the alternate EBCM brake path. ret.safetyConfigs[0].safetyParam |= GMSafetyFlags.FLAG_GM_NO_CAMERA.value - volt_ascm_sascm_stock_acc = ( - candidate == CAR.CHEVROLET_VOLT_ASCM and - has_sascm and - not alpha_long and - ret.pcmCruise and - not ret.openpilotLongitudinalControl and - not ret.enableGasInterceptorDEPRECATED - ) - if volt_ascm_sascm_stock_acc: - ret.safetyConfigs[0].safetyParam |= GMSafetyFlags.FLAG_GM_VOLT_ASCM_STOCK_ACC.value - try: remote_start_boots_comma = params.get_bool("RemoteStartBootsComma") except UnknownKeyName: diff --git a/opendbc_repo/opendbc/car/gm/tests/test_gm.py b/opendbc_repo/opendbc/car/gm/tests/test_gm.py index 3e143f699..c198ec0ce 100644 --- a/opendbc_repo/opendbc/car/gm/tests/test_gm.py +++ b/opendbc_repo/opendbc/car/gm/tests/test_gm.py @@ -138,28 +138,6 @@ class TestGMInterface: assert not car_params.startingState assert car_params.startAccel == pytest.approx(0.0) - def test_volt_ascm_sascm_stock_long_sets_marker_only_with_alpha_long_off(self): - CarInterface = interfaces[CAR.CHEVROLET_VOLT_ASCM] - fingerprint = _empty_fingerprint() - fingerprint[0][0x2FF] = 8 # SASCM detected - - stock_params = CarInterface.get_params(CAR.CHEVROLET_VOLT_ASCM, fingerprint, [], alpha_long=False, - is_release=False, docs=False, starpilot_toggles=_test_starpilot_toggles()) - alpha_params = CarInterface.get_params(CAR.CHEVROLET_VOLT_ASCM, fingerprint, [], alpha_long=True, - is_release=False, docs=False, starpilot_toggles=_test_starpilot_toggles()) - - assert not stock_params.openpilotLongitudinalControl - assert stock_params.safetyConfigs[0].safetyParam & GMSafetyFlags.FLAG_GM_VOLT_ASCM_STOCK_ACC.value - assert alpha_params.openpilotLongitudinalControl - assert not alpha_params.safetyConfigs[0].safetyParam & GMSafetyFlags.FLAG_GM_VOLT_ASCM_STOCK_ACC.value - - def test_volt_ascm_stock_long_marker_requires_sascm(self): - CarInterface = interfaces[CAR.CHEVROLET_VOLT_ASCM] - car_params = CarInterface.get_params(CAR.CHEVROLET_VOLT_ASCM, _empty_fingerprint(), [], alpha_long=False, - is_release=False, docs=False, starpilot_toggles=_test_starpilot_toggles()) - - assert not car_params.safetyConfigs[0].safetyParam & GMSafetyFlags.FLAG_GM_VOLT_ASCM_STOCK_ACC.value - def test_volt_cc_sparse_fingerprint_without_camera_sets_no_camera(self): CarInterface = interfaces[CAR.CHEVROLET_VOLT_CC] fingerprint = { diff --git a/opendbc_repo/opendbc/car/gm/values.py b/opendbc_repo/opendbc/car/gm/values.py index 1069256cb..7aa0a9b96 100644 --- a/opendbc_repo/opendbc/car/gm/values.py +++ b/opendbc_repo/opendbc/car/gm/values.py @@ -172,9 +172,6 @@ class GMSafetyFlags(IntFlag): HW_SDGM = 1024 FLAG_GM_BOLT_2017 = 2048 FLAG_GM_BOLT_2022_PEDAL = 4096 - # Context-specific alias for Volt ASCM + SASCM stock ACC. The Bolt pedal - # meaning remains active only on pedal/no-ACC paths in panda safety. - FLAG_GM_VOLT_ASCM_STOCK_ACC = 4096 FLAG_GM_REMOTE_START_BOOTS_COMMA = 8192 FLAG_GM_PANDA_3D1_SCHED = 16384 FLAG_GM_PANDA_PADDLE_SCHED = 32768 diff --git a/opendbc_repo/opendbc/safety/modes/gm.h b/opendbc_repo/opendbc/safety/modes/gm.h index 84e63bbc4..e5b6d525b 100644 --- a/opendbc_repo/opendbc/safety/modes/gm.h +++ b/opendbc_repo/opendbc/safety/modes/gm.h @@ -62,7 +62,6 @@ static bool gm_bolt_2022_pedal = false; static bool gm_alt_brake = false; static bool gm_volt_auto_hold = false; static bool gm_volt_one_pedal = false; -static bool gm_volt_ascm_stock_acc = false; static bool gm_cc_long = false; static bool gm_has_acc = true; @@ -520,7 +519,7 @@ static bool gm_fwd_hook(int bus_num, int addr) { bool is_acc_actuation_msg = (addr == 0x315U) || (addr == 0x2CBU); block_msg = is_lkas_msg; - if (gm_cam_long || gm_pedal_long || gm_volt_ascm_stock_acc) { + if (gm_cam_long || gm_pedal_long) { block_msg |= is_acc_status_msg; } if (gm_cam_long) { @@ -707,8 +706,16 @@ static safety_config gm_init(uint16_t param) { enable_gas_interceptor = GET_FLAG(param, GM_PARAM_PEDAL_INTERCEPTOR); gm_force_ascm = GET_FLAG(param, GM_PARAM_HW_ASCM_LONG); gm_force_brake_c9 = GET_FLAG(param, GM_PARAM_FORCE_BRAKE_C9); - const bool gm_bolt_2022_pedal_param = GET_FLAG(param, GM_PARAM_BOLT_2022_PEDAL); + gm_bolt_2022_pedal = GET_FLAG(param, GM_PARAM_BOLT_2022_PEDAL); gm_remote_start_boots_comma = GET_FLAG(param, GM_PARAM_REMOTE_START_BOOTS_COMMA); + gm_panda_3d1_sched = GET_FLAG(param, GM_PARAM_PANDA_3D1_SCHED) && gm_pedal_long && !gm_has_acc && !gm_bolt_2022_pedal; + gm_panda_paddle_sched = GET_FLAG(param, GM_PARAM_PANDA_PADDLE_SCHED) && gm_pedal_long && enable_gas_interceptor; + // Reuse the paddle-scheduler bit as a stock-Volt auto-hold marker on non-pedal ACC paths. + gm_volt_auto_hold = GET_FLAG(param, GM_PARAM_PANDA_PADDLE_SCHED) && !gm_pedal_long && !gm_cc_long && gm_has_acc; + // Reuse the 3D1 scheduler bit as a stock-Volt one-pedal marker on non-pedal + // ACC paths. The actual 3D1 scheduler still requires pedal-long and no-ACC, + // so this stays isolated from the Bolt pedal path. + gm_volt_one_pedal = GET_FLAG(param, GM_PARAM_PANDA_3D1_SCHED) && !gm_pedal_long && !gm_cc_long && gm_has_acc; gm_alt_brake = GET_FLAG(param, GM_PARAM_NO_CAMERA) && (gm_hw == GM_ASCM) && !gm_sdgm && !gm_ascm_int; gm_3d1_spoof_valid = false; @@ -739,18 +746,6 @@ static safety_config gm_init(uint16_t param) { gm_cam_long = GET_FLAG(param, GM_PARAM_HW_CAM_LONG) && !gm_cc_long; gm_pcm_cruise = (gm_hw == GM_CAM || gm_sdgm) && !gm_cam_long && !gm_force_ascm && !gm_pedal_long; const bool gm_ascm_int_stock_cam = gm_ascm_int && (gm_hw == GM_CAM) && gm_pcm_cruise && !gm_cam_long && !gm_pedal_long && !gm_cc_long; - // On the stock-ASCM_INT camera path, reuse the Bolt pedal bit as a Volt - // ASCM + SASCM stock-ACC marker and strip its pedal-long meaning. - gm_volt_ascm_stock_acc = gm_ascm_int_stock_cam && gm_bolt_2022_pedal_param; - gm_bolt_2022_pedal = gm_bolt_2022_pedal_param && !gm_volt_ascm_stock_acc; - gm_panda_3d1_sched = GET_FLAG(param, GM_PARAM_PANDA_3D1_SCHED) && gm_pedal_long && !gm_has_acc && !gm_bolt_2022_pedal; - gm_panda_paddle_sched = GET_FLAG(param, GM_PARAM_PANDA_PADDLE_SCHED) && gm_pedal_long && enable_gas_interceptor; - // Reuse the paddle-scheduler bit as a stock-Volt auto-hold marker on non-pedal ACC paths. - gm_volt_auto_hold = GET_FLAG(param, GM_PARAM_PANDA_PADDLE_SCHED) && !gm_pedal_long && !gm_cc_long && gm_has_acc; - // Reuse the 3D1 scheduler bit as a stock-Volt one-pedal marker on non-pedal - // ACC paths. The actual 3D1 scheduler still requires pedal-long and no-ACC, - // so this stays isolated from the Bolt pedal path. - gm_volt_one_pedal = GET_FLAG(param, GM_PARAM_PANDA_3D1_SCHED) && !gm_pedal_long && !gm_cc_long && gm_has_acc; const bool gm_ascm_int_no_accel_pos = gm_ascm_int && (gm_hw == GM_CAM) && gm_force_brake_c9; // FLAG_GM_BOLT_2022_PEDAL is shared with Malibu Hybrid pedal-long. Requiring // the paddle scheduler bit narrows this whitelist to the Gen2 Bolt pedal-long diff --git a/opendbc_repo/opendbc/safety/tests/test_gm.py b/opendbc_repo/opendbc/safety/tests/test_gm.py index e31989186..12bb9d22e 100755 --- a/opendbc_repo/opendbc/safety/tests/test_gm.py +++ b/opendbc_repo/opendbc/safety/tests/test_gm.py @@ -297,20 +297,6 @@ def test_gm_ascm_int_stock_cam_f1_rx_pinning(): assert not safety.safety_config_valid() -def test_gm_volt_ascm_stock_acc_marker_blocks_camera_acc_status_forwarding(): - safety = libsafety_py.libsafety - stock_ascm_int = GMSafetyFlags.HW_CAM | GMSafetyFlags.HW_ASCM_INT - marked_volt_ascm = stock_ascm_int | GMSafetyFlags.FLAG_GM_VOLT_ASCM_STOCK_ACC - - safety.set_safety_hooks(CarParams.SafetyModel.gm, stock_ascm_int) - safety.init_tests() - assert safety.safety_fwd_hook(2, 0x370) == 0 - - safety.set_safety_hooks(CarParams.SafetyModel.gm, marked_volt_ascm) - safety.init_tests() - assert safety.safety_fwd_hook(2, 0x370) == -1 - - def test_gm_ascm_int_long_no_accel_pos_uses_stock_cam_rx_checks(): safety = libsafety_py.libsafety safety.set_safety_hooks(CarParams.SafetyModel.gm, GMSafetyFlags.HW_CAM | GMSafetyFlags.HW_CAM_LONG | diff --git a/panda/board/obj/gitversion.h b/panda/board/obj/gitversion.h index c270b6294..03ebf984a 100644 --- a/panda/board/obj/gitversion.h +++ b/panda/board/obj/gitversion.h @@ -1,2 +1,2 @@ extern const uint8_t gitversion[19]; -const uint8_t gitversion[19] = "DEV-b75b2168-DEBUG"; +const uint8_t gitversion[19] = "DEV-199ef692-DEBUG"; diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index 3c7847366..061843b6d 100644 Binary files a/panda/board/obj/panda.bin.signed and b/panda/board/obj/panda.bin.signed differ diff --git a/panda/board/obj/panda/main.bin b/panda/board/obj/panda/main.bin index bc428dffb..8f9679856 100755 Binary files a/panda/board/obj/panda/main.bin and b/panda/board/obj/panda/main.bin differ diff --git a/panda/board/obj/panda/main.elf b/panda/board/obj/panda/main.elf index c506653ec..0aa5f0d65 100755 Binary files a/panda/board/obj/panda/main.elf and b/panda/board/obj/panda/main.elf differ diff --git a/panda/board/obj/panda_h7.bin.signed b/panda/board/obj/panda_h7.bin.signed index f027fa734..d5f26b0e1 100644 Binary files a/panda/board/obj/panda_h7.bin.signed and b/panda/board/obj/panda_h7.bin.signed differ diff --git a/panda/board/obj/panda_h7/main.bin b/panda/board/obj/panda_h7/main.bin index f72a99f16..92626f500 100755 Binary files a/panda/board/obj/panda_h7/main.bin and b/panda/board/obj/panda_h7/main.bin differ diff --git a/panda/board/obj/panda_h7/main.elf b/panda/board/obj/panda_h7/main.elf index c72402ddf..02644fd75 100755 Binary files a/panda/board/obj/panda_h7/main.elf and b/panda/board/obj/panda_h7/main.elf differ diff --git a/panda/board/obj/version b/panda/board/obj/version index 3ddbeafb3..7f7305359 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-b75b2168-DEBUG \ No newline at end of file +DEV-199ef692-DEBUG \ No newline at end of file