Skip to content
This repository was archived by the owner on Apr 1, 2022. It is now read-only.
This repository was archived by the owner on Apr 1, 2022. It is now read-only.

Values of messages are completely wrong in Linux (endianness problem) #3

@smerchek

Description

@smerchek

The FIT SDK claims to handle the endianness of the various fields for each message. I do see that there is some logic for this; however, running decoding the example Activity.fit file yields different results on a Windows system and a Linux system.

For example, for the first record, mesg.GetTimestamp(), on Windows returns 702940946 which seems correct based on the csv value for the same record. However, on linux, the value is 319284777. I get this same value on Windows if I swap the bytes before printing the result.

I've asked for help on who's responsibility this is in the FIT SDK forum.

The solution may just be to detect the endianness of the the environment and adjust values accordingly. I feel like the SDK should handle this though. I could also just be doing something wrong.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions