Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
tannermpeterson committed Jun 6, 2023
1 parent da5cabc commit 62d4b4b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/mantarray_desktop_app/sub_processes/mc_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ def _teardown_after_loop(self) -> None:
# log any data in cache, flush and log remaining serial data
put_log_message_into_queue(
logging.INFO,
f"\nDuration (seconds) since events: {self._get_dur_since_events()}"
f"\nRemaining serial data in cache: {list(self._serial_packet_cache)}, "
f"Duration (seconds) since events: {self._get_dur_since_events()}. "
f"Remaining serial data in cache: {list(self._serial_packet_cache)}, "
f"in buffer: {list(board.read_all())}",
self._board_queues[board_idx][1],
self.get_logging_level(),
Expand All @@ -353,7 +353,7 @@ def _get_dur_since_events(self) -> Dict[str, float | str]:
}
current_timepoint = perf_counter()
return {
event_name: ("No occurance" if event_timepoint is None else current_timepoint - event_timepoint)
event_name: ("No occurrence" if event_timepoint is None else current_timepoint - event_timepoint)
for event_name, event_timepoint in event_timepoints.items()
}

Expand Down Expand Up @@ -953,8 +953,9 @@ def _process_comm_from_instrument(self, packet_type: int, packet_payload: bytes)
raise UnrecognizedSerialCommPacketTypeError(f"Packet Type ID: {packet_type} is not defined")

if packet_type not in (
# beacons tracked separately, going dormant packet will raise an error and does not need to be tracked
# beacons + handshakes tracked separately, going dormant packet will raise an error and does not need to be tracked
SERIAL_COMM_STATUS_BEACON_PACKET_TYPE,
SERIAL_COMM_HANDSHAKE_PACKET_TYPE,
SERIAL_COMM_GOING_DORMANT_PACKET_TYPE,
):
self._timepoints_of_prev_actions["command_response_received"] = perf_counter()
Expand Down

0 comments on commit 62d4b4b

Please sign in to comment.