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

GM: use GM safety model even if passive #487

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
2 participants
@vntarasov
Copy link
Contributor

vntarasov commented Dec 26, 2018

Symptom:
On some GM cars, in stock, openpilot will start-stop recording arbitrarily during the drive.

Problem:
"car started" on GM uses CAN-based ignition hook, and on cars where battery voltage drops below openpilot's threshold (e.g. when engine turns off on a full stop), drive recording stops. Main two cases are 1) chffrplus, and 2) openpilot forced to passive mode because stock LKA / ACC modules are online.

Proposal:
Instead of tweaking battery voltage threshold (doesn't fix the problem for soft hybrids), always use GM's CAN-based ignition logic on GM cars, even in chffrplus / passive openpilot.

Pros:

  • Setting safety model to noOutput is redundant, since controlsd sets sendcan to None if passive.
  • If either LKA or ACC commands are being sent by stock modules, GM safety model in Panda goes to full silence, not even chimes or radar configuration will be sent.

Cons:

  • GM safety model in Panda doesn't know if openpilot is running in passive mode, and, for example, will still set controls_allowed to 1, if driver presses "set" / "reset". On GM cars without LKA/ACC features, or with those modules disconnected, chffrplus would drive on sending-ready panda.

Let me know if you guys can think of a better solution, or if GM safety model needs a special "passive" mode, for example, entered by passing a special CarParams.safetyParam.

@rbiasini

This comment has been minimized.

Copy link
Contributor

rbiasini commented Dec 27, 2018

... or if GM safety model needs a special "passive" mode, for example, entered by passing a special CarParams.safetyParam.

I think a better solution would be to define a "gm passive safety model" in panda, where fwd hook is no_output, but the ignition hook remains the gm one (the same thing should be done for other cars as well). For safety reasons, I would prefer passive==1 to put panda in a state where any message sending is disallowed.

@vntarasov

This comment has been minimized.

Copy link
Contributor Author

vntarasov commented Jan 8, 2019

Will add gm_passive safety model.

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