Repository navigation
Python: never write the FIT invalid value as a measurement. - #46
Open
sanderroosendaal wants to merge 1 commit into
Open
sanderroosendaal wants to merge 1 commit into
sanderroosendaal wants to merge 1 commit into
Conversation
encode clips a value that would encode to the base type's invalid value to the next valid one, and decode returns None for the invalid value. Values beyond the type limit still raise. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CrewNerd
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements the Python side of #38 (spec §7.2).
encodeclips a value that would encode to the base type's invalid value (255, 65535, 32767, and the 32-bit equivalents) to the next valid one. Values beyond the type limit still raiseCodecError.decodereturnsNonefor the invalid value, so the reader treats it as missing.StrokeWorkat 65535 now encodes as 65534; a raw 65535 in a file reads as missing.Note for #34:
AverageBoatSpeedat its maximum of 655.35 m/s encodes to 65535 at scale 100 and is clipped to 65534.🤖 Generated with Claude Code