Files
StarPilot/openpilot/starpilot/longitudinal/voacc.py
T
firestar5683 e4f3d6661c Longitudinal
Implement acceleration profiles, FollowJerk, force-stop and lead-departure owners. Keep selected acceleration limits and hazard arbitration explicit at their shared boundaries.

Co-authored-by: whoisdomi <dcantu83@gmail.com>
2026-10-14 20:02:39 -05:00

16 lines
679 B
Python

"""Drive-start selection of vision-only longitudinal leads."""
from openpilot.starpilot.saved_source import read_saved
KEY = "UseVOACC"
DESCRIPTION = ("Use vision-only adaptive cruise control instead of radar-assisted lead detection. " +
"Requires StarPilot longitudinal control. Applies next drive; radar faults and safety checks remain active.")
def selected(params, cp) -> bool:
if (cp is None or not getattr(cp, "openpilotLongitudinalControl", False) or
getattr(cp, "notCar", True) or getattr(cp, "dashcamOnly", True) or getattr(cp, "passive", True)):
return False
raw, readable = read_saved(params, KEY, 8)
return readable and raw == b"1"