Files
StarPilot/openpilot/starpilot/speed_limits/vision_gate.py
T
firestar5683 14241d72c8 Speed limits
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.
2026-10-03 22:34:37 +00:00

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))))