Skip to content
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

Toyota LTA: fix the way the torque sample_t's are used #1948

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sshane
Copy link
Contributor

@sshane sshane commented May 14, 2024

The problem is how the safety was using the torque samples to enforce the torque winddown. To avoid erroneous blocked messages from panda getting a steer torque message before openpilot, we used the minimum of the last few values which provides tolerance. But this doesn't work if the torque oscillates heavily above the threshold, like when going over a pot hole.

After the oscillation, openpilot tries to enable torque correctly, but panda still thinks that torque is high since it isn't using the latest value, only the min.

image

8494c69d3c710e81/00000019--7c84cbf43c/11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix car safety vehicle-specific safety code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant