Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Encoder
Previously, we measure rollover event every > 32 seconds where it should be >= 32 seconds. This created the 32 seconds rollover to have timeoffset 0. When this message is decoded, most likely this message would have the same timestamp as the previously decoded message (at least our FIT SDK's decoder handle this way).
Previously, when reset with new size > than previous size, only
items
field would be re-allocated as the new size wherebucket
will be allocated automatically byappend
. This does no create any significant issue, however, this was not intended sincecap(bucket)
can be bigger thancap(items)
asappend
will typically re-allocate doubling the previous cap or round it in a multiple of 8: 8, 16, etc (depend on runtime implementation)