-
Notifications
You must be signed in to change notification settings - Fork 4
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
Initial commit for new comm protocol #3
base: master
Are you sure you want to change the base?
Conversation
pchaya
commented
Jan 11, 2020
- Anthony's development for new comm protocol
time.sleep(0.0001) | ||
acknowledge = self.port.read(4) | ||
if (not(acknowledge == (bytes(b'\xff\xff\xff\xff')))): | ||
print("Bad acknowledge!!!!mult") |
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.
Did you mean to print out "mult" after the Bad acknowledge?
print("Bad acknowledge!!!!mult") | |
print("Bad acknowledge!!!!") |
while(self.port.out_waiting): | ||
time.sleep(0.0001) | ||
acknowledge = self.port.read(4) | ||
if (not(acknowledge == (bytes(b'\xff\xff\xff\xff')))): |
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.
You don't need bytes() method.
if (not(acknowledge == (bytes(b'\xff\xff\xff\xff')))): | |
if (not(acknowledge == b'\xff\xff\xff\xff')): |
while(self.port.out_waiting): | ||
time.sleep(0.0001) | ||
acknowledge = self.port.read(4) | ||
if (not(acknowledge == (bytes(b'\xff\xff\xff\xff')))): |
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.
You don't need bytes() method.
if (not(acknowledge == (bytes(b'\xff\xff\xff\xff')))): | |
if (not(acknowledge == b'\xff\xff\xff\xff')): |
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.
Just some minor formatting changes.