Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

recreate `RawCamera` and shift naming

Jon263d3bc7d96e
diff --git a/src/cameras/detection/models.py b/src/cameras/detection/models.py
index d96b3a60..3da867b0 100644
--- a/src/cameras/detection/models.py
+++ b/src/cameras/detection/models.py
@@ -3,7 +3,11 @@ from typing import List
from pydantic import BaseModel
+class RawCamera(BaseModel):
+ webcam_id: str
+
+
class FoundCamerasResponse(BaseModel):
number_of_cameras_found: int
- list_of_usb_port_numbers_with_cameras_attached: List[int]
+ cameras_found: List[RawCamera]
cv2_backend: int
diff --git a/src/cameras/multicam_manager/cv_camera_manager.py b/src/cameras/multicam_manager/cv_camera_manager.py
index c5fd5819..4d27e2de 100644
--- a/src/cameras/multicam_manager/cv_camera_manager.py
+++ b/src/cameras/multicam_manager/cv_camera_manager.py
@@ -52,7 +52,7 @@ class OpenCVCameraManager:
return None
def _create_opencv_cameras(self, calibrate_cameras=True):
- list_of_usb_port_numbers_with_cameras_attached = self._detected_cams_data.list_of_usb_port_numbers_with_cameras_attached
+ list_of_usb_port_numbers_with_cameras_attached = self._detected_cams_data.cameras_found
open_cv_cameras: List[OpenCVCamera] = []
for this_port_number in list_of_usb_port_numbers_with_cameras_attached:
single_camera_config = self._config_service.webcam_config_by_id(this_port_number)