Skip to content

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.

5 participants