Skip to content

Commit b0e9f80

Browse files
committed
fix signature
1 parent d7344d9 commit b0e9f80

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/arduino/app_peripherals/camera/ip_camera.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def __init__(
3333
resolution: tuple[int, int] = (640, 480),
3434
fps: int = 10,
3535
adjustments: Callable[[np.ndarray], np.ndarray] | None = None,
36+
auto_reconnect: bool = True,
3637
):
3738
"""
3839
Initialize IP camera.
@@ -46,8 +47,9 @@ def __init__(
4647
fps (int): Frames per second to capture from the camera.
4748
adjustments (callable, optional): Function or function pipeline to adjust frames that takes
4849
a numpy array and returns a numpy array. Default: None
50+
auto_reconnect (bool, optional): Enable automatic reconnection on failure. Default: True.
4951
"""
50-
super().__init__(resolution, fps, adjustments)
52+
super().__init__(resolution, fps, adjustments, auto_reconnect)
5153
self.url = url
5254
self.username = username
5355
self.password = password

src/arduino/app_peripherals/camera/v4l_camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545
a numpy array and returns a numpy array. Default: None
4646
auto_reconnect (bool, optional): Enable automatic reconnection on failure. Default: True.
4747
"""
48-
super().__init__(resolution, fps, adjustments)
48+
super().__init__(resolution, fps, adjustments, auto_reconnect)
4949

5050
self.v4l_path = self._resolve_stable_path(device)
5151
self.name = self._resolve_name(self.v4l_path) # Override parent name with a human-readable name

src/arduino/app_peripherals/camera/websocket_camera.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def __init__(
5252
resolution: tuple[int, int] = (640, 480),
5353
fps: int = 10,
5454
adjustments: Callable[[np.ndarray], np.ndarray] | None = None,
55+
auto_reconnect: bool = True,
5556
):
5657
"""
5758
Initialize WebSocket camera server.
@@ -65,8 +66,9 @@ def __init__(
6566
fps (int): Frames per second to capture from the camera.
6667
adjustments (callable, optional): Function or function pipeline to adjust frames that takes
6768
a numpy array and returns a numpy array. Default: None
69+
auto_reconnect (bool, optional): Enable automatic reconnection on failure. Default: True.
6870
"""
69-
super().__init__(resolution, fps, adjustments)
71+
super().__init__(resolution, fps, adjustments, auto_reconnect)
7072

7173
self.protocol = "ws"
7274
self.port = port

0 commit comments

Comments
 (0)