fix: fix error causing cam list to fail
Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
parent
2bbe265e83
commit
e3bd2e2e57
@ -60,9 +60,15 @@ 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" ]] &&
|
||||||
[[ -x "$(command -v libcamera-hello)" ]]; then
|
[[ -x "$(command -v libcamera-hello)" ]]; then
|
||||||
libcamera-hello --list-cameras | awk 'NR==1 {print $1}' | grep -c "Available"
|
avail="$(libcamera-hello --list-cameras | awk 'NR==1 {print $1}')"
|
||||||
|
if [[ "${avail}" = "Available" ]]; then
|
||||||
|
echo "1"
|
||||||
|
else
|
||||||
|
echo "0"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user