Skip to content

GM: Add passive safety mode#266

Merged
rbiasini merged 1 commit intocommaai:masterfrom
vntarasov:gm-passive
Sep 8, 2019
Merged

GM: Add passive safety mode#266
rbiasini merged 1 commit intocommaai:masterfrom
vntarasov:gm-passive

Conversation

@vntarasov
Copy link
Copy Markdown
Contributor

Redo of commaai/openpilot#487: adding a separate, passive version of GM safety model, to allow EONs to be used as dashcams on stock GM cars (with ASCM present), or in chffrplus passive mode.

To be used with https://github.com/vntarasov/openpilot/tree/gm-passive2, which is to be updated with a panda repo sync.

@rbiasini
Copy link
Copy Markdown
Contributor

rbiasini commented Sep 4, 2019

ok, makes sense. I think a clean way to handle this safety mode is to add safetyModelPassive in interface.py for each car. For GM

safetyModel = car.CarParams.SafetyModel.gm
safetyModelPassive = car.CarParams.SafetyModel.gmPassive

While for most of the other cars that don't have a specific passive safety mode, it will look like:

safetyModel = car.CarParams.SafetyModel.<carBrand>
safetyModelPassive = car.CarParams.SafetyModel.elm327


const safety_hooks gm_passive_hooks = {
.init = gm_init,
.rx = gm_passive_rx_hook,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok to just use gm_rx_hook here. As long as nooutput_tx_hook and default_fwd_hook are set, there is really no risk.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rbiasini, actually gm_rx_hook modifies contorls_allowed, and that goes into both health packet, and controls green LED of the panda. I thought it would be misleading to have a wrong value for that, hence copy-pasted code for determining the ignition.

@rbiasini
Copy link
Copy Markdown
Contributor

rbiasini commented Sep 5, 2019 via email

@vntarasov
Copy link
Copy Markdown
Contributor Author

@rbiasini So... can panda change be merged, or more changes are needed?

@rbiasini rbiasini merged commit bf1ef87 into commaai:master Sep 8, 2019
@rbiasini
Copy link
Copy Markdown
Contributor

rbiasini commented Sep 8, 2019

pushed changes to openpilot as well, so that this safety model is used. Will be in next release.

@vntarasov vntarasov deleted the gm-passive branch September 10, 2019 05:08
liruifeng1120 pushed a commit to liruifeng1120/panda that referenced this pull request Dec 24, 2025
* Update to correct GAS_PEDAL in DBC

Originally referenced GAS_PEDAL_2 , but that was an error.

BO_ 316 GAS_PEDAL matched vehicle

* Update honda_hrv_touring_2019_can_generated.dbc

* Update honda_hrv_touring_2019_can.dbc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants