jimmykane / fit-parser

Parse your FIT files easily, directly from JS (Garmin, Polar, Suunto)
Other
92 stars 33 forks source link

Support both summary first and last Fit file format #32

Closed gie3d closed 12 months ago

gie3d commented 1 year ago

Refer to the https://github.com/jimmykane/fit-parser/issues/31 issue and as Garmin will change the Fit file format (https://forums.garmin.com/developer/fit-sdk/b/news-announcements/posts/important-fit-activity-file-message-change) from Summary Last to Summary First on Dec 1st, 2023. I propose another way for cascade mode in order to support both Fit file summary format.

gie3d commented 12 months ago

Reviewed.

Left 2 minor comments (just questions/suggestions, not requests for change).

I assume that the only problem was in the cacade mode (I see the changes only around this mode), right?

Thanks for your effort. I think you can add yourself as contributor in package.json. I guess @jimmykane won't have objections. 🙂

Yes, the main different between Summary First and Summary Last is the sequence of message and the timestamp. So that's why it's directly impact how this library can map parent-child relationship between record, length, lap and session (the cascade mode was created to have parent-child relation in its json). However the list mode doesn't care about that relation. That's why there is no change in list mode.

And another thing that worth mention here is the behavior of timestamp in session and lap is different between Summary First and Summary Last.

In this PR, I intentionally do nothing about it because the timestamp is the time when the data is created.

krzysztof-cislo commented 12 months ago

@jimmykane will you find time to merge PR and create new release?

jimmykane commented 12 months ago

Let's merge this asap next week

A big thanks to all

On Sun, 19 Nov 2023, 11:18 am Krzysztof Cisło, @.***> wrote:

@jimmykane https://github.com/jimmykane will you find time to merge PR and create new release?

— Reply to this email directly, view it on GitHub https://github.com/jimmykane/fit-parser/pull/32#issuecomment-1817796918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVX42ULMUUHNLJ2WBISD3YFHFGLAVCNFSM6AAAAAA7KNTWJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXG44TMOJRHA . You are receiving this because you were mentioned.Message ID: @.***>

jimmykane commented 12 months ago

Its published now fellas