Skip to content

Commit

Permalink
Merge pull request atlas0fd00m#51 from decidedlygray/patch-1
Browse files Browse the repository at this point in the history
Clarifying init failure location - thanks @decidedlygray !
  • Loading branch information
atlas0fd00m authored Sep 25, 2021
2 parents c8444c9 + 4810328 commit 8ee742c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cancat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def setCanBaud(self, baud_const=CAN_500KBPS):
self._config['can_baud'] = baud_const

while(response[1] != b'\x01'):
print("CAN INIT FAILED: Retrying")
print("CAN INIT FAILED WHILE SETTING BAUD RATE: Retrying")
response = self.recv(CMD_CAN_BAUD_RESULT, wait=30)

def setCanMode(self, mode):
Expand All @@ -824,10 +824,9 @@ def setCanMode(self, mode):
response = self.recv(CMD_CAN_MODE_RESULT, wait=30)

while(response[1] != b'\x01'):
print("CAN INIT FAILED: Retrying")
print("CAN INIT FAILED WHILE SETTING MODE: Retrying")
response = self.recv(CMD_CAN_MODE_RESULT, wait=30)


self._config['can_mode'] = mode
return response

Expand Down

0 comments on commit 8ee742c

Please sign in to comment.