Garmin support: ignore FIT files that aren't dives

Linus Torvalds torvalds at
Tue Sep 4 19:19:10 PDT 2018

On Tue, Sep 4, 2018 at 6:55 PM Dirk Hohndel <dirk at> wrote:
> I didn't find any mention that the indices are ordered. Feel free to
> ignore the attached patch - but it seems a very small price to ensure
> we don't use the data for a different device index by mistake.

So that patch looks correct.

As to the indexes being ordered, the whole "device_index" field isn't
even guaranteed to exist at all, according to the docs I have.

But when they talk about "Common fields" (4.7 in the FIT protocol
specs) they do make it clear that both message index and part index
has to start at 0 and increment.

But device_index isn't actually mentioned there at all.

In the XLS file, it says that device_index 0 is the "creator of the
file", but don't explain what that even means.

So I'm a bit leery of the whole device_index simply because it doesn't
seem to make a lot of sense.

Basically I'm not sure that "device_index=0" has any more meaning than
"first DeviceInfo you see" does.

I'd much prefer to just use the FILE message, which doesn't have this
ambiguity at all, but which also doesn't have that firmware field at

Maybe somebody else has better FIT/Garmin docs.


More information about the subsurface mailing list