-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Add CLEAR_ON_IGNITION_ON #35710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLEAR_ON_IGNITION_ON #35710
Conversation
…s. doing it in pandad wouldn't make sense. this okay?
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: system/hardware/hardwared.py
Did you find this useful? React with a 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a new parameter clearing mechanism to remember driver distraction state across system restarts when ignition is toggled on. This addresses the issue where driver distraction warnings were lost when restart_needed toggles were flipped.
- Adds
CLEAR_ON_IGNITION_ON
parameter type to selectively clear certain parameters when ignition turns on - Implements ignition state tracking in the manager to trigger parameter clearing when ignition transitions from off to on
- Modifies driver monitoring to persist distraction state using the new parameter clearing behavior
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
system/manager/manager.py | Adds ignition state tracking and clears CLEAR_ON_IGNITION_ON parameters when ignition turns on |
selfdrive/monitoring/helpers.py | Implements persistent driver distraction state using DriverTooDistracted parameter |
common/params_pyx.pyx | Exposes new CLEAR_ON_IGNITION_ON parameter type to Python |
common/params_keys.h | Configures DriverTooDistracted parameter with appropriate clearing behavior |
common/params.h | Defines the new CLEAR_ON_IGNITION_ON parameter type constant |
Co-authored-by: Copilot <[email protected]>
Closes #35708
Remembers if driver was distracted if a restart_needed toggle was flipped