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

create_j1939db-json.py: wrong spn_startbit_inpgn for positions mixing - and , #28

Open
BenGardiner opened this issue Jan 26, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@BenGardiner
Copy link
Member

CC: @j4l-Shvn

e.g. SPN 8839 which lists position 3-4, 5.6 (in 201910 DA)
image

this is decoded as [16, 357] from

def get_spn_start_bit(contents):

@j4l-Shvn: I think your read of 1939-71 is correct https://github.com/j4l-Shvn/pretty_j1939/blob/3700b0abf51500c8a43a43b19be65313914e2787/create_j1939db-json.py#L174 BUT it seems like the authors of the DA do not treat the - and , the same.

I think 3-4, 5.6 should be interpreted as 8 bits at byte 3, 8 bits at byte 4 and remaining bits at "position" 5.6 (byte 5, 6th bit)

There are many more examples of mixing - and , in older DAs like e.g. SPN 1214 in 201311. These have mostly all gone away in newer DAs.

This is my best guess at the proper interpretation of those mixed fields. I would love to hear other's opinions too.

@BenGardiner BenGardiner changed the title wrong spn_startbit_inpgn for positions mixing - and , create_j1939db-json.py: wrong spn_startbit_inpgn for positions mixing - and , Jan 26, 2022
@BenGardiner BenGardiner added the bug Something isn't working label Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant