diff options
author | Guy Sheffer <guysoft@gmail.com> | 2022-08-20 02:55:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-20 02:55:27 +0300 |
commit | 01f35e4893adc12efa0ffc685e6b96720d57f867 (patch) | |
tree | 5071f58e40c010f76aba23bc1cfcc0c06c0b47d2 | |
parent | ed98b495315d9bba8b3a901f6488b20c52c50c28 (diff) | |
parent | fc82f1202f5c818f855a4cdb22a7bb2ec3a1f95e (diff) |
Merge pull request #790 from cp2004/fix-vcgencmd-webcamd
Fix vcgencmd get_camera output matching with libcamera
-rwxr-xr-x | src/modules/octopi/filesystem/home/root/bin/webcamd | 4 |
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 |