mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
3a156581ca
commit
10056077f4
2 changed files with 2 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue