diff --git a/opendbc_repo/opendbc/car/gm/carcontroller.py b/opendbc_repo/opendbc/car/gm/carcontroller.py index 630288da2..d3119e518 100644 --- a/opendbc_repo/opendbc/car/gm/carcontroller.py +++ b/opendbc_repo/opendbc/car/gm/carcontroller.py @@ -157,7 +157,7 @@ def should_send_adas_status(CP, is_kaofui_car): return True if CP.carFingerprint in ASCM_INT: - return CP.carFingerprint == CAR.BUICK_LACROSSE_ASCM + return False return CP.networkLocation != NetworkLocation.fwdCamera and CP.carFingerprint not in SDGM_CAR @@ -259,7 +259,11 @@ def should_activate_auto_hold(hold_ready: bool, auto_hold_armed: bool, auto_hold ) -def should_neutralize_volt_long_on_driver_override(CP, gas_pressed: bool, brake_pressed: bool) -> bool: +def should_neutralize_volt_long_on_driver_override(CP, gas_pressed: bool, brake_pressed: bool, + gear_shifter=None) -> bool: + if CP.carFingerprint == CAR.CHEVROLET_VOLT_2019 and gear_shifter not in AUTO_HOLD_DRIVE_GEARS: + return False + return ( CP.carFingerprint in AUTO_HOLD_VOLT_CARS and not CP.enableGasInterceptorDEPRECATED and @@ -821,7 +825,7 @@ class CarController(CarControllerBase): self.apply_gas = self.params.INACTIVE_REGEN self.apply_brake = max(self.apply_brake, self.volt_one_pedal_brake) - if should_neutralize_volt_long_on_driver_override(self.CP, CS.out.gasPressed, CS.out.brakePressed): + if should_neutralize_volt_long_on_driver_override(self.CP, CS.out.gasPressed, CS.out.brakePressed, CS.out.gearShifter): self.apply_gas = self.params.MAX_ACC_REGEN self.apply_brake = 0 diff --git a/opendbc_repo/opendbc/car/gm/interface.py b/opendbc_repo/opendbc/car/gm/interface.py index 44d9f1143..502d1637b 100755 --- a/opendbc_repo/opendbc/car/gm/interface.py +++ b/opendbc_repo/opendbc/car/gm/interface.py @@ -675,9 +675,6 @@ class CarInterface(CarInterfaceBase): if remote_start_boots_comma: ret.safetyConfigs[0].safetyParam |= GMSafetyFlags.FLAG_GM_REMOTE_START_BOOTS_COMMA.value - if candidate == CAR.BUICK_LACROSSE_ASCM: - ret.safetyConfigs[0].safetyParam |= GMSafetyFlags.FLAG_GM_LACROSSE_RADAR.value - volt_stock_friction_brake_safety = ( (gm_auto_hold or volt_one_pedal_mode) and candidate in { diff --git a/opendbc_repo/opendbc/car/gm/tests/test_carcontroller.py b/opendbc_repo/opendbc/car/gm/tests/test_carcontroller.py index 8fd423959..250be41ec 100644 --- a/opendbc_repo/opendbc/car/gm/tests/test_carcontroller.py +++ b/opendbc_repo/opendbc/car/gm/tests/test_carcontroller.py @@ -154,13 +154,13 @@ def test_live_camera_path_does_not_send_pt_keepalive(): assert get_adas_keepalive_step(cp, is_kaofui_car=True) is None -def test_only_lacrosse_ascm_int_sends_radar_status(): +def test_ascm_int_cars_do_not_send_radar_status(): common = { "networkLocation": CarParams.NetworkLocation.fwdCamera, "radarUnavailable": False, } - assert should_send_adas_status(SimpleNamespace(carFingerprint=CAR.BUICK_LACROSSE_ASCM, **common), is_kaofui_car=True) + assert not should_send_adas_status(SimpleNamespace(carFingerprint=CAR.BUICK_LACROSSE_ASCM, **common), is_kaofui_car=True) assert not should_send_adas_status(SimpleNamespace(carFingerprint=CAR.CHEVROLET_VOLT_ASCM, **common), is_kaofui_car=True) @@ -496,6 +496,16 @@ def test_volt_driver_override_neutralization_applies_on_stock_acc_path(): ) +def test_volt_2019_driver_override_neutralization_skips_park_but_keeps_drive(): + CP = SimpleNamespace( + carFingerprint=CAR.CHEVROLET_VOLT_2019, + enableGasInterceptorDEPRECATED=False, + ) + + assert not should_neutralize_volt_long_on_driver_override(CP, False, True, structs.CarState.GearShifter.park) + assert should_neutralize_volt_long_on_driver_override(CP, False, True, structs.CarState.GearShifter.drive) + + def test_volt_driver_override_neutralization_skips_pedal_and_non_volt_paths(): assert not should_neutralize_volt_long_on_driver_override( SimpleNamespace( @@ -505,6 +515,15 @@ def test_volt_driver_override_neutralization_skips_pedal_and_non_volt_paths(): True, False, ) + assert should_neutralize_volt_long_on_driver_override( + SimpleNamespace( + carFingerprint=CAR.CHEVROLET_VOLT_ASCM, + enableGasInterceptorDEPRECATED=False, + ), + False, + True, + structs.CarState.GearShifter.park, + ) assert not should_neutralize_volt_long_on_driver_override( SimpleNamespace( carFingerprint=CAR.CHEVROLET_BOLT_CC_2018_2021, diff --git a/opendbc_repo/opendbc/car/gm/tests/test_gm.py b/opendbc_repo/opendbc/car/gm/tests/test_gm.py index 11026e550..285f5a934 100644 --- a/opendbc_repo/opendbc/car/gm/tests/test_gm.py +++ b/opendbc_repo/opendbc/car/gm/tests/test_gm.py @@ -139,24 +139,6 @@ 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.28, 0.26, 0.20, 0.16]) - def test_lacrosse_radar_marker_is_not_set_on_volt_ascm(self): - fingerprint = _empty_fingerprint() - fingerprint[0][0x2FF] = 8 - - LacrosseInterface = interfaces[CAR.BUICK_LACROSSE_ASCM] - lacrosse_params = LacrosseInterface.get_params( - CAR.BUICK_LACROSSE_ASCM, fingerprint, [], alpha_long=True, is_release=False, docs=False, - starpilot_toggles=_test_starpilot_toggles(), - ) - VoltInterface = interfaces[CAR.CHEVROLET_VOLT_ASCM] - volt_params = VoltInterface.get_params( - CAR.CHEVROLET_VOLT_ASCM, fingerprint, [], alpha_long=True, is_release=False, docs=False, - starpilot_toggles=_test_starpilot_toggles(), - ) - - assert lacrosse_params.safetyConfigs[0].safetyParam & GMSafetyFlags.FLAG_GM_LACROSSE_RADAR.value - assert not volt_params.safetyConfigs[0].safetyParam & GMSafetyFlags.FLAG_GM_LACROSSE_RADAR.value - def test_blazer_uses_earlier_stronger_low_speed_stop_tune(self): CarInterface = interfaces[CAR.CHEVROLET_BLAZER] fingerprint = _empty_fingerprint() diff --git a/opendbc_repo/opendbc/car/gm/values.py b/opendbc_repo/opendbc/car/gm/values.py index 99efe6801..9f4a3970f 100644 --- a/opendbc_repo/opendbc/car/gm/values.py +++ b/opendbc_repo/opendbc/car/gm/values.py @@ -174,8 +174,6 @@ class GMSafetyFlags(IntFlag): FLAG_GM_BOLT_2022_PEDAL = 4096 FLAG_GM_REMOTE_START_BOOTS_COMMA = 8192 FLAG_GM_PANDA_3D1_SCHED = 16384 - # Context-specific alias: the 3D1 scheduler remains inactive on this camera-long ACC path. - FLAG_GM_LACROSSE_RADAR = 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 d41e2b0c1..f365f9166 100644 --- a/opendbc_repo/opendbc/safety/modes/gm.h +++ b/opendbc_repo/opendbc/safety/modes/gm.h @@ -545,7 +545,6 @@ static safety_config gm_init(uint16_t param) { const uint16_t GM_PARAM_BOLT_2022_PEDAL = 4096; const uint16_t GM_PARAM_REMOTE_START_BOOTS_COMMA = 8192; const uint16_t GM_PARAM_PANDA_3D1_SCHED = 16384; - const uint16_t GM_PARAM_LACROSSE_RADAR = 16384; const uint16_t GM_PARAM_PANDA_PADDLE_SCHED = 32768; static const LongitudinalLimits GM_ASCM_LONG_LIMITS = { @@ -582,11 +581,6 @@ static safety_config gm_init(uint16_t param) { {0x184, 2, 8, .check_relay = true}, // camera bus {0x200, 0, 6, .check_relay = false}, {0x1E1, 0, 7, .check_relay = false}, {0xBD, 0, 7, .check_relay = false}, {0x1F5, 0, 8, .check_relay = false}}; // pt bus - static const CanMsg GM_CAM_LONG_LACROSSE_RADAR_TX_MSGS[] = {{0x180, 0, 4, .check_relay = true}, {0x315, 0, 5, .check_relay = true}, {0x2CB, 0, 8, .check_relay = true}, {0x370, 0, 6, .check_relay = true}, {0x3D1, 0, 8, .check_relay = false}, // pt bus - {0xA1, 1, 7, .check_relay = false}, {0x306, 1, 8, .check_relay = false}, {0x308, 1, 7, .check_relay = false}, {0x310, 1, 2, .check_relay = false}, // obs bus - {0x184, 2, 8, .check_relay = true}, // camera bus - {0x200, 0, 6, .check_relay = false}, {0x1E1, 0, 7, .check_relay = false}, - {0xBD, 0, 7, .check_relay = false}, {0x1F5, 0, 8, .check_relay = false}}; // pt bus static const CanMsg GM_CAM_LONG_NO_CAMERA_TX_MSGS[] = {{0x180, 0, 4, .check_relay = false}, {0x315, 0, 5, .check_relay = false}, {0x2CB, 0, 8, .check_relay = false}, {0x370, 0, 6, .check_relay = false}, {0x3D1, 0, 8, .check_relay = false}, // pt bus {0x409, 0, 7, .check_relay = false}, {0x40A, 0, 7, .check_relay = false}, @@ -733,7 +727,6 @@ static safety_config gm_init(uint16_t param) { gm_zero_u8(gm_prndl2_state.spoof_data, 8U); gm_cam_long = GET_FLAG(param, GM_PARAM_HW_CAM_LONG) && !gm_cc_long; - const bool gm_lacrosse_radar = GET_FLAG(param, GM_PARAM_LACROSSE_RADAR) && gm_ascm_int && gm_cam_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; const bool gm_ascm_int_no_accel_pos = gm_ascm_int && (gm_hw == GM_CAM) && gm_force_brake_c9; @@ -767,8 +760,6 @@ static safety_config gm_init(uint16_t param) { } else if (gm_cam_long) { if (gm_no_camera) { ret = BUILD_SAFETY_CFG(gm_rx_checks, GM_CAM_LONG_NO_CAMERA_TX_MSGS); - } else if (gm_lacrosse_radar) { - ret = BUILD_SAFETY_CFG(gm_rx_checks, GM_CAM_LONG_LACROSSE_RADAR_TX_MSGS); } else { ret = BUILD_SAFETY_CFG(gm_rx_checks, GM_CAM_LONG_TX_MSGS); } diff --git a/opendbc_repo/opendbc/safety/tests/test_gm.py b/opendbc_repo/opendbc/safety/tests/test_gm.py index b57cede7a..b6418726f 100755 --- a/opendbc_repo/opendbc/safety/tests/test_gm.py +++ b/opendbc_repo/opendbc/safety/tests/test_gm.py @@ -307,7 +307,7 @@ def test_gm_ascm_int_long_no_accel_pos_uses_stock_cam_rx_checks(): assert safety.safety_config_valid() -def test_lacrosse_radar_status_tx_requires_dedicated_camera_long_marker(): +def test_ascm_int_camera_long_blocks_radar_status_tx(): safety = libsafety_py.libsafety radar_status_msgs = ( (0xA1, 7), @@ -322,11 +322,6 @@ def test_lacrosse_radar_status_tx_requires_dedicated_camera_long_marker(): for addr, length in radar_status_msgs: assert not safety.safety_tx_hook(common.make_msg(1, addr, length)) - safety.set_safety_hooks(CarParams.SafetyModel.gm, ascm_int_long | GMSafetyFlags.FLAG_GM_LACROSSE_RADAR) - safety.init_tests() - for addr, length in radar_status_msgs: - assert safety.safety_tx_hook(common.make_msg(1, addr, length)) - volt_sdgm_long = GMSafetyFlags.HW_CAM | GMSafetyFlags.HW_CAM_LONG | GMSafetyFlags.HW_SDGM safety.set_safety_hooks(CarParams.SafetyModel.gm, volt_sdgm_long) safety.init_tests() diff --git a/panda/board/obj/body_h7.bin.signed b/panda/board/obj/body_h7.bin.signed index 5ae331d1b..f37ce3af2 100644 Binary files a/panda/board/obj/body_h7.bin.signed and b/panda/board/obj/body_h7.bin.signed differ diff --git a/panda/board/obj/body_h7/bootstub.elf b/panda/board/obj/body_h7/bootstub.elf index d3b9cf603..b8cd9a695 100755 Binary files a/panda/board/obj/body_h7/bootstub.elf and b/panda/board/obj/body_h7/bootstub.elf differ diff --git a/panda/board/obj/body_h7/main.bin b/panda/board/obj/body_h7/main.bin index b73f731c3..83a352859 100755 Binary files a/panda/board/obj/body_h7/main.bin and b/panda/board/obj/body_h7/main.bin differ diff --git a/panda/board/obj/body_h7/main.elf b/panda/board/obj/body_h7/main.elf index 8a624a994..664b87c1a 100755 Binary files a/panda/board/obj/body_h7/main.elf and b/panda/board/obj/body_h7/main.elf differ diff --git a/panda/board/obj/bootstub.body_h7.bin b/panda/board/obj/bootstub.body_h7.bin index 3dc409c20..0b50cef34 100755 Binary files a/panda/board/obj/bootstub.body_h7.bin and b/panda/board/obj/bootstub.body_h7.bin differ diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin index ec895f49d..f0787f320 100755 Binary files a/panda/board/obj/bootstub.panda.bin and b/panda/board/obj/bootstub.panda.bin differ diff --git a/panda/board/obj/bootstub.panda_h7.bin b/panda/board/obj/bootstub.panda_h7.bin index 52154619d..a56229954 100755 Binary files a/panda/board/obj/bootstub.panda_h7.bin and b/panda/board/obj/bootstub.panda_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_h7_remote.bin b/panda/board/obj/bootstub.panda_h7_remote.bin index 52154619d..a56229954 100755 Binary files a/panda/board/obj/bootstub.panda_h7_remote.bin and b/panda/board/obj/bootstub.panda_h7_remote.bin differ diff --git a/panda/board/obj/bootstub.panda_jungle_h7.bin b/panda/board/obj/bootstub.panda_jungle_h7.bin index 478f71e93..c88cb23ae 100755 Binary files a/panda/board/obj/bootstub.panda_jungle_h7.bin and b/panda/board/obj/bootstub.panda_jungle_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_remote.bin b/panda/board/obj/bootstub.panda_remote.bin index ec895f49d..f0787f320 100755 Binary files a/panda/board/obj/bootstub.panda_remote.bin and b/panda/board/obj/bootstub.panda_remote.bin differ diff --git a/panda/board/obj/gitversion.h b/panda/board/obj/gitversion.h index 6e293f7d2..c1defd2ee 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-05c2a90e-DEBUG"; +const uint8_t gitversion[19] = "DEV-7a3c1ede-DEBUG"; diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index 8269d5ebf..d7821f4a0 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/bootstub.elf b/panda/board/obj/panda/bootstub.elf index dae571098..b3e041a86 100755 Binary files a/panda/board/obj/panda/bootstub.elf and b/panda/board/obj/panda/bootstub.elf differ diff --git a/panda/board/obj/panda/main.bin b/panda/board/obj/panda/main.bin index d56665b94..ecbc25ff7 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 fadd1ef41..c39e833ec 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 c581b3ab2..90289f428 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/bootstub.elf b/panda/board/obj/panda_h7/bootstub.elf index 75688c32a..7810a1299 100755 Binary files a/panda/board/obj/panda_h7/bootstub.elf and b/panda/board/obj/panda_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_h7/main.bin b/panda/board/obj/panda_h7/main.bin index 9cc048066..55472eb60 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 7f0dd3510..98ebb767f 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/panda_h7_remote.bin.signed b/panda/board/obj/panda_h7_remote.bin.signed index 4a7a9f3b6..48744fc47 100644 Binary files a/panda/board/obj/panda_h7_remote.bin.signed and b/panda/board/obj/panda_h7_remote.bin.signed differ diff --git a/panda/board/obj/panda_h7_remote/bootstub.elf b/panda/board/obj/panda_h7_remote/bootstub.elf index af2eacb7d..fe3edfc17 100755 Binary files a/panda/board/obj/panda_h7_remote/bootstub.elf and b/panda/board/obj/panda_h7_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_h7_remote/main.bin b/panda/board/obj/panda_h7_remote/main.bin index 5feb915d4..dc8b411db 100755 Binary files a/panda/board/obj/panda_h7_remote/main.bin and b/panda/board/obj/panda_h7_remote/main.bin differ diff --git a/panda/board/obj/panda_h7_remote/main.elf b/panda/board/obj/panda_h7_remote/main.elf index 99382f159..08dbe7b35 100755 Binary files a/panda/board/obj/panda_h7_remote/main.elf and b/panda/board/obj/panda_h7_remote/main.elf differ diff --git a/panda/board/obj/panda_jungle_h7.bin.signed b/panda/board/obj/panda_jungle_h7.bin.signed index f7d7b8c61..b7229ae4e 100644 Binary files a/panda/board/obj/panda_jungle_h7.bin.signed and b/panda/board/obj/panda_jungle_h7.bin.signed differ diff --git a/panda/board/obj/panda_jungle_h7/bootstub.elf b/panda/board/obj/panda_jungle_h7/bootstub.elf index 10035e434..596e10e51 100755 Binary files a/panda/board/obj/panda_jungle_h7/bootstub.elf and b/panda/board/obj/panda_jungle_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_jungle_h7/main.bin b/panda/board/obj/panda_jungle_h7/main.bin index 8f799de79..9e08a84fa 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.bin and b/panda/board/obj/panda_jungle_h7/main.bin differ diff --git a/panda/board/obj/panda_jungle_h7/main.elf b/panda/board/obj/panda_jungle_h7/main.elf index 9ce48a377..4b36cfbea 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.elf and b/panda/board/obj/panda_jungle_h7/main.elf differ diff --git a/panda/board/obj/panda_remote.bin.signed b/panda/board/obj/panda_remote.bin.signed index 59e186d26..086bcda1a 100644 Binary files a/panda/board/obj/panda_remote.bin.signed and b/panda/board/obj/panda_remote.bin.signed differ diff --git a/panda/board/obj/panda_remote/bootstub.elf b/panda/board/obj/panda_remote/bootstub.elf index ab268fb04..7439b620e 100755 Binary files a/panda/board/obj/panda_remote/bootstub.elf and b/panda/board/obj/panda_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_remote/main.bin b/panda/board/obj/panda_remote/main.bin index cda20eb09..8f43db9ba 100755 Binary files a/panda/board/obj/panda_remote/main.bin and b/panda/board/obj/panda_remote/main.bin differ diff --git a/panda/board/obj/panda_remote/main.elf b/panda/board/obj/panda_remote/main.elf index 05d5aedfd..81f59ad8c 100755 Binary files a/panda/board/obj/panda_remote/main.elf and b/panda/board/obj/panda_remote/main.elf differ diff --git a/panda/board/obj/version b/panda/board/obj/version index d78518ee1..17aba18b1 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-05c2a90e-DEBUG \ No newline at end of file +DEV-7a3c1ede-DEBUG \ No newline at end of file