From d960f9b6af1b76beac1596c6ec66ef585b4fcc61 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 16 Oct 2021 13:19:19 -0400 Subject: [PATCH] Fix settings being blank due to missing v4l2-ctl --- web/ajax/modals/settings.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/ajax/modals/settings.php b/web/ajax/modals/settings.php index d2e27a3b4..de42d6c87 100644 --- a/web/ajax/modals/settings.php +++ b/web/ajax/modals/settings.php @@ -36,6 +36,16 @@ if ($zmuOutput) { Device().' --list-ctrls'); + +if (!$ctls) { +ZM\Warning("Guessing v4l ctrls. We need v4l2-ctl please install it"); +$ctls = ' + brightness 0x00980900 (int) : min=-10 max=10 step=1 default=0 value=8 + contrast 0x00980901 (int) : min=0 max=20 step=1 default=10 value=12 + saturation 0x00980902 (int) : min=0 max=10 step=1 default=7 value=6 + hue 0x00980903 (int) : min=-5000 max=5000 step=1000 default=0 value=2000 +'; +} $ctls = trim($ctls); $ctls = explode("\n", $ctls);