Hyundai CAN: Explicitly parse gear shifter values for `EV, HEV, PHEV`
Description
When the vehicle is in manual or alternative drive modes (e.g., Sport), openpilot currently fails to recognize the signals and returns with an “Gear not D” event, exiting the controls.
Added Jupyter notebook for validating Sport gear for CAN hybrid and electric vehicles.
Solution
This pull request implements support for parsing various forward gear signals and adds additional undefined forward gear signals to the DBC.
Validation
Analyzing segment 201c5aaced09a24a/2023-05-20--12-39-01/15/s for HYUNDAI IONIQ PHEV 2020
ELECT_GEAR gear=4.0
Requires
- https://github.com/commaai/opendbc/pull/1530
Reopen of
- https://github.com/commaai/openpilot/pull/30648
- https://github.com/commaai/opendbc/pull/981
After running against all 9000+ segments, only 2 results with the Sport gear on ELECT_GEAR | Elect_Gear_Shifter are found:
Analyzing segment 1220/9107
Non-Drive gear found in segment 201c5aaced09a24a/2023-05-20--12-39-01/15/s for HYUNDAI IONIQ PHEV 2020
ELECT_GEAR gear=4.0
Analyzing segment 1224/9107
Non-Drive gear found in segment b28e9dbe4004e915/2023-06-11--19-55-28/2/s for HYUNDAI IONIQ PHEV 2020
ELECT_GEAR gear=4.0
Analyzing segment 9107/9107 ...
Analysis finished. Total segments analyzed: 9107
Tests are failing due to opendbc not having the PR merged yet:
Run release/check-submodules.sh
From https://github.com/commaai/msgq
* branch master -> FETCH_HEAD
origin/HEAD -> origin/master
origin/master
msgq_repo ok
From https://github.com/commaai/opendbc
* branch master -> FETCH_HEAD
opendbc_repo: c742d425f[18](https://github.com/commaai/openpilot/actions/runs/12045155969/job/33583311955?pr=34113#step:6:19)5540392896ec2db3b22929a5ecb5f is not on master
Error: Process completed with exit code 1.
This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.
Can we please reopen this?
can you delete the notebook?
can you delete the notebook?
Done!