Skip to content
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

refactor!: mesgdef update, fix & other improvements #51

Merged
merged 5 commits into from
Dec 19, 2023

Conversation

muktihari
Copy link
Owner

1. Mesgdef

  • Messages now receiving pointer to mesg, if mesg nil, it will return a struct with all fields will be set to its corresponding invalid value. Example: mesgdef.NewRecord(nil)
  • Messages now use time.Time instead of typedef.DateTime or typedef.LocalDateTime, in real world use case this is more practical to work with native golang type time.Time.
  • Messages now have methods for assigning values as syntax sugar:
mesgdef.NewRecord(nil).
	SetTimestamp(time.Now()).
	SetSpeed(1010).
	SetCadence(100).
	SetHeartRate(110)

2. Factory

  • Now user can register message in the range that have not been taken by predefined message, this is useful since there are some messages that not specified in the Profile.xlsx but being used for internal use by some manufacturer.

3. Others

  • Fix on decoder when trying to decode developer field but no field_description is declared was not consume the bytes occupied by that field that might causing decode error (only happen when we try to decode bad encoded fit file).
  • Fit to Csv converter in converting developer fields is corrected.
  • Typedefs that support registering manufacturer specific types is updated as well, similiar to the changes applied to factory

@muktihari muktihari added the enhancement New feature or request label Dec 19, 2023
@muktihari muktihari self-assigned this Dec 19, 2023
@muktihari muktihari changed the title refactor!: mesgdef & other improvements refactor!: mesgdef and other fix & improvements Dec 19, 2023
@muktihari muktihari changed the title refactor!: mesgdef and other fix & improvements refactor!: mesgdef update, fix & other improvements Dec 19, 2023
@muktihari muktihari merged commit dcd7496 into master Dec 19, 2023
1 check passed
@muktihari muktihari deleted the refactor/mesgdef-implementation branch December 19, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant