mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-09 22:13:43 +08:00
2b1152adf7
Integrate vehicle-specific steering, longitudinal control, startup, and handoff policies, including Ioniq, EV9, GV70, and non-SCC configurations. Preserve the corresponding native safety and CAN routing contracts. Co-authored-by: Dom <168790843+firestar5683@users.noreply.github.com> Co-authored-by: firestarsdog <229254897+firestarsdog@users.noreply.github.com> Co-authored-by: Intelli <contact@intelli.software>
18 lines
612 B
Python
18 lines
612 B
Python
"""One-time Sonata Hybrid wheel assignment migration."""
|
|
|
|
import os
|
|
|
|
from opendbc.car.hyundai.values import CAR
|
|
|
|
MIGRATION_KEY = 'SonataHybridLKASButtonControlMigrated'
|
|
|
|
|
|
def migrate_lkas_default(cp, params):
|
|
if (getattr(cp, 'brand', None) != 'hyundai' or
|
|
getattr(cp, 'carFingerprint', None) != CAR.HYUNDAI_SONATA_HYBRID or params.get_bool(MIGRATION_KEY)):
|
|
return False
|
|
if params.get('LKASButtonControl') is None and not os.path.lexists(params.get_param_path('LKASButtonControl')):
|
|
params.put('LKASButtonControl', 9, block=True)
|
|
params.put_bool(MIGRATION_KEY, True, block=True)
|
|
return True
|