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

Rivian: add Safety #1753

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

Conversation

lukasloetkolben
Copy link
Contributor

No description provided.

@sshane
Copy link
Contributor

sshane commented Feb 20, 2025

Can you check the failing safety tests?

@lukasloetkolben
Copy link
Contributor Author

Yes, I am currently traveling. I will have a look this evening.

@github-actions github-actions bot added the car safety vehicle-specific safety code label Feb 23, 2025
Comment on lines 21 to 22
int torque_driver_new = ((((GET_BYTE(to_push, 2) << 4) | (GET_BYTE(to_push, 3) >> 4)) * 0.1) - 205);
update_sample(&torque_driver, torque_driver_new);
Copy link
Contributor

@sshane sshane Feb 23, 2025

Choose a reason for hiding this comment

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

driver_torque_allowance is an integer, but you're converting this to a very small float (that's getting truncated to an int with update_sample), are you sure this is doing anything?

we probably want to undo the factor (but keep the offset) and process as a raw int in openpilot and opendbc safety

Copy link
Contributor

Choose a reason for hiding this comment

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

so subtract 205/0.1=2050 here

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

Successfully merging this pull request may close these issues.

3 participants