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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8a8240092 examples/camera: Fix wrong device file path
8a8240092 is described below

commit 8a82400929a63017cf08f868527185bab0ff0f9e
Author: SPRESENSE <[email protected]>
AuthorDate: Sun Jul 28 03:51:11 2024 +0900

    examples/camera: Fix wrong device file path
    
    In camera_main.c, the dev paths of capture_initialize() and open()
    are different. So open could always failed.
---
 examples/camera/camera_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/camera/camera_main.c b/examples/camera/camera_main.c
index 759ffc572..6fce11ccf 100644
--- a/examples/camera/camera_main.c
+++ b/examples/camera/camera_main.c
@@ -60,7 +60,7 @@
 #define APP_STATE_UNDER_CAPTURE   (1)
 #define APP_STATE_AFTER_CAPTURE   (2)
 
-#define CAMERA_DEV_PATH "/dev/video10"
+#define CAMERA_DEV_PATH "/dev/video"
 
 /****************************************************************************
  * Private Types
@@ -512,7 +512,7 @@ int main(int argc, FAR char *argv[])
 
   /* Open the device file. */
 
-  v_fd = open("/dev/video", 0);
+  v_fd = open(CAMERA_DEV_PATH, 0);
   if (v_fd < 0)
     {
       printf("ERROR: Failed to open video.errno = %d\n", errno);

Reply via email to