Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dual picam detection #229

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/hwhandler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ detect_libcamera() {
[[ -x "$(command -v libcamera-hello)" ]]; then
avail="$(libcamera-hello --list-cameras | sed '/^\[.*\].*/d' | awk 'NR==1 {print $1}')"
if [[ "${avail}" = "Available" ]]; then
echo "1"
get_libcamera_path | wc -l
else
echo "0"
fi
Expand Down
6 changes: 4 additions & 2 deletions libs/logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function print_cfg {
}

function print_cams {
local total v4l
local device total v4l
v4l="$(find /dev/v4l/by-id/ -iname "*index0" 2> /dev/null | wc -l)"
libcamera="$(detect_libcamera)"
legacy="$(detect_legacy)"
Expand All @@ -100,7 +100,9 @@ function print_cams {
log_msg "INFO: Found ${total} total available Device(s)"
fi
if [[ "${libcamera}" -ne 0 ]]; then
log_msg "Detected 'libcamera' device -> $(get_libcamera_path)"
for device in $(get_libcamera_path); do
log_msg "Detected 'libcamera' device -> ${device}"
done
fi
if [[ "${legacy}" -ne 0 ]]; then
raspicam="$(v4l2-ctl --list-devices | grep -A1 -e 'mmal' | \
Expand Down
Loading