Skip to content

Commit

Permalink
get serial number from camera
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Sep 24, 2024
1 parent 9dcde5a commit df7082f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ def restore(self, data: dict[str, dict]) -> None:

async def update_device_list(self) -> None:
if len(self._cameras) == 0:
# TODO: get camera id from api
self.add_camera(ZedxminiCamera(id='zedxmini-todo', polling_interval=0.1))
camera_information = await ZedxminiCamera.get_camera_information('localhost', 8003)
if camera_information is None:
return
self.add_camera(ZedxminiCamera(id=str(camera_information['serial_number']), polling_interval=0.1))
camera = list(self._cameras.values())[0]
if camera.is_connected:
return
Expand Down

0 comments on commit df7082f

Please sign in to comment.