diff --git a/openpilot/starpilot/lateral/controller_selection.py b/openpilot/starpilot/lateral/controller_selection.py index 5b68056066..377d3139b6 100644 --- a/openpilot/starpilot/lateral/controller_selection.py +++ b/openpilot/starpilot/lateral/controller_selection.py @@ -175,7 +175,8 @@ def default_selection(CP) -> ControllerSelection: policy = policy_for(CP) from openpilot.starpilot.lateral.hkg_vehicle_policy import PROFILES forte_non_scc = policy == 'kia_forte' and str(CP.carFingerprint) in ('KIA_FORTE_2019_NON_SCC', 'KIA_FORTE_2021_NON_SCC') - mode = ControllerMode.STARPILOT if policy and policy != 'generic' and (policy not in PROFILES or forte_non_scc) else ControllerMode.STANDARD + dom_default = forte_non_scc or policy == 'kia_carnival' + mode = ControllerMode.STARPILOT if policy and policy != 'generic' and (policy not in PROFILES or dom_default) else ControllerMode.STANDARD return ControllerSelection(mode, policy, 'default') diff --git a/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py b/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py index 90fd9c308b..409f322fa0 100644 --- a/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py +++ b/openpilot/starpilot/lateral/tests/test_hkg_torque_context.py @@ -26,7 +26,7 @@ from openpilot.starpilot.lateral import hkg_vehicle_shaping as shaping def test_actual_controller_context_defaults_live_tune_limits_and_off(monkeypatch, vehicle, helper, speed, curvature, direction, pressed): cp = interfaces[vehicle].get_non_essential_params(vehicle) ci = interfaces[vehicle](cp) - assert default_selection(cp).mode == ControllerMode.STANDARD + assert default_selection(cp).mode == (ControllerMode.STARPILOT if vehicle == CAR.KIA_CARNIVAL_HEV_4TH_GEN else ControllerMode.STANDARD) native = LatControlTorque(cp.as_reader(), ci, 0.01, controller_mode=ControllerMode.STANDARD) assert native.starpilot_extension is None actual = LatControlTorque(cp.as_reader(), ci, 0.01, controller_mode=ControllerMode.STARPILOT) diff --git a/openpilot/starpilot/lateral/tests/test_hkg_vehicle_policy.py b/openpilot/starpilot/lateral/tests/test_hkg_vehicle_policy.py index 6e376679fd..59f4a0135e 100644 --- a/openpilot/starpilot/lateral/tests/test_hkg_vehicle_policy.py +++ b/openpilot/starpilot/lateral/tests/test_hkg_vehicle_policy.py @@ -14,7 +14,8 @@ CASES = [(vehicle, profile, factor) for profile, (vehicles, factor) in PROFILES. def test_exact_profile_defaults_and_saved_controller_selection(vehicle, profile, factor): cp = interfaces[vehicle].get_non_essential_params(vehicle) assert policy_for(cp) == profile - expected = (ControllerMode.STARPILOT if vehicle in (CAR.KIA_FORTE_2019_NON_SCC, CAR.KIA_FORTE_2021_NON_SCC) + expected = (ControllerMode.STARPILOT if vehicle in (CAR.KIA_FORTE_2019_NON_SCC, CAR.KIA_FORTE_2021_NON_SCC, + CAR.KIA_CARNIVAL_2025, CAR.KIA_CARNIVAL_HEV_4TH_GEN) else ControllerMode.STANDARD) assert default_selection(cp).mode == expected for raw in (b'{', b'{"version":true,"vehicles":{}}', b'{"version":1,"vehicles":{},"vehicles":{}}', b'x' * 4097): diff --git a/prebuilt.json b/prebuilt.json index ce6a1d3a85..e69cf80876 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "fcd05ae38a6a2a27e0d5e38347a880f1eb9cee25539646aede1c9cdeeabd1bdb", "schema_version": 1} +{"protected_inventory_sha256": "2b8f1d352687ec27b020fd227cedcce3210daa40133ac6c6f42ee6b7e04b502b", "schema_version": 1}