fix(camera): flip sensor stream via v4l2#164
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
M5Tab5-UserDemo/platforms/tab5/main/hal/components/hal_camera.cpp
Lines 93 to 102 in 2dc2154
[P1] Open video device read-only breaks new sensor flip controls
The change now relies on VIDIOC_S_CTRL to set V4L2_CID_HFLIP/VFLIP and disables the PPA mirror, but the device is still opened with open(dev, O_RDONLY). V4L2 control ioctls require write access; with a read-only descriptor these calls will fail with EPERM, so the sensor flip is never applied while software mirroring is removed and the preview remains mirrored. Open the device with O_RDWR or fall back to software mirroring when the control cannot be set.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68cf1076e18083248a52d1993b5bd17b