From bac7c697b2193df9c93ccbfe02f649596505ec12 Mon Sep 17 00:00:00 2001 From: OpenIPC AI team Date: Mon, 31 Aug 2026 17:37:24 +0300 Subject: [PATCH] xm-85h50ai: turn on majestic's autofocus out of the box (#142) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first camera with working autofocus on HiSilicon: the customizer enables majestic's 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 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 in the profile of 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 settle-gated 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. --- .../general/overlay/usr/share/openipc/customizer.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devices/hi3516ev300_lite_xm-85h50ai/general/overlay/usr/share/openipc/customizer.sh b/devices/hi3516ev300_lite_xm-85h50ai/general/overlay/usr/share/openipc/customizer.sh index 8bbded5..86fe40a 100755 --- a/devices/hi3516ev300_lite_xm-85h50ai/general/overlay/usr/share/openipc/customizer.sh +++ b/devices/hi3516ev300_lite_xm-85h50ai/general/overlay/usr/share/openipc/customizer.sh @@ -25,6 +25,12 @@ fw_setenv ptz_port /dev/ttyAMA0 fw_setenv ptz_caps 'zoom focus' # # +# Autofocus: majestic's contrast AF engine over the ISP focus statistic, +# driving the same zoom block. Default port/speed already match this board. +# +cli -s .isp.autofocus.enabled true +# +# # The MCU owns the console UART, so getty must not sit on it reading the # MCU's bytes. The edit lands in the overlay; an upgrade that wipes the # overlay also wipes /etc/custom.ok, so this script runs again and the