dm: suppress audible alert at standstill #37071
Open
+18
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Driver monitoring intended behavior is that when you are stopped = visual only, no audible.
This handles the edge case where someone was already at orange while driving and then stopped.
Description
When awareness is at orange level and vehicle is stopped, emit
preDriverDistracted(green/visual-only) instead ofpromptDriverDistracted(orange/audible).This aligns with comma's philosophy that driver monitoring shouldn't actively enforce when not moving (per George Hotz in https://youtu.be/-qf1NzI1I7E?t=52). The existing
standstill_orange_exemptionpauses countdown at the orange boundary, but if a driver was already at orange while driving and then stopped, they'd still hear the audible alert. This change downgrades it to visual-only at standstill.Behavior:
Verification
In
selfdrive/monitoring/test_monitoring.py:existing
test_long_traffic_light_victimpartially covers this:preDriverDistracted(green) while at standstill (59.9s)promptDriverDistracted(orange) after the car starts moving (60.5s)new
test_distracted_then_stops:threshold