fix: fix raspicam detection

if `start_x=1` is not set,
it messes up output of `vcgencmd get_camera`.

Which leads to not detected libcamera csi cams,
even if they are detected correctly

Therefor using libcamera-hello to determine if available

Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
Stephan Wendel 2023-04-15 14:20:28 +02:00
parent 6c1aec18b4
commit 2a4fbd9c77
No known key found for this signature in database
GPG Key ID: F465B83ACBA45639

View File

@ -60,9 +60,9 @@ list_cam_v4l2ctrls() {
## Determine connected libcamera (CSI) device ## Determine connected libcamera (CSI) device
detect_libcamera() { detect_libcamera() {
local avail if [[ "$(is_raspberry_pi)" = "1" ]] &&
if [[ "$(is_raspberry_pi)" = "1" ]]; then [[ -x "$(command -v libcamera-hello)" ]]; then
vcgencmd get_camera | grep -c "libcamera interfaces=1" || true libcamera-hello --list-cameras | awk 'NR==1 {print $1}' | grep -c "Available"
fi fi
} }