Closed davidkroell closed 4 years ago
Hi, thank you for your contribution. What would be the use case for this?
It's been a while, but I think a Fit file can only have one type. So setting it to e.g. a WeightFile would require to update at least the FileId message type field also.
It would also be nice to a have generic setter, either through reflection, or a setter for all types as for the getters.
Hi, I used this to manually create a Fit File from pure Go and encode it.
I haven't found a method or documentation to do this in another way. I debugged the decoding and encoding and i found out that the weight field is private in the fit.File
type, so i decided to create a method to set this.
It would also be nice to a have generic setter, either through reflection, or a setter for all types as for the getters.
Yeah, I know but currently I only needed the Weight. I could work on this if you want to.
Dear @tormoder, what is the status on this?
@davidkroell The changes in #49 should make this possible.
The change by @colinrgodsey is more general, so I will close this PR.
Sorry for my non-responsiveness on this issue.
This pull adds functionality to set the WeightFile on the fit.File type. currently only reading is possible.
Best regards, David