xm-85h50ai: turn on majestic's autofocus out of the box - #142
Merged
Conversation
The first camera with working autofocus on HiSilicon: majestic's contrast AF engine (widgetii/majestic#522) reads the ISP's BE AF zone statistics and drives this board's XM zoom block over the same UART the pad uses, serialised by the same lock. The engine defaults to off everywhere — a lens without a focus motor must not grow an /autofocus endpoint — so enabling it here, on the board it was proven on, is the whole change; port and speed defaults already match. The WebUI grows an AF button and books a pass after each zoom step (majestic-webui#265). Verified end to end on the lab unit: from total blur to a tack-sharp frame, fv 30 -> 5126 against a 5606 peak in 21s.
openipc-ai
requested review from
cronyx,
flyrouter and
viktorxda
as code owners
August 31, 2026 14:22
PR Summary by QodoEnable autofocus by default for XM-85H50AI cameras
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
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.
One line, and it makes the 85H50AI the first OpenIPC camera with working autofocus on HiSilicon: the customizer enables majestic's new contrast AF engine (widgetii/majestic#522), which reads the ISP's BE AF zone statistics and drives this board's XM zoom block over the same UART the WebUI pad uses, serialised by the same port lock. The engine defaults to off everywhere — a lens without a focus motor must not grow an
/autofocusendpoint — so the profile of the board it was proven on is exactly where the switch belongs. Port and speed defaults already match this board.The WebUI side (majestic-webui#265) grows an AF button in the pad's focus group and books a settle-gated pass after each zoom step.
Verified end to end on the lab unit: from total blur to a tack-sharp frame, fv 30 → 5126 against a 5606 peak in 21 s; the zoom-then-auto-AF flow re-converges in one pass.
ci-matrix.py --self-testgreen.Ordering: merges after majestic#522 is in a release the builder image picks up; until then the flag is inert (majestic without the engine ignores unknown config keys and the WebUI probes majestic's config before showing the button).