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

Subaru global imperial/metric ACC speed fix #638

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@martinl
Copy link

commented May 11, 2019

Openpilot shows Subaru global ACC set speed incorrectly when car has been set to use metric units in dash menu. This PR adds CAN units signal to dbc and conditional mph to kph ACC speed unit conversion according to units signal value

SG_ Checksum : 0|8@1+ (1,0) [0|255] "" XXX
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
SG_ NEW_SIGNAL_3 : 16|4@1+ (1,0) [0|15] "" XXX
SG_ Units : 27|5@1+ (1,0) [5|27] "" XXX

This comment has been minimized.

Copy link
@rbiasini

rbiasini May 12, 2019

Contributor

I don't think unit should be 5 bits. Wouldn't be better:

SG_ Units : 29|3@1+ (1,0) [0|7] "" XXX
imperial = 1 (b001)
metric = 6 (b110)

?

@rbiasini

This comment has been minimized.

Copy link
Contributor

commented May 12, 2019

Looks good. See my comment on the dbc file. This change is already merged into our internal branch and it will be out with the next OP version. Thanks!

@rbiasini rbiasini closed this May 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.