examples/camera: fix build error and still capture logic#3425
Merged
simbit18 merged 2 commits intoapache:masterfrom Mar 16, 2026
Merged
examples/camera: fix build error and still capture logic#3425simbit18 merged 2 commits intoapache:masterfrom
simbit18 merged 2 commits intoapache:masterfrom
Conversation
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>
Contributor
|
Thank you @JianyuWang0623 :-) Could you please also update typos reported by CI? :-) |
Fix typos found by codespell: - camera_bkgd.c: defaul -> default - camera_main.c: memorys -> memories (2 occurrences) - camera_main.c: freame -> frame - camera_main.c: valiable -> variable Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
cederom
approved these changes
Mar 16, 2026
Contributor
There was a problem hiding this comment.
Thank you @JianyuWang0623 good catch! :-)
Lets just make sure CI completes without complaining :D
acassis
approved these changes
Mar 16, 2026
simbit18
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix two issues in
examples/camera:Build error: camera_bkgd.c calls
boardctl(BOARDIOC_NX_START, 0)but is missing#include <sys/boardctl.h>, causing:implicit declaration of function 'boardctl''BOARDIOC_NX_START' undeclaredLogic fix: camera_main.c unconditionally enters still-capture frame size enumeration (
VIDIOC_ENUM_FRAMESIZESforV4L2_BUF_TYPE_STILL_CAPTURE) even when the user requested video capture. Addedcapture_type == V4L2_BUF_TYPE_STILL_CAPTUREguard so the still-specific path is only taken when appropriate.Impact
CONFIG_EXAMPLES_CAMERA_OUTPUT_LCD=y(NX backend path).Testing
Build verified with
lckfb-szpi-esp32s3/cameraconfig (ESP32-S3, GC0308 DVP camera + ST7789 LCD):xtensa,lckfb-szpi-esp32s3:cameramake -j8— passes without errors