Commit e15462e 1 parent 6152fb2 commit e15462e Copy full SHA for e15462e
File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 19
19
set -eE
20
20
21
21
function v4l2_control {
22
- log_msg " V4L2 Control:"
22
+ v4c_log_msg () {
23
+ log_msg " V4L2 Control: ${1} "
24
+ }
23
25
24
26
function main {
25
27
local device v4l2ctl valueless opt_avail
@@ -31,8 +33,8 @@ function v4l2_control {
31
33
# if not empty do
32
34
if [ -n " ${v4l2ctl} " ]; then
33
35
# Write configured options to Log
34
- log_msg " Device: [cam ${cam} ]"
35
- log_msg " Options: ${v4l2ctl} "
36
+ v4c_log_msg " Device: [cam ${cam} ]"
37
+ v4c_log_msg " Options: ${v4l2ctl} "
36
38
# Split options to array
37
39
IFS=' ,' read -ra opt < <( echo " ${v4l2ctl} " ) ; unset IFS
38
40
# loop through options
@@ -43,7 +45,7 @@ function v4l2_control {
43
45
opt_avail=" $( v4l2-ctl -d " ${device} " -L | \
44
46
grep -c " ${valueless} " || true) "
45
47
if [ " ${opt_avail} " -eq " 0" ]; then
46
- log_msg " Parameter '${param} ' not available for '${device} '. Skipped."
48
+ v4c_log_msg " Parameter '${param} ' not available for '${device} '. Skipped."
47
49
else
48
50
v4l2-ctl -d " ${device} " -c " ${param} " 2> /dev/null
49
51
fi
@@ -52,7 +54,7 @@ function v4l2_control {
52
54
v4l2-ctl -d " ${device} " -L | log_output " v4l2ctl"
53
55
fi
54
56
else
55
- log_msg " No parameters set for [cam ${cam} ]. Skipped."
57
+ v4c_log_msg " No parameters set for [cam ${cam} ]. Skipped."
56
58
fi
57
59
done
58
60
}
You can’t perform that action at this time.
0 commit comments