-
Notifications
You must be signed in to change notification settings - Fork 0
Update Circuit Python Bm_Serial Script #28
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
Conversation
circuitpython/bm_serial.py
Outdated
| for sub_cb in self.sub_cbs: | ||
| sub_cb(node_id, type, version, topic_len, topic, data_len, data) |
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.
this looks like it runs each message through every sub_cb. We should document that so that we know to make sure the message info is checked within the sub_cb and rejected if not appropriate. Alternatively we could track the sub_cb <-> topic so we only call the sub_cb that is appropriate to the message.
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.
Update with new logic to only call the subbed callback associated with that topic.
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.
Woot!
victorsowa12
left a comment
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.
Looks good to me! I only had a small suggestion for providing more info on how to use the raw-messages api
Update Python script for serial communications.
Allows subscribing to topics, and handling received data from another serial device.