Skip to content

Non-Standard Token Lengths#6

Open
pjensen-addco wants to merge 5 commits intoGlinnes:masterfrom
pjensen-addco:nonStandardTokensAndLength
Open

Non-Standard Token Lengths#6
pjensen-addco wants to merge 5 commits intoGlinnes:masterfrom
pjensen-addco:nonStandardTokensAndLength

Conversation

@pjensen-addco
Copy link

Came across the need to parse non-standard NMEA token lengths (thank you ST, for making non-standard NMEA tokens). I updated your code to include a parameter to allow longer than usual tokens.

Only potential problem comes in the strnwcmp function. To allow for varying lengths, I added a break condition. If either string reports a null character (end of string), the function now assumes the strings are equivalent. This could be removed if the code which calls strnwcmp calculated the token length, instead of just defaulting to maximum length, but for this limited application, this workaround works well.

pjensen-addco and others added 3 commits October 21, 2021 10:46
Added two defines:
MAX_TOK_SIZE: Allows for Non-standard NMEA Token Sizes, such as PSTM tokens.
MAX_SENT_SIZE: Allows for Non-standard NMEA Sentence Lengths, for higher precision GPS modules.
@pjensen-addco
Copy link
Author

This is what I get for refactoring something before compiling... Need to add another commit to fix a scope issue.

Forgot to compile this repo on the minor refactor.  Now it actually compiles!
@pjensen-addco
Copy link
Author

Alright, that should fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant