Skip to content

Commit

Permalink
ruff/black
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sasatani committed Nov 1, 2024
1 parent ac0a66d commit bc77277
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions miniscope_io/stream_daq.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ def _fpga_recv(
buf_stop + len(self.preamble),
)
try:
serial_buffer_queue.put(cur_buffer[buf_start:buf_stop].tobytes(), block=True, timeout=1)
serial_buffer_queue.put(
cur_buffer[buf_start:buf_stop].tobytes(), block=True, timeout=1
)
except queue.Full:
locallogs.warning("Serial buffer queue full, skipping buffer.")
if pre_pos:
Expand Down Expand Up @@ -435,7 +437,9 @@ def _buffer_to_frame(

# push previous frame_buffer into frame_buffer queue
try:
frame_buffer_queue.put((frame_buffer, header_list), block=True, timeout=1)
frame_buffer_queue.put(
(frame_buffer, header_list), block=True, timeout=1
)
except queue.Full:
locallogs.warning("Frame buffer queue full, skipping frame.")

Expand Down Expand Up @@ -464,7 +468,8 @@ def _buffer_to_frame(
break
finally:
try:
frame_buffer_queue.put((None, header_list), block=True, timeout=1) # get remaining buffers.
# get remaining buffers.
frame_buffer_queue.put((None, header_list), block=True, timeout=1)
except queue.Full:
locallogs.warning("Frame buffer queue full, skipping frame.")

Expand Down

0 comments on commit bc77277

Please sign in to comment.