From 17547ef3d66ef1e38fc520b2fb30d5de8d26f36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esben=20S=C3=B8rig?= Date: Sun, 25 Jan 2026 13:58:29 +0000 Subject: [PATCH] Fix hardcoded camera preview aspect ratio in /setup and /calibrate --- builtin-programs/calibrate/calibrate-page.folk | 12 +++++++++++- builtin-programs/web/setup.folk | 7 +++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/builtin-programs/calibrate/calibrate-page.folk b/builtin-programs/calibrate/calibrate-page.folk index ac8d3e2c..1ab0f77f 100644 --- a/builtin-programs/calibrate/calibrate-page.folk +++ b/builtin-programs/calibrate/calibrate-page.folk @@ -156,6 +156,11 @@ Wish the web server handles route "/calibrate" with hidden true handler { set camera $QUERY(camera) + # Query the camera resolution for proper aspect ratio in preview (defaults to 1920x1080) + set cameraOpts [dict getdef [lindex [Query! /someone/ wishes $::thisNode uses camera $camera with /...opts/] 0] opts {width 1920 height 1080}] + set cameraWidth [dict get $cameraOpts width] + set cameraHeight [dict get $cameraOpts height] + upvar ^html ^html html [csubst { @@ -269,6 +274,9 @@ Claim the calibration poses max is \${calibrationPosesMax}

Use this camera preview to debug why printed and/or projected tags aren't being recognized (maybe overexposure, maybe your camera isn't in a good position):