Open
Conversation
lask
approved these changes
Jun 7, 2021
Contributor
lask
left a comment
There was a problem hiding this comment.
Add a couple of words to CHANGELOG.md and ship.
Comment on lines
+111
to
+119
| if (reader.byte 0) != 0xb5 or (reader.byte 1) != 0x62: throw INVALID_UBX_HEADER_ | ||
|
|
||
| // Verify the length and get full the packet. | ||
| length ::= (reader.byte 4) | (((reader.byte 5) & 0xff) << 8) | ||
| if not 0 <= length <= 512: throw INVALID_UBX_MESSAGE_ | ||
| if not 0 <= length <= 512: throw INVALID_UBX_SIZE_ | ||
| frame ::= reader.bytes length + 8 | ||
|
|
||
| // Verify the checksum. | ||
| if not is_valid_frame_ frame: throw INVALID_UBX_MESSAGE_ | ||
| if not is_valid_frame_ frame: throw INVALID_UBX_CHECKSUM_ |
Contributor
There was a problem hiding this comment.
If this doesn't help, we are going to need more information to figure out what bytes we see. Do we want to add this already?
lask
reviewed
Jun 7, 2021
| static is_valid_frame_ frame/ByteArray -> bool: | ||
| // Check the sync bytes. | ||
| if frame[0] != 0xb5 or frame[1] != 0x62: throw INVALID_UBX_MESSAGE_ | ||
| if frame[0] != 0xb5 or frame[1] != 0x62: return false |
Contributor
There was a problem hiding this comment.
This should probably behave like Message.from_reader, so Message.from_byte act the same.
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.
No description provided.