mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-08 05:23:41 +08:00
e4f3d6661c
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>
16 lines
679 B
Python
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"
|