diff --git a/README.md b/README.md index 2c3c980..7288458 100644 --- a/README.md +++ b/README.md @@ -281,14 +281,9 @@ Simply add to your camera setup section. \ Restart webcamd via mainsail (or your used UI) and you're good to go. -To determine which options or better said parameters your Webcam provides, \ -add to your +To determine which options or better said parameters your Webcam provides, set at least - [webcamd] - -section, simply - - log_v4l2ctrls: true + log_level: verbose This will show you a list with available options. Like this: diff --git a/libs/hwhandler.sh b/libs/hwhandler.sh index 8f90250..ddc0a6d 100755 --- a/libs/hwhandler.sh +++ b/libs/hwhandler.sh @@ -14,7 +14,7 @@ # shellcheck enable=require-variable-braces # Exit upon Errors -set -eE +set -Ee ### Detect Hardware function detect_avail_cams { @@ -29,8 +29,6 @@ function detect_avail_cams { log_msg "${v4l} -> ${realpath}" if [ "$(log_level)" != "quiet" ]; then list_cam_formats "${v4l}" - fi - if [ "$(log_v4l2ctrls)" == "true" ]; then list_cam_v4l2ctrls "${v4l}" fi done diff --git a/libs/logging.sh b/libs/logging.sh index 6c00197..e1fec51 100755 --- a/libs/logging.sh +++ b/libs/logging.sh @@ -14,7 +14,7 @@ # shellcheck enable=require-variable-braces # Exit upon Errors -set -eE +set -Ee ## Logging function init_log_entry { @@ -35,10 +35,6 @@ function log_level { fi } -function log_v4l2ctrls { - get_param webcamd log_v4l2ctrls 2> /dev/null || echo "false" -} - function delete_log { local del_log logfile logfile="$(get_param "webcamd" log_path | sed "s#^~#${HOME}#gi")" @@ -48,7 +44,6 @@ function delete_log { fi } - function log_msg { local msg logfile prefix msg="${1}" @@ -107,8 +102,6 @@ function print_cams { log_msg "Detected 'Raspicam' Device -> ${raspicam}" if [ ! "$(log_level)" = "quiet" ]; then list_cam_formats "${raspicam}" - fi - if [ "$(log_v4l2ctrls)" == "true" ]; then list_cam_v4l2ctrls "${raspicam}" fi fi diff --git a/sample_configs/mainsail_default.conf b/sample_configs/mainsail_default.conf index 7103ee4..aa08a0f 100644 --- a/sample_configs/mainsail_default.conf +++ b/sample_configs/mainsail_default.conf @@ -6,7 +6,6 @@ [webcamd] log_path: ~/klipper_logs/webcamd.log # Default logfile in ~/klipper_logs/webcamd.log log_level: verbose # Valid Options are quiet/verbose/debug -log_v4l2ctrls: true [cam 1] mode: mjpg # mjpg/rtsp/webrtc diff --git a/sample_configs/minimal.conf b/sample_configs/minimal.conf index 01439f9..5b56028 100644 --- a/sample_configs/minimal.conf +++ b/sample_configs/minimal.conf @@ -1,7 +1,6 @@ [webcamd] log_path: ~/klipper_logs/webcamd.log # Default logfile in ~/klipper_logs/webcamd.log log_level: quiet # Valid Options are quiet/verbose/debug -log_v4l2ctrls: false # if set to true, it logs available controls for camera delete_log: false # true to get fresh log on every start diff --git a/webcamd b/webcamd index a919d1c..e7ccdad 100755 --- a/webcamd +++ b/webcamd @@ -14,7 +14,7 @@ # shellcheck enable=require-variable-braces # Exit upon Errors -set -e +set -Ee # Base Path BASE_CN_PATH="$(dirname "$(readlink -f "${0}")")"