@ -247,16 +247,19 @@ class CarInterface(CarInterfaceBase):
# events
# events
events = self . create_common_events ( ret )
events = self . create_common_events ( ret )
if self . CS . low_speed_lockout and self . CP . openpilotLongitudinalControl :
if self . CP . openpilotLongitudinalControl :
events . add ( EventName . lowSpeedLockout )
if ret . cruiseState . standstill and not ret . brakePressed and not self . CP . enableGasInterceptor :
if ret . vEgo < self . CP . minEnableSpeed and self . CP . openpilotLongitudinalControl :
events . add ( EventName . resumeRequired )
events . add ( EventName . belowEngageSpeed )
if self . CS . low_speed_lockout :
if c . actuators . accel > 0.3 :
events . add ( EventName . lowSpeedLockout )
# some margin on the actuator to not false trigger cancellation while stopping
if ret . vEgo < self . CP . minEnableSpeed :
events . add ( EventName . speedTooLow )
events . add ( EventName . belowEngageSpeed )
if ret . vEgo < 0.001 :
if c . actuators . accel > 0.3 :
# while in standstill, send a user alert
# some margin on the actuator to not false trigger cancellation while stopping
events . add ( EventName . manualRestart )
events . add ( EventName . speedTooLow )
if ret . vEgo < 0.001 :
# while in standstill, send a user alert
events . add ( EventName . manualRestart )
ret . events = events . to_msg ( )
ret . events = events . to_msg ( )