mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 04:22:09 +08:00
Force Stop bugfix: gap behind leads
Force Stop (cem_path) was missing a tracking_lead guard, causing it to activate behind stopped leads at red lights and stop signs — stopping the car far short of the lead instead of letting ACC handle following distance. Added and not self.starpilot_planner.tracking_lead to cem_path, matching the guard already present on dash_path.
This commit is contained in:
@@ -65,12 +65,16 @@ class StarPilotVCruise:
|
||||
long_control_active = sm["carControl"].longActive
|
||||
|
||||
# ----- Activation paths -----
|
||||
# CEM/model path: model predicted stop within ACTIVATION_M
|
||||
# CEM/model path: model predicted stop within ACTIVATION_M.
|
||||
# Exclude when tracking a lead — the handoff_to_stopped_lead path in CEM can set
|
||||
# stop_light_detected even with a lead present, which would incorrectly activate
|
||||
# Force Stop and stop the car far behind the lead instead of letting ACC handle it.
|
||||
cem_path = (self.starpilot_planner.starpilot_cem.stop_light_detected
|
||||
and controls_enabled and starpilot_toggles.force_stops
|
||||
and self.starpilot_planner.model_length < ACTIVATION_M
|
||||
and self.override_force_stop_timer <= 0
|
||||
and not self.starpilot_planner.driving_in_curve)
|
||||
and not self.starpilot_planner.driving_in_curve
|
||||
and not self.starpilot_planner.tracking_lead)
|
||||
|
||||
# Dashboard path: ADAS camera confirms a stop sign on our road. Field is 0 on
|
||||
# platforms that don't publish ADAS_0x380, so dash_path is naturally inert there.
|
||||
|
||||
Reference in New Issue
Block a user