Skip to content

Commit ae607a8

Browse files
authored
[Automated] Merged develop into target master
2 parents 6ac4711 + 5fa8d1e commit ae607a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libs/hwhandler.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ list_picam_resolution() {
8787
local prefix
8888
prefix="$(date +'[%D %T]') crowsnest:"
8989
log_msg "'libcamera' device(s) resolution(s) :"
90-
while read -r i; do
90+
while IFS= read -r i; do
9191
printf "%s\t\t%s\n" "${prefix}" "${i}" >> "${CROWSNEST_LOG_PATH}"
9292
done < <(libcamera-hello --list-cameras | sed '1,2d;s/Modes:/Colorspace:/')
9393
}
@@ -101,8 +101,8 @@ get_libcamera_controls() {
101101
sed 's/device//g;/^SNAPSHOT/q' | sed '/^SNAPSHOT/d' | \
102102
sed '/^CAMERA/d;/- property/d' | sed '/camera-streamer Version:/d' | \
103103
sed 's/- available option: //g' | sed '/^$/d;' | \
104-
sed 's/([0-9]*[a-z,0-9]\,//g' | sed '/type=7/d;/type=4/d' | \
105-
sed 's/type=1/ (bool/g;s/type=3/ (int/g;s/type=5/ (float/g' | \
104+
sed 's/([0-9]*[a-z,0-9]\, /(/g' | sed '/type=7/d;/type=4/d;/type=Rectangle/d' | \
105+
sed 's/type=1/bool/g;s/type=3/int/g;s/type=5/float/g' | sed 's/type=//g;' | \
106106
sed 's/\[/min=/g;s/\.\./ max=/g;s/\]$//g'
107107
else
108108
log_msg "WARN: 'libcamera' device option can not be displayed, because"
@@ -114,7 +114,7 @@ list_picam_controls() {
114114
local prefix
115115
prefix="$(date +'[%D %T]') crowsnest:"
116116
log_msg "'libcamera' device controls :"
117-
while read -r i; do
117+
while IFS= read -r i; do
118118
if [[ ! "${i}" =~ "INFO" ]]; then
119119
printf "%s\t\t%s\n" "${prefix}" "${i}" >>"${CROWSNEST_LOG_PATH}"
120120
fi

0 commit comments

Comments
 (0)