Skip to content

Commit

Permalink
Handle edge case where only one output is handled y the sdk. Applicab…
Browse files Browse the repository at this point in the history
…le for OAK-T
  • Loading branch information
Filip Jeretina committed Nov 13, 2024
1 parent b5d3f74 commit 2a8a16d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rerun_py/depthai_viewer/_backend/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,13 @@ def update(self) -> None:
if not hasattr(self, "_queue"):
return
packets: Dict[str, Any] = self._queue.get_nowait()
for name, packet in packets.items():
self._packet_handler.log_packet(self._component_outputs[name]["component"], packet)
if not isinstance(packets, dict): # Edge case when the sdk q was built with only one component output.
self._packet_handler.log_packet(
self._component_outputs[list(self._component_outputs.keys())[0]]["component"], packets
)
else:
for name, packet in packets.items():
self._packet_handler.log_packet(self._component_outputs[name]["component"], packet)
except QueueEmpty:
pass

Expand Down

0 comments on commit 2a8a16d

Please sign in to comment.