From 8999a226b1d6fb190eb992dc5b4e472d1f83ba7c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 24 Feb 2024 21:16:43 +0100 Subject: [PATCH] [WIP] Updated documentation for `camera.pi`. --- docs/source/backends.rst | 1 - docs/source/platypush/backend/camera.pi.rst | 6 ------ docs/source/platypush/plugins/camera.pi.legacy.rst | 5 +++++ docs/source/plugins.rst | 1 + platypush/plugins/camera/__init__.py | 2 +- platypush/plugins/camera/pi/__init__.py | 4 +--- platypush/plugins/camera/pi/legacy/manifest.yaml | 2 +- 7 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 docs/source/platypush/backend/camera.pi.rst create mode 100644 docs/source/platypush/plugins/camera.pi.legacy.rst diff --git a/docs/source/backends.rst b/docs/source/backends.rst index 96ff95700..e2e11ebfc 100644 --- a/docs/source/backends.rst +++ b/docs/source/backends.rst @@ -7,7 +7,6 @@ Backends :caption: Backends: platypush/backend/button.flic.rst - platypush/backend/camera.pi.rst platypush/backend/chat.telegram.rst platypush/backend/http.rst platypush/backend/midi.rst diff --git a/docs/source/platypush/backend/camera.pi.rst b/docs/source/platypush/backend/camera.pi.rst deleted file mode 100644 index a82cb0b61..000000000 --- a/docs/source/platypush/backend/camera.pi.rst +++ /dev/null @@ -1,6 +0,0 @@ -``camera.pi`` -=============================== - -.. automodule:: platypush.backend.camera.pi - :members: - diff --git a/docs/source/platypush/plugins/camera.pi.legacy.rst b/docs/source/platypush/plugins/camera.pi.legacy.rst new file mode 100644 index 000000000..0d37f6b85 --- /dev/null +++ b/docs/source/platypush/plugins/camera.pi.legacy.rst @@ -0,0 +1,5 @@ +``camera.pi.legacy`` +==================== + +.. automodule:: platypush.plugins.camera.pi.legacy + :members: diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst index c8595b29b..cd5567325 100644 --- a/docs/source/plugins.rst +++ b/docs/source/plugins.rst @@ -21,6 +21,7 @@ Plugins platypush/plugins/camera.gstreamer.rst platypush/plugins/camera.ir.mlx90640.rst platypush/plugins/camera.pi.rst + platypush/plugins/camera.pi.legacy.rst platypush/plugins/chat.irc.rst platypush/plugins/chat.telegram.rst platypush/plugins/clipboard.rst diff --git a/platypush/plugins/camera/__init__.py b/platypush/plugins/camera/__init__.py index 0830fbdb1..2ee347da7 100644 --- a/platypush/plugins/camera/__init__.py +++ b/platypush/plugins/camera/__init__.py @@ -845,7 +845,7 @@ class CameraPlugin(RunnablePlugin, ABC): **camera, ) - return self._start_streaming(camera, duration, stream_format) # type: ignore + return self._start_streaming(camera, duration, camera.info.stream_format) # type: ignore def _start_streaming( self, camera: Camera, duration: Optional[float], stream_format: str diff --git a/platypush/plugins/camera/pi/__init__.py b/platypush/plugins/camera/pi/__init__.py index 82ed41359..65d2e5df1 100644 --- a/platypush/plugins/camera/pi/__init__.py +++ b/platypush/plugins/camera/pi/__init__.py @@ -19,7 +19,7 @@ class CameraPiPlugin(CameraPlugin): If you are running a very old OS that only provides the deprecated `picamera `_ module, or you rely on features that are currently only supported by the old module, you should - use :class:`platypush.plugins.camera.pi_legacy.CameraPiLegacyPlugin` + use :class:`platypush.plugins.camera.pi.legacy.CameraPiLegacyPlugin` instead. """ @@ -63,8 +63,6 @@ class CameraPiPlugin(CameraPlugin): 1.0 is the default value, and higher values are mapped to higher contrast levels. :param brightness: Brightness level, as a float between -1.0 and 1.0. - :param video_stabilization: Enable video stabilization (default: False). - Only available on the old picamera module for now. :param iso: ISO level (default: 0). :param exposure_compensation: Exposure compensation level, as a float between -8.0 and 8.0. diff --git a/platypush/plugins/camera/pi/legacy/manifest.yaml b/platypush/plugins/camera/pi/legacy/manifest.yaml index 893708084..b58c2d7ee 100644 --- a/platypush/plugins/camera/pi/legacy/manifest.yaml +++ b/platypush/plugins/camera/pi/legacy/manifest.yaml @@ -21,5 +21,5 @@ manifest: - picamera - numpy - Pillow - package: platypush.plugins.camera.pi + package: platypush.plugins.camera.pi.legacy type: plugin