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.
Background
Previous signal was checking whether the immobilizer ID was being published. New signal is the power mode. The previous signal used before the immobilizer signal was the "backup" power mode which is noisy and doesn't describe cranking or accessory (#845).
This new
SystemPowerMode
describes the four ignition states: off, accessory, (on, and ignition together), and cranking.The problem
The problem with the current signal is that the immobilizer signal remains high in accessory mode, where various ECUs can fault or shut off (the EBCM on the Chevy Bolt, the PSCM on the ASCM Volt, as well as the Camera ACC Silverado). Other cars kill power to the camera in this state (Toyota for example).
The fix
This PR only considers on/ignition and crank request valid ignition states so we go offroad when in accessory mode (enterable by pressing power button in neutral).
Checks
Checked that the old-preconditioning issue (shows ignition with remote start) is not present in the new signal manually on the Bolt EUV and Volt, thanks to community member nworby:
Data
This signal also switches off a little under 100ms faster on average, preventing a fault from showing when pandaStates is 10Hz:
View
Some examples where the user enters accessory mode and the EBCM fault signal (Bolt) or LKA fault (Volt, Silverado) rises:
View
Some cases with more rare cars, all expected.
View
The other mismatches are small timing differences or expected accessory mode diffs:
View
Interesting notes
Checked 68,867 rlogs for last 1080 days and only 316 segments mismatch with the conditions above.