Skip to content

v0.22.0

Compare
Choose a tag to compare
@muktihari muktihari released this 12 Sep 10:12
· 96 commits to master since this release
7d1dc9d

What's Changed (with Breaking Changes)

1. Behavior

The decoder methods Decode() and DecodeWithContext() no longer need to be wrapped inside a Next() loop. These methods can be directly invoked multiple times to decode chained FIT file. Method Next() is now just a convenience tool to do iteration.

2. Modified

Functions

  • proto.CreateMessageDefinition -> proto.NewMessageDefinition
  • proto.CreateMessageDefinitionTo -> (*Encoder) newMessageDefinition

Methods

  • (FileHeader) MarshalAppend -> (*FileHeader) MarshalAppend
  • (MessageDefinition) MarshalAppend -> (*MessageDefinition) MarshalAppend
  • (Message) MarshalAppend(n []byte) -> (*Message) MarshalAppend(b []byte, arch byte)

Structs or Fields

  • proto: FileHeader.ProtocolVersion type is changed from byte to proto.Version for consistency.
  • decoder: AccumulatedValue is now private with the new name value
  • decoder: Accumulator's Field: AccumulatedValues is now private with new name values

Errors

  • encoder: ErrNotAFitFile -> ErrNotFITFile

3. Removed

Package

  • internal/kit

Functions

  • factory.CreateMesgOnly

Methods

  • (*Factory) CreateMesgOnly
  • (proto.FIT) WithMessages
  • (proto.Message) WithFields
  • (proto.Message) WithDeveloperFields
  • (proto.Message) WithFieldValues
  • (proto.Message) Clone
  • (proto.Field) Clone
  • (proto.SubField) Clone
  • (proto.DeveloperField) Clone
  • (FileHeader) MarshalBinary
  • (MessageDefinition) MarshalBinary
  • (Message) MarshalBinary

Constants

  • proto: MaxBytesPerMessage and MaxBytesPerMessageDefinition are removed

4. Performance Improvements

  • Encoder now uses less memory

5. Bug Fixes

  • Encoder: fix on validating dynamic protocol version.
  • CLI: fitactivity's opener concurrency is now limited to the lesser value between the number of files and the number of CPU.
  • CLI: fitactivity's opener now updates the corresponding Laps GPS positions instead of removing them.
  • CLI: fitactivity now listens to interrupt signal and gracefully shutdown.

6. Additional Features

  • Fieldef: Activity File now has new messages: GpsMetadata, TimeInZone, Split and Split Summary.

References

Full Changelog: v0.21.5...v0.22.0