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:
authorCharlie Powell <31997505+cp2004@users.noreply.github.com>2022-08-14 19:43:49 +0300
committerGitHub <noreply@github.com>2022-08-14 19:43:49 +0300
commitfc82f1202f5c818f855a4cdb22a7bb2ec3a1f95e (patch)
tree48037b8b1bb45d8683d4ff7c455ac9239f55eb3b
parent1e5e8eaa61e0360954a0a3d709592ce20f9e6762 (diff)
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