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

Fixed little endian (and scaling/offset) #65

Merged
merged 2 commits into from
Mar 2, 2017
Merged

Fixed little endian (and scaling/offset) #65

merged 2 commits into from
Mar 2, 2017

Conversation

jeankalud
Copy link

Fixed little endian handling
Fixed offset / scaling handling

Works on my Tesla DBC (that has mixed little & big endian). Please test.

Fixed little endian handling
Fixed offset / scaling handling
Copy link
Contributor

@geohot geohot left a 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"
Copy link
Contributor

@geohot geohot Mar 1, 2017

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]
Copy link
Contributor

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?

Copy link

@TheMutley TheMutley Mar 1, 2017

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
@jeankalud
Copy link
Author

Removed the unused debug comments. Should be good now!

@geohot geohot merged commit 0a747f9 into commaai:master Mar 2, 2017
geohot pushed a commit that referenced this pull request Jan 19, 2018
8753665 Fix Chevy Volt actuator signal parsing (#66)
89963c9 Toyota: added auto high beam
b07a84d Add Honda Clarity Hybrid (#65)
ca352b3 add hyundai 2015 (#63)

git-subtree-dir: opendbc
git-subtree-split: 8753665
icmma added a commit to priuscom/openpilot that referenced this pull request Jan 28, 2019
icmma added a commit to priuscom/openpilot that referenced this pull request Jan 28, 2019
Merge pull request commaai#65 from commaai/devel
avolmensky pushed a commit to avolmensky/openpilot that referenced this pull request Jun 10, 2019
* Add Honda Clarity Hybrid

* Update brake length and factor
avolmensky pushed a commit to avolmensky/openpilot that referenced this pull request Jun 30, 2019
sjkoon pushed a commit to sjkoon/openpilot that referenced this pull request Mar 13, 2020
jnewb1 added a commit that referenced this pull request Dec 28, 2023
* 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
garrettpall pushed a commit to garrettpall/openpilot that referenced this pull request Jan 30, 2024
garrettpall pushed a commit to garrettpall/openpilot that referenced this pull request Feb 1, 2024
carleeno pushed a commit to carleeno/openpilot that referenced this pull request Aug 2, 2024
* MADS: better doorOpen event logic

* unnecessary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants