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.
This commit is contained in:
parent
00e77de94f
commit
8a82400929
@ -60,7 +60,7 @@
|
|||||||
#define APP_STATE_UNDER_CAPTURE (1)
|
#define APP_STATE_UNDER_CAPTURE (1)
|
||||||
#define APP_STATE_AFTER_CAPTURE (2)
|
#define APP_STATE_AFTER_CAPTURE (2)
|
||||||
|
|
||||||
#define CAMERA_DEV_PATH "/dev/video10"
|
#define CAMERA_DEV_PATH "/dev/video"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
@ -512,7 +512,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
/* Open the device file. */
|
/* Open the device file. */
|
||||||
|
|
||||||
v_fd = open("/dev/video", 0);
|
v_fd = open(CAMERA_DEV_PATH, 0);
|
||||||
if (v_fd < 0)
|
if (v_fd < 0)
|
||||||
{
|
{
|
||||||
printf("ERROR: Failed to open video.errno = %d\n", errno);
|
printf("ERROR: Failed to open video.errno = %d\n", errno);
|
||||||
|
Loading…
Reference in New Issue
Block a user