-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*_GET-message types confuse parseUBXPayload #5
Labels
Comments
@thasti If I understand correctly the "addGet" decorator creates a "Get" version of UBXMessage with given _class and _id, so the best way is to pass payload to the UBXMessage init. I managed to do it with:
this decorator then is used:
In both cases you'd need to modify decorators for classes in UBX, remove _GET subclasses and import new decorator functions in UBX/CFG (see import lines). Please see if it works for you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wrote a simple script trying to query some settings of a receiver. However, after sending (for example) a UBX.CFG.PRT_GET message, the UBXManager fails to parse the response correctly.
I traced this error down already to some extent:
The root cause is that both UBX.CFG.PRT_GET and UBX.CFG.PRT have the same _id. When initMessageClass initially fills the _lookup-dictionary of UBX.CFG, duplicate keys are partially discarded, only the last key-value is stored, leaving only UBX.CFG.PRT_GET in there.
When parseUBXPayload then tries to look up the subclass from the _lookup-dictionary with .get(msgid), only UBX.CFG.PRT_GET is present.
The issue can be worked around by changing the order of PRT and PRT_GET in the source code (same applies for TP5 and TP5_GET, but explicitly excluding _GET-messages from the list of parseable messages might be a better idea.
Interesting side effect: The Exception message wrongly states "Message not fully consumed while parsing a UBX.CFG.TP5_GET!", even though this should read UBX.CFG.PRT_GET. I did not track down what causes this, but it threw me off first while looking for the root cause of the problem.
Test code:
The text was updated successfully, but these errors were encountered: