Allow brake hold (#34384)

* allow brake hold

* rev
pull/34410/head
Shane Smiskol 3 months ago committed by GitHub
parent 0539df7685
commit 37b4e61b00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      selfdrive/car/car_specific.py
  2. 7
      selfdrive/selfdrived/events.py

@ -191,7 +191,7 @@ class CarSpecificEvents:
events.add(EventName.speedTooHigh) events.add(EventName.speedTooHigh)
if CS.cruiseState.nonAdaptive: if CS.cruiseState.nonAdaptive:
events.add(EventName.wrongCruiseMode) events.add(EventName.wrongCruiseMode)
if CS.brakeHoldActive and self.CP.openpilotLongitudinalControl and self.CP.carName != 'toyota': if CS.brakeHoldActive and self.CP.openpilotLongitudinalControl:
events.add(EventName.brakeHold) events.add(EventName.brakeHold)
if CS.parkingBrake: if CS.parkingBrake:
events.add(EventName.parkBrake) events.add(EventName.parkBrake)

@ -634,8 +634,11 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
}, },
EventName.brakeHold: { EventName.brakeHold: {
ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), ET.WARNING: Alert(
ET.NO_ENTRY: NoEntryAlert("Brake Hold Active"), "Press Resume to Exit Brake Hold",
"",
AlertStatus.userPrompt, AlertSize.small,
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2),
}, },
EventName.parkBrake: { EventName.parkBrake: {

Loading…
Cancel
Save