Skip to content

Commit

Permalink
Allow brake hold (#34384)
Browse files Browse the repository at this point in the history
* allow brake hold

* rev
  • Loading branch information
sshane authored Jan 16, 2025
1 parent 0539df7 commit 37b4e61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion selfdrive/car/car_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def create_common_events(self, CS: structs.CarState, CS_prev: car.CarState, extr
events.add(EventName.speedTooHigh)
if CS.cruiseState.nonAdaptive:
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)
if CS.parkingBrake:
events.add(EventName.parkBrake)
Expand Down
7 changes: 5 additions & 2 deletions selfdrive/selfdrived/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,11 @@ def personality_changed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging
},

EventName.brakeHold: {
ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
ET.NO_ENTRY: NoEntryAlert("Brake Hold Active"),
ET.WARNING: Alert(
"Press Resume to Exit Brake Hold",
"",
AlertStatus.userPrompt, AlertSize.small,
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2),
},

EventName.parkBrake: {
Expand Down

0 comments on commit 37b4e61

Please sign in to comment.