-
Notifications
You must be signed in to change notification settings - Fork 95
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
libsbp python bindings. #31
Conversation
|
||
from construct import * | ||
from swift.sbp import SBP | ||
from swift.sbp.utils import fmt_repr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this import swift.sbp
right? Or is it swiftnav.sbp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh, that's a typo. actually a really weird one.....
Generated bindings are looking good! |
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
"""Utility functions for shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete docstring?
This is looking great! Still some formatting issues with the output when comment lines wrap 80 cols but functionally looks good (although didn't test myself yet). |
crc = data['crc'] | ||
return SBP(msg_type, sender, length, payload, crc) | ||
|
||
def to_json_dict(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, i'm troubled that this wasn't caught (by python)
Only caught a minor indent issue. Looking good! |
libsbp python bindings using Construct, a declarative binary parsing
library for Python. Following up with a separate PR for a test
harness.
/cc @mfine, @fnoble, @imh