Releases: muktihari/fit
v0.23.4
What's Changed
- cli-fix: fitconv csv-to-fit on parsing fields by @muktihari in #462
Full Changelog: v0.23.3...v0.23.4
v0.23.3
What's Changed
- docs: update fitconv README.md by @muktihari in #459
- fix: decoder should clear the pointers before reslicing by @muktihari in #460
- cli-fix: fitconv csv-to-fit on parsing fields by @muktihari in #461
Full Changelog: v0.23.2...v0.23.3
v0.23.2
What's Changed
Feat: add ability for Fitconv CLI to convert unknown data from CSV to FIT as an alternative approach to help solving this issue https://forums.garmin.com/developer/fit-sdk/f/discussion/385131/unable-to-convert-csv-to-fit-file
- perf: early validate all messages before encoding by @muktihari in #454
- cli-fix: fitconv remove quote char and unprintable chars in csv by @muktihari in #455
- cli-feat: fitconv ability to convert unknown data from CSV to FIT by @muktihari in #456
- feat: filedef listener add ability to reset by @muktihari in #457
- chore: encoder clean up unused variable by @muktihari in #458
Full Changelog: v0.23.1...v0.23.2
v0.23.1
What's Changed
Changes related to FIT Activity CLI only
- fix: typo on fitactivity conceal docs by @muktihari in #450
- cli: fitactivity feat support combine multi-sessions by @muktihari in #451
- chore: fix typo on fitactivity conceal docs by @muktihari in #452
- fix: fitactivity combine should accumulate all the accumulable values by @muktihari in #453
Full Changelog: v0.23.0...v0.23.1
v0.23.0
Breaking Changes
- primitive bool value is now replaced with typedef.Bool to allow invalid/unset value, affected package: proto, profile/mesgdef
- Encoder option: WithNormalHeader and WithCompressedTimestampHeader is removed, replaced by WithHeaderOption.
- Decoder will no longer returns ErrFieldValueTypeMismatch when value of field num 253 is not uint32 and ErrFieldValueTypeMismatch is now removed. ErrInvalidBaseType is now private, ErrNotAFitFile is renamed to ErrNotFITFile, ErrDataSizeZero is deleted and an ErrNotFITFile will be returned instead when FileHeader's DataSize is zero.
- proto.Validator's SetProtocolVersion() and ProtocolVersion() are removed, export the protocol version field directly.
New Features
- Now we can encode compressed timestamp header with multiple local message type 0-3.
Fixes
- Bug related to Decoder and Encoder on handling compressed timestamp header is now fixed.
- PeekFileId now only check the first decoded message, if it's not an file_id, it returns error.
- UTF-8 string handling: now we discard utf8.RuneError and it stops when the bytes are successfully decoded or it reaches a null-terminated string '0'.
- Encoder's validator now prints the value when the size exceed max allowed for easier debugging.
CLIs
- fitactivity is updated to support compressed timestamp header with multiple local message type and more improvement.
What's Changed
- chore: create FUNDING.yml by @muktihari in #422
- chore: accumulator fix typo on code docs by @muktihari in #423
- chore: inline accumulator code by @muktihari in #424
- refactor!: change primitive bool to typedef.Bool by @muktihari in #425
- chore: run go mod tidy on benchfit by @muktihari in #426
- chore: clean up mesgdef builder by @muktihari in #427
- refactor!: decoder sentinel errors by @muktihari in #428
- chore: fitactivity simplify notify signal by @muktihari in #429
- chore: basetype invalid now return nil for unknown basetype by @muktihari in #430
- chore: add missing copyright header by @muktihari in #431
- fix: encoder only compress timestamp when value is valid by @muktihari in #432
- chore: add base comment for mesgdef and typedef having uintz type by @muktihari in #433
- chore: decoder update code docs by @muktihari in #434
- chore: clean up proto Value code by @muktihari in #435
- fix: proto UnmarshalValue on handling string padding by @muktihari in #436
- chore(deps): bump github/codeql-action from 3.26.6 to 3.26.7 by @dependabot in #437
- fix: handle compressed timestamp by @muktihari in #438
- feat!: encoder compress timestamp with multiple local message type by @muktihari in #439
- cli: fitactivity enable compressed timestamp header with multiple local message type by @muktihari in #440
- docs: update encoder code docs and docs/usage.md by @muktihari in #441
- fix: decoder PeekFileId must check only the first message by @muktihari in #442
- cli: update fitactivity by @muktihari in #443
- fix: proto value unmarshal string on appending rune by @muktihari in #444
- chore: update fitactivity README.md by @muktihari in #445
- chore: proto.UnmarshalValue simplify utf8 string decoding by @muktihari in #446
- fix: encoder validator now print value on size error by @muktihari in #447
- cli: fitactivity fix combine usage by @muktihari in #448
- fix!: protocol validator export protocol version field by @muktihari in #449
Full Changelog: v0.22.0...v0.23.0
v0.22.0
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
- docs: update README.md by @muktihari in #410
- cli: fitactivity improve concealer by @muktihari in #411
- cli: fitactivity opener limit concurrent process by @muktihari in #412
- chore: fitactivity fix typo by @muktihari in #413
- feat: fitactivity implement context propagation by @muktihari in #414
- perf: optimize encoder buffer size by @muktihari in #415
- perf: round encoder buffer size to nearest sizeclasses by @muktihari in #416
- fix: encoder dynamic protocol version validator by @muktihari in #417
- refactor!: remove not particularly useful features by @muktihari in #418
- feat: filedef add new messages in Activity File by @muktihari in #419
- refactor: set minimal go version to v1.21 by @muktihari in #420
- chore: add missing copyright header by @muktihari in #421
Full Changelog: v0.21.5...v0.22.0
v0.21.5
What's Changed
- chore: pin misspell hash in ci workflow for security reason by @muktihari in #406
- chore: update dependabot interval from daily to weekly by @muktihari in #407
- fix: decoder should expand component only from a valid value by @muktihari in #408
- chore: clean up decoder code by @muktihari in #409
Full Changelog: v0.21.4...v0.21.5
v0.21.4
What's Changed
- chore: fix misspelled words by @muktihari in #402
- chore: update CI jobs to check misspelled words by @muktihari in #403
- chore: update fitactivity README.md by @muktihari in #404
- cli: fix: aggregator to handle enhanced fields by @muktihari in #405
Full Changelog: v0.21.3...v0.21.4
v0.21.3
What's Changed
- chore: clean up unintended file by @muktihari in #381
- cli: update fitactivity code doc by @muktihari in #382
- fix: encoder handling WriteSeeker by @muktihari in #383
- feat: encoder enable dynamic protocol version by @muktihari in #384
- cli: fitactivity conceal keep original protocol version by @muktihari in #385
- chore: add missing copyright header by @muktihari in #386
- test: filedef simplify test by @muktihari in #387
- feat: kit/semicircles now handles invalid value by @muktihari in #388
- chore: mesgdef clean up code by @muktihari in #389
- fix: encoder WriteSeeker now relative to current offset by @muktihari in #390
- docs: update usage.md by @muktihari in #391
- docs: update usage.md by @muktihari in #392
- chore(deps): bump actions/upload-artifact from 4.3.6 to 4.4.0 by @dependabot in #393
- chore(deps): bump golang.org/x/text from 0.17.0 to 0.18.0 by @dependabot in #396
- cli: refactor fitactivity by @muktihari in #398
- cli: fitactivity add message remover by @muktihari in #399
- cli: fitactivity fix remover by @muktihari in #400
- chore: add missing copyright header by @muktihari in #401
Full Changelog: v0.21.2...v0.21.3
v0.21.2
What's Changed
- chore: update release workflow by @muktihari in #376
- fix: proto.Value's Valid method when handling slice of uint_z by @muktihari in #377
- cli: fitactivity remove aggregate limitation by @muktihari in #378
- cli: fitactivity auto determine protocol version by @muktihari in #380
- chore(deps): bump github/codeql-action from 3.26.5 to 3.26.6 by @dependabot in #379
Full Changelog: v0.21.1...v0.21.2