mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-10 06:23:43 +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>
17 lines
624 B
Python
17 lines
624 B
Python
"""Optional G90 display input; missing radar never gates ordinary controls."""
|
|
from opendbc.car.hyundai.g90_lead import LeadObservation
|
|
from openpilot.starpilot.longitudinal.radar_lead_context import RadarLeadContext
|
|
|
|
|
|
class G90LeadInputs(RadarLeadContext):
|
|
def __init__(self):
|
|
super().__init__(require_radar=True)
|
|
|
|
def update(self):
|
|
context = super().update()
|
|
if context is None:
|
|
return None
|
|
radar = context.radar
|
|
return LeadObservation(context.drive_id, radar.producer_ns, radar.receipt_ns, context.mono_now_ns,
|
|
radar.present, radar.distance, radar.relative_speed)
|