diff --git a/cmd/camera.c b/cmd/camera.c index 3aa8ec3..11b5f9c 100644 --- a/cmd/camera.c +++ b/cmd/camera.c @@ -57,11 +57,11 @@ int camera_open(camera_t *camera) case V4L2_PIX_FMT_SRGGB10P: #if 1 - if (camera_configure_isp(camera, 1, 0) < 0) { + if (camera_configure_isp(camera, camera->options.high_res_factor, camera->options.low_res_factor) < 0) { goto error; } #else - if (camera_configure_legacy_isp(&camera, 1.3) < 0) { + if (camera_configure_legacy_isp(&camera, camera->options.high_res_factor) < 0) { goto error; } #endif diff --git a/csi_camera.sh b/csi_camera.sh new file mode 100755 index 0000000..87e4775 --- /dev/null +++ b/csi_camera.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -xeo pipefail +make +./camera_stream -camera-path /dev/v4l/by-path/*.csi-video-index0 "$@" diff --git a/opts/opts.h b/opts/opts.h index e3db6db..3b1759f 100644 --- a/opts/opts.h +++ b/opts/opts.h @@ -32,7 +32,7 @@ typedef struct options_s { #define OPTION_FORMAT_uint "%d" #define OPTION_FORMAT_hex "%08x" #define OPTION_FORMAT_bool "%d" -#define OPTION_FORMAT_float "%.1f" +#define OPTION_FORMAT_float "%f" #define OPTION_FORMAT_string "%s" #define DEFINE_OPTION(_section, _name, _type) \ diff --git a/usb_camera.sh b/usb_camera.sh new file mode 100755 index 0000000..8f65d99 --- /dev/null +++ b/usb_camera.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -xeo pipefail +make +./camera_stream -camera-path /dev/v4l/by-id/usb-*-video-index0 "$@"