diff --git a/libs/hwhandler.sh b/libs/hwhandler.sh index 7d74a6b..17a0850 100755 --- a/libs/hwhandler.sh +++ b/libs/hwhandler.sh @@ -60,9 +60,9 @@ list_cam_v4l2ctrls() { ## Determine connected libcamera (CSI) device detect_libcamera() { - local avail - if [[ "$(is_raspberry_pi)" = "1" ]]; then - vcgencmd get_camera | grep -c "libcamera interfaces=1" || true + if [[ "$(is_raspberry_pi)" = "1" ]] && + [[ -x "$(command -v libcamera-hello)" ]]; then + libcamera-hello --list-cameras | awk 'NR==1 {print $1}' | grep -c "Available" fi }