mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-12 15:33:45 +08:00
14241d72c8
Select qualified speed-limit sources, preserve acceptance and override decisions, and publish distinct control and display coordinates. Carry accepted and pending source identity with each displayed decision.
12 lines
620 B
Python
12 lines
620 B
Python
"""Availability of the optional camera speed-limit source."""
|
|
|
|
from collections.abc import Mapping
|
|
from openpilot.starpilot.car.hyundai.aol import ioniq6_settings_capable
|
|
from opendbc.car.gm.feature_capabilities import display_supported as gm_display_supported
|
|
|
|
|
|
def diagnostic_choice_enabled(environment: Mapping[str, str], cp=None) -> bool:
|
|
# A saved source choice does not itself authorize Vision speed control.
|
|
return ((environment.get("SLC_REPLAY_RUNTIME") == "1" and environment.get("SLC_VISION_DEVELOPMENT") == "1") or
|
|
(cp is not None and (ioniq6_settings_capable(cp) or gm_display_supported(cp))))
|