From 38fa1a2d8d541bde4fcab9b4c34ad46d0866e96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Longpr=C3=A9?= <39377901+minewilliam@users.noreply.github.com> Date: Wed, 13 Oct 2021 09:37:48 -0400 Subject: [PATCH 1/3] stop_preview does not work as expected Rename c binding in the python wrapper which prevents preview from stopping gracefully. --- RPI/python/arducam_mipicamera.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RPI/python/arducam_mipicamera.py b/RPI/python/arducam_mipicamera.py index d7d196d..11130d6 100644 --- a/RPI/python/arducam_mipicamera.py +++ b/RPI/python/arducam_mipicamera.py @@ -180,8 +180,8 @@ class CAMERA_INTERFACE(Structure): arducam_start_preview.restype = c_int arducam_stop_preview = camera_lib.arducam_stop_preview -arducam_start_preview.argtypes = [c_void_p] -arducam_start_preview.restype = c_int +arducam_stop_preview.argtypes = [c_void_p] +arducam_stop_preview.restype = c_int arducam_capture = camera_lib.arducam_capture arducam_capture.argtypes = [c_void_p, POINTER(IMAGE_FORMAT), c_int] @@ -544,4 +544,4 @@ def remove_padding(data, width, height, bit_width): buff = buff.reshape(align_height, align_width) buff = buff[:height, :real_width] buff = buff.reshape(height * real_width) - return buff \ No newline at end of file + return buff From 8e863f3c6e404a87ee664031e01200f81d4b5fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Longpr=C3=A9?= <39377901+minewilliam@users.noreply.github.com> Date: Wed, 13 Oct 2021 09:43:23 -0400 Subject: [PATCH 2/3] stop_preview does not work as expected (2) --- RPI/stereo_depth_demo/arducam_mipicamera.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RPI/stereo_depth_demo/arducam_mipicamera.py b/RPI/stereo_depth_demo/arducam_mipicamera.py index b2b0f3f..65c44de 100644 --- a/RPI/stereo_depth_demo/arducam_mipicamera.py +++ b/RPI/stereo_depth_demo/arducam_mipicamera.py @@ -180,8 +180,8 @@ class CAMERA_INTERFACE(Structure): arducam_start_preview.restype = c_int arducam_stop_preview = camera_lib.arducam_stop_preview -arducam_start_preview.argtypes = [c_void_p] -arducam_start_preview.restype = c_int +arducam_stop_preview.argtypes = [c_void_p] +arducam_stop_preview.restype = c_int arducam_capture = camera_lib.arducam_capture arducam_capture.argtypes = [c_void_p, POINTER(IMAGE_FORMAT), c_int] @@ -537,4 +537,4 @@ def remove_padding(data, width, height, bit_width): buff = buff.reshape(align_height, align_width) buff = buff[:height, :real_width] buff = buff.reshape(height * real_width) - return buff \ No newline at end of file + return buff From 9ed677fbb8c6d686f9c8cc3093edc7fa0a58a3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Longpr=C3=A9?= <39377901+minewilliam@users.noreply.github.com> Date: Wed, 13 Oct 2021 09:43:55 -0400 Subject: [PATCH 3/3] stop_preview does not work as expected (3) --- RPI/ISP/arducam_mipicamera.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPI/ISP/arducam_mipicamera.py b/RPI/ISP/arducam_mipicamera.py index 8b6e0ad..2ccecd9 100644 --- a/RPI/ISP/arducam_mipicamera.py +++ b/RPI/ISP/arducam_mipicamera.py @@ -180,8 +180,8 @@ class CAMERA_INTERFACE(Structure): arducam_start_preview.restype = c_int arducam_stop_preview = camera_lib.arducam_stop_preview -arducam_start_preview.argtypes = [c_void_p] -arducam_start_preview.restype = c_int +arducam_stop_preview.argtypes = [c_void_p] +arducam_stop_preview.restype = c_int arducam_capture = camera_lib.arducam_capture arducam_capture.argtypes = [c_void_p, POINTER(IMAGE_FORMAT), c_int]