From 257f58aeadc3be56848df9643ffb1ef819318dd3 Mon Sep 17 00:00:00 2001 From: arndcubert Date: Wed, 3 Jan 2024 15:26:12 +0100 Subject: [PATCH 1/2] removed keep_out_of_sequence ajusted bit depth of spectra_multiplier --- interface/cuvis.hpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/interface/cuvis.hpp b/interface/cuvis.hpp index e511e0a..d1ed080 100644 --- a/interface/cuvis.hpp +++ b/interface/cuvis.hpp @@ -277,7 +277,7 @@ namespace cuvis * * @copydoc cuvis_export_general_settings_t.spectra_multiplier * */ - double spectra_multiplier; + uint8_t spectra_multiplier; /** @brief amount of pan-sharpening (default: 0) * @@ -496,11 +496,6 @@ namespace cuvis */ std::chrono::milliseconds poll_interval; - /** - * @copydoc cuvis_worker_settings_t.keep_out_of_sequence - */ - bool keep_out_of_sequence; - /** * @copydoc cuvis_worker_settings_t.worker_queue_size */ @@ -2574,7 +2569,6 @@ namespace cuvis inline WorkerArgs::WorkerArgs() : worker_count(std::thread::hardware_concurrency()), poll_interval(std::chrono::milliseconds(5)), - keep_out_of_sequence(false), worker_queue_hard_limit(100), worker_queue_soft_limit(90), can_drop(false) @@ -2586,7 +2580,6 @@ namespace cuvis args.worker_count = worker_count; args.poll_interval = (std::int32_t)(poll_interval.count()); - args.keep_out_of_sequence = (int)keep_out_of_sequence; args.worker_queue_hard_limit = worker_queue_hard_limit; args.worker_queue_soft_limit = worker_queue_soft_limit; args.can_drop = can_drop; From fc24d33ef0d8a14950df7fbe5da86fd2c38de26c Mon Sep 17 00:00:00 2001 From: arndcubert Date: Thu, 4 Jan 2024 12:07:13 +0100 Subject: [PATCH 2/2] updating types to newest cuvis.h version --- interface/cuvis.hpp | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/interface/cuvis.hpp b/interface/cuvis.hpp index d1ed080..dec967c 100644 --- a/interface/cuvis.hpp +++ b/interface/cuvis.hpp @@ -631,7 +631,7 @@ namespace cuvis /** number of averages used*/ uint32_t averages; /** the sensors's temperature while readout (0 if not applicable) */ - int32_t temperature; + double temperature; /** gain value while recording */ double gain; /** the timestamp (UTC) of the image readout (senor's hardware clock )*/ @@ -1138,7 +1138,7 @@ namespace cuvis type_wrapped get_##funname(size_t id) const \ { \ type_ifcae res; \ - chk(sdkname##_get(*_acqCont, id, &res)); \ + chk(sdkname##_get(*_acqCont, static_cast(id), &res)); \ return static_cast(res); \ } @@ -1152,7 +1152,7 @@ namespace cuvis ACQ_STUB_1a(hardware_queue_size, cuvis_comp_hardware_queue_size, int_t, size_t); ACQ_STUB_1a(hardware_queue_used, cuvis_comp_hardware_queue_used, int_t, size_t); - ACQ_STUB_1a(temperature, cuvis_comp_temperature, int_t, int); + ACQ_STUB_1a(temperature, cuvis_comp_temperature, double, double); #undef ACQ_STUB_1a @@ -1160,7 +1160,7 @@ namespace cuvis Async set_##funname(size_t id, type_wrapped value) const \ { \ CUVIS_ASYNC_CALL_RESULT async_handle; \ - chk(sdkname##_set_async(*_acqCont, id, &async_handle, static_cast(value))); \ + chk(sdkname##_set_async(*_acqCont, static_cast(id), &async_handle, static_cast(value))); \ Async async; \ async._async = std::shared_ptr(new CUVIS_ASYNC_CALL_RESULT{async_handle}, [](CUVIS_ASYNC_CALL_RESULT* handle) { \ cuvis_async_call_free(handle); \ @@ -1736,7 +1736,6 @@ namespace cuvis CUVIS_WORKER this_worker = *_worker; auto wait_on_session_done = [this_worker]() { - const int poll_time_ms = 10; CUVIS_INT session_total; CUVIS_INT session_current; CUVIS_INT status; @@ -1860,7 +1859,7 @@ namespace cuvis chk(code); //transforms into exception } - catch (cuvis::cuvis_sdk_exception const& ex) + catch (cuvis::cuvis_sdk_exception const&) { except = std::current_exception(); } @@ -2403,7 +2402,7 @@ namespace cuvis inline std::optional SessionFile::get_mesu(int_t frameNo, cuvis_session_item_type_t type) const { CUVIS_MESU mesu; - const auto ret = cuvis_session_file_get_mesu(*_session, frameNo, type, &mesu); + cuvis_session_file_get_mesu(*_session, frameNo, type, &mesu); if (CUVIS_HANDLE_NULL == mesu) { @@ -2416,7 +2415,7 @@ namespace cuvis inline std::optional SessionFile::get_ref(int_t refNo, cuvis_reference_type_t type) const { CUVIS_MESU mesu; - const auto ret = cuvis_session_file_get_reference_mesu(*_session, refNo, type, &mesu); + cuvis_session_file_get_reference_mesu(*_session, refNo, type, &mesu); if (CUVIS_HANDLE_NULL == mesu) { @@ -2470,7 +2469,7 @@ namespace cuvis inline GeneralExportArgs::GeneralExportArgs() : export_dir("."), channel_selection("all"), - spectra_multiplier(1.0), + spectra_multiplier(1), pan_scale(0.0), pan_interpolation_type(pan_sharpening_interpolation_type_Linear), pan_algorithm(pan_sharpening_algorithm_CubertMacroPixel), @@ -2512,16 +2511,16 @@ namespace cuvis inline SaveArgs::operator cuvis_save_args_t() const { cuvis_save_args_t save_args; - save_args.allow_fragmentation = static_cast(allow_fragmentation); - save_args.allow_overwrite = static_cast(allow_overwrite); - save_args.allow_drop = static_cast(allow_drop); - save_args.allow_session_file = static_cast(allow_session_file); - save_args.allow_info_file = static_cast(allow_info_file); + save_args.allow_fragmentation = static_cast(allow_fragmentation); + save_args.allow_overwrite = static_cast(allow_overwrite); + save_args.allow_drop = static_cast(allow_drop); + save_args.allow_session_file = static_cast(allow_session_file); + save_args.allow_info_file = static_cast(allow_info_file); save_args.operation_mode = operation_mode; save_args.fps = fps; - save_args.soft_limit = soft_limit; - save_args.hard_limit = hard_limit; - save_args.max_buftime = max_buftime.count(); + save_args.soft_limit = static_cast(soft_limit); + save_args.hard_limit = static_cast(hard_limit); + save_args.max_buftime = static_cast(max_buftime.count()); return save_args; }