Toyota: alert when in standstill (#26585)

* add resume required alert

* possibly need this (pressing resume with brake held does nothing)

* better text (has both meanings)

* try this

* Revert "try this"

This reverts commit 5b2991929b.

* no alert with interceptor

* check long
old-commit-hash: 3253b85900
taco
Shane Smiskol 2 years ago committed by GitHub
parent 9790dffe6d
commit bcdbd8edb9
  1. 7
      selfdrive/car/toyota/interface.py
  2. 2
      selfdrive/controls/lib/events.py

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

@ -501,7 +501,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, AlertCallbackType]]] = {
EventName.resumeRequired: {
ET.WARNING: Alert(
"STOPPED",
"Press Resume to Go",
"Press Resume to Exit Standstill",
AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2),
},

Loading…
Cancel
Save