8000 Troubles creating "course" file types · Issue #55 · tormoder/fit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Troubles creating "course" file types #55

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

Closed
pieterclaerhout opened this issue Mar 7, 2021 · 3 comments
Closed

Troubles creating "course" file types #55

pieterclaerhout opened this issue Mar 7, 2021 · 3 comments

Comments

@pieterclaerhout
Copy link
Contributor
pieterclaerhout commented Mar 7, 2021

I'm trying to use this library to generate fit files of the type "course".

I'm able to generate them, but they always come out as invalid.

After a lot of investigation, it turns out that the main issue is that for a "course" file, the SDK doesn't allow you to define event messages (it only allows this for "activity" files). From what I can read in the Garmin Fit SDK and the cookbook samples, the timer events are required.

Am I overlooking something or does the SDK currently doesn't allow you to do this?

@tormoder
Copy link
Owner
tormoder commented Mar 8, 2021

Thanks for reporting the issue.

I made the file types structs a long time ago based on the PDF, FIT FILE TYPES Description, found in the SDK distribution. The Event message is (still) not mentioned there under Course File section.

But, as you say, I can see it mentioned here: https://developer.garmin.com/fit/file-types/course/

I think it would be easy to just add an EventMsg slice (as for ActivityFile) here:
https://github.com/tormoder/fit/blob/master/file_types.go#L61
and adjust the add method.

I can try to do it later, but a PR is also welcome.

@pieterclaerhout
Copy link
Contributor Author

Adding that fixed it and I've submitted a PR :-)

pieterclaerhout added a commit to pieterclaerhout/fit that referenced this issue Mar 9, 2021
@tormoder
Copy link
Owner

Tagged v0.10.0.

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
0