Skip to content

Commit

Permalink
Add some logging around what I think is causing some can errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Dec 16, 2024
1 parent d37b151 commit 5024b7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hardware/opentrons_hardware/drivers/can_bus/can_messenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async def send_and_verify_recieved(self) -> ErrorCode:
log.error(
f"Message did not receive ack for message index {self._message.payload.message_index}"
)
log.error(f"Missing node {self._expected_nodes}")
return ErrorCode.timeout
finally:
self._can_messenger.remove_listener(self)
Expand Down Expand Up @@ -284,6 +285,7 @@ async def _ensure_send(
expected_nodes = list(self._known_nodes)
else:
expected_nodes = [node_id]
log.warning(f"Setting expected nodes to {expected_nodes}")

listener = AcknowledgeListener(
can_messenger=self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ def _remove_move_group(
f"Received completion for {node_id} group {group_id} seq {seq_id}"
f", which {'is' if in_group else 'isn''t'} in group"
)
if not self._moves[group_id] and len(self._moves[group_id]) == 0:
log.error(
f"Python bug proven if check {bool(not self._moves[group_id])} len check {len(self._moves[group_id]) == 0}"
)
if not self._moves[group_id]:
log.debug(f"Move group {group_id+self._start_at_index} has completed.")
self._event.set()
Expand Down

0 comments on commit 5024b7b

Please sign in to comment.