-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Fixed little endian (and scaling/offset) #65
Conversation
Fixed little endian handling Fixed offset / scaling handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the endianness variable if unused. Then if test outputs look good I can merge.
common/dbc.py
Outdated
@@ -160,11 +163,17 @@ def decode(self, x, arr=None, debug=False): | |||
# big or little endian? | |||
# see http://vi-firmware.openxcplatform.com/en/master/config/bit-numbering.html | |||
if s[3] is False: | |||
endianness = "big" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable looks unused
ival = (ival + s[6])*s[5] | ||
if debug: | ||
print "%40s %2d %2d %7.2f %s" % (s[0], s[1], s[2], ival, s[-1]) | ||
ival = (ival * s[5]) + s[6] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, how did this work before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked only because almost all the signals in the Acura dbc had their offsets at zero!
Removed unused debug strings
Removed the unused debug comments. Should be good now! |
Merge pull request commaai#65 from commaai/devel
* Add Honda Clarity Hybrid * Update brake length and factor
updated linux driver docs
door detection.
* update labeler * update labeler * update labeler * Update labeler (#63) * update labeler * update labeler * update labeler * fix that * Update labeler (#65) * update labeler * update labeler * update labeler * fix that * and that * Update labeler (#66) * update labeler * update labeler * update labeler * fix that * and that * fix that
Make building easier
Make building easier
* MADS: better doorOpen event logic * unnecessary
Fixed little endian handling
Fixed offset / scaling handling
Works on my Tesla DBC (that has mixed little & big endian). Please test.