Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/guysoft/OctoPi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Sheffer <guysoft@gmail.com>2022-08-20 02:55:27 +0300
committerGitHub <noreply@github.com>2022-08-20 02:55:27 +0300
commit01f35e4893adc12efa0ffc685e6b96720d57f867 (patch)
tree5071f58e40c010f76aba23bc1cfcc0c06c0b47d2
parented98b495315d9bba8b3a901f6488b20c52c50c28 (diff)
parentfc82f1202f5c818f855a4cdb22a7bb2ec3a1f95e (diff)
Merge pull request #790 from cp2004/fix-vcgencmd-webcamd
Fix vcgencmd get_camera output matching with libcamera
-rwxr-xr-xsrc/modules/octopi/filesystem/home/root/bin/webcamd4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/octopi/filesystem/home/root/bin/webcamd b/src/modules/octopi/filesystem/home/root/bin/webcamd
index f2c6dfb..89d5d96 100755
--- a/src/modules/octopi/filesystem/home/root/bin/webcamd
+++ b/src/modules/octopi/filesystem/home/root/bin/webcamd
@@ -227,7 +227,9 @@ while true; do
video_devices=($(find /dev -regextype sed -regex '\/dev/video[0-9]\+' | sort 2> /dev/null))
# add list of raspi camera into an array
- if [ "`vcgencmd get_camera`" = "supported=1 detected=1" ]; then
+ vcgencmd_regex="supported=1 detected=1.*"
+ # Example output matching: supported=1 detected=1, libcamera interfaces=0
+ if [[ "`vcgencmd get_camera`" =~ $vcgencmd_regex ]]; then
video_devices+=( "raspi" )
fi