From 61e3e9fc059cd8f70f761f8c3757fb2ff51dd080 Mon Sep 17 00:00:00 2001 From: AI Dev Date: Mon, 31 Aug 2026 14:22:02 +0000 Subject: [PATCH] xm-85h50ai: turn on majestic's autofocus out of the box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../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 8bbded53d..86fe40a50 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