mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-12 15:33:45 +08:00
15 lines
700 B
Python
15 lines
700 B
Python
from opendbc.car.hyundai.classic_long_aol import independent_buttons_qualified
|
|
from openpilot.starpilot.aol.intent import AolCardIntent
|
|
|
|
|
|
class ClassicLongCardIntent(AolCardIntent):
|
|
def __init__(self, cp, settings):
|
|
super().__init__(settings, explicit_latch=True, independent_cruise_buttons=(
|
|
independent_buttons_qualified(cp, marked_only=False) and settings.lkas_action == 9 and settings.main_action == 0))
|
|
self.requires_fault_observation = True
|
|
self.observe_stock_engagement = True
|
|
|
|
def _arm_from_full_engagement(self, CS, *, source_ns):
|
|
if not (CS.steerFaultTemporary or CS.gasPressed or CS.brakePressed):
|
|
super()._arm_from_full_engagement(CS, source_ns=source_ns)
|