Garmin-FIT
Garmin-FIT copied to clipboard
fitdump.pl message_index Support (text and JSON)
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?
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.
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 ::