Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

pchaya
Copy link
Contributor

@pchaya 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")
Copy link
Collaborator

@HarinderG HarinderG Jan 15, 2020

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?

Suggested change
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')))):
Copy link
Collaborator

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.

Suggested change
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')))):
Copy link
Collaborator

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.

Suggested change
if (not(acknowledge == (bytes(b'\xff\xff\xff\xff')))):
if (not(acknowledge == b'\xff\xff\xff\xff')):

Copy link
Collaborator

@HarinderG HarinderG left a 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.

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.

4 participants