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

fitdump.pl message_index Support (text and JSON) #13

Open
jameswberry opened this issue Sep 14, 2017 · 2 comments
Open

fitdump.pl message_index Support (text and JSON) #13

jameswberry opened this issue Sep 14, 2017 · 2 comments

Comments

@jameswberry
Copy link

There are now 10 messages for bike_profile with message_number=6 in Settings.fit. Each of these messages has a message_index field which contains the sub-field mask which contains what appears to be a valid index value.

bike_profile (6, type: 0, length: 81 bytes):
    name (0-16-STRING): "Bike 10"\n
    message_index (254-1-UINT16): selected=0,reserved=0,mask=9 (9)
    ...

It's unclear how one might reference a specific index of a single message_number.

Is this supported?

@mrihtar
Copy link
Owner

mrihtar commented Sep 19, 2017

The mask value (the least significant 12 bits of message_index, see Profile.xlsx in SDK) is indeed the index. It's used in SDK C code for locating a message in a file by specifying the global message number and message index. The selected bit is more interesting though - it would indicate the active user/bike profile in your example.

@jameswberry
Copy link
Author

jameswberry commented Sep 19, 2017

Ok, that makes sense. Thanks for clarifying.

What I'm actually trying to do is translate the data available in the fitdump.pl JSON output, with a valid message_number+message_index combination for fitsed.pl. This would allow for my library to modify all of the values in a .fit like Settings.fit, including those with sub-indexes like bike_profile.

::EDIT: Making my question more generic and on topic ::

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

No branches or pull requests

2 participants