This is an automated email from the ASF dual-hosted git repository.

simbit18 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 10056077f4f0c6f7d7f4e8638eac810073dfaea8
Author: wangjianyu3 <[email protected]>
AuthorDate: Mon Mar 16 20:18:18 2026 +0800

    examples/camera: fix build error and still capture logic
    
    Add missing #include <sys/boardctl.h> in camera_bkgd.c to fix
    implicit declaration of boardctl() and undeclared BOARDIOC_NX_START.
    
    Also fix capture_num check in camera_main.c to only apply still
    capture size enumeration when capture_type is STILL_CAPTURE.
    
    Signed-off-by: wangjianyu3 <[email protected]>
---
 examples/camera/camera_bkgd.c | 1 +
 examples/camera/camera_main.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/camera/camera_bkgd.c b/examples/camera/camera_bkgd.c
index c53b11ab8..4703b1ea5 100644
--- a/examples/camera/camera_bkgd.c
+++ b/examples/camera/camera_bkgd.c
@@ -33,6 +33,7 @@
 #include <semaphore.h>
 #include <errno.h>
 #include <debug.h>
+#include <sys/boardctl.h>
 
 #include <arch/board/board.h>
 #include <nuttx/nx/nx.h>
diff --git a/examples/camera/camera_main.c b/examples/camera/camera_main.c
index 43f1fff9d..32ad1a460 100644
--- a/examples/camera/camera_main.c
+++ b/examples/camera/camera_main.c
@@ -537,7 +537,7 @@ int main(int argc, FAR char *argv[])
    * And all allocated memorys are VIDIOC_QBUFed.
    */
 
-  if (capture_num != 0)
+  if (capture_num != 0 && capture_type == V4L2_BUF_TYPE_STILL_CAPTURE)
     {
       /* Determine image size from connected image sensor name,
        * because video driver does not support VIDIOC_ENUM_FRAMESIZES

Reply via email to