|
|
@ -420,16 +420,6 @@ class Controls: |
|
|
|
if self.sm['liveLocationKalman'].excessiveResets: |
|
|
|
if self.sm['liveLocationKalman'].excessiveResets: |
|
|
|
self.events.add(EventName.localizerMalfunction) |
|
|
|
self.events.add(EventName.localizerMalfunction) |
|
|
|
|
|
|
|
|
|
|
|
# Only allow engagement with brake pressed when stopped behind another stopped car |
|
|
|
|
|
|
|
speeds = self.sm['longitudinalPlan'].speeds |
|
|
|
|
|
|
|
if len(speeds) > 1: |
|
|
|
|
|
|
|
v_future = speeds[-1] |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
v_future = 100.0 |
|
|
|
|
|
|
|
if CS.brakePressed and v_future >= self.CP.vEgoStarting \ |
|
|
|
|
|
|
|
and self.CP.openpilotLongitudinalControl and CS.vEgo < 0.3: |
|
|
|
|
|
|
|
self.events.add(EventName.noTarget) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def data_sample(self): |
|
|
|
def data_sample(self): |
|
|
|
"""Receive data from sockets and update carState""" |
|
|
|
"""Receive data from sockets and update carState""" |
|
|
|
|
|
|
|
|
|
|
|