Restore the proven Kona steering handoff

This commit is contained in:
firestar5683
2026-11-23 15:48:36 -06:00
parent ef38e75164
commit cf26c720f0
3 changed files with 5 additions and 6 deletions
@@ -37,7 +37,7 @@ def test_factory_ccnc_alpha_admits_only_matching_owner(car, alternate, offset):
assert qualified_long(cp) and independent_cruise_buttons_supported(cp)
policy = policy_for(cp)
assert policy.intent_supported and policy.runtime_supported and policy.explicit_latch
expected = 0x1800 if car == CARS[0] and not alternate and offset == 0 else 0x800
expected = 0x800
assert policy.safety_param_addition == expected and policy.alternative_experience_addition == 32
assert cp.to_dict() == original
word = int(cp.safetyConfigs[-1].safetyParam) | expected
@@ -109,8 +109,7 @@ def test_actual_card_marker_and_settings_preserve_startup_contract(car, alternat
try:
with structs.CarParams.from_bytes(saved.get('CarParams')) as published:
assert published.openpilotLongitudinalControl and not published.pcmCruise
addition = 0x1800 if car == CARS[0] and not alternate and offset == 0 else 0x800
assert published.safetyConfigs[-1].safetyParam == (base_word | (addition if enabled else 0))
assert published.safetyConfigs[-1].safetyParam == (base_word | (0x800 if enabled else 0))
assert published.alternativeExperience == (32 if enabled else 0)
assert qualified_long(published, marked_only=enabled)
assert CarInterface.startup_required(published) == required
+2 -2
View File
@@ -25,7 +25,7 @@ from opendbc.car.hyundai.classic_scc_aol import (
from opendbc.car.hyundai.canfd_owner import config_index
from opendbc.car.hyundai.canfd_stock_aol import (
qualified as qualified_canfd_stock, qualified_long as qualified_canfd_long,
LONG_AOL_WORDS as CANFD_LONG_AOL_WORDS, STOCK_AOL_MARKER, STOCK_AOL_WORDS, kona_idle_handoff_profile,
LONG_AOL_WORDS as CANFD_LONG_AOL_WORDS, STOCK_AOL_MARKER, STOCK_AOL_WORDS,
)
from opendbc.car.hyundai.non_scc_aol import qualified as qualified_non_scc, aol_word, AOL_MARKER, AOL_EXPERIENCE, AOL_WORDS, SOFTWARE_CRUISE
from opendbc.car.hyundai.kona_aol import allow_lateral_onset as kona_lateral_onset
@@ -154,7 +154,7 @@ def _policy_for(CP) -> AolVehiclePolicy:
if qualified_canfd_long(CP):
return AolVehiclePolicy(intent_supported=True, settings_supported=True, runtime_supported=True,
normal_runtime_supported=True, explicit_latch=True,
safety_param_addition=0x1800 if kona_idle_handoff_profile(CP) else 0x0800,
safety_param_addition=0x0800,
alternative_experience_addition=32)
if qualified_canfd_stock(CP):
return AolVehiclePolicy(
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "56fc102e1694e9b29dbdc53776727f4f21d1f2d5962dafbad22094fa02c8c26d", "schema_version": 1}
{"protected_inventory_sha256": "77f98ad412b3865bebaf283929c910006755ad37f04e87612cab2711b59ce7aa", "schema_version": 1}