From c4326c3cf86c00d6ab38d93817acd5e3a09b01bc Mon Sep 17 00:00:00 2001 From: Danil Tolkachev Date: Tue, 30 Apr 2019 11:17:06 +0300 Subject: [PATCH] fix roi configuration --- src/avt_vimba_camera.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/avt_vimba_camera.cpp b/src/avt_vimba_camera.cpp index c999d823..d06f597d 100644 --- a/src/avt_vimba_camera.cpp +++ b/src/avt_vimba_camera.cpp @@ -1097,26 +1097,26 @@ void AvtVimbaCamera::updateROIConfig(Config& config) { width = right_x - offset_x; height = bottom_y - offset_y; - config.width = width/binning_or_decimation_x; - config.height = height/binning_or_decimation_y; + config.roi_width = width/binning_or_decimation_x; + config.roi_height = height/binning_or_decimation_y; config.roi_offset_x = offset_x/binning_or_decimation_x; config.roi_offset_y = offset_y/binning_or_decimation_y; - if (config.roi_offset_x != config_.roi_offset_x || on_init_) { + if (config.roi_width != config_.roi_width || on_init_) { changed = true; - setFeatureValue("OffsetX", static_cast(config.roi_offset_x)); + setFeatureValue("Width", static_cast(config.roi_width)); } - if (config.roi_offset_y != config_.roi_offset_y || on_init_) { + if (config.roi_height != config_.roi_height || on_init_) { changed = true; - setFeatureValue("OffsetY", static_cast(config.roi_offset_y)); + setFeatureValue("Height", static_cast(config.roi_height)); } - if (config.width != config_.width || on_init_) { + if (config.roi_offset_x != config_.roi_offset_x || on_init_) { changed = true; - setFeatureValue("Width", static_cast(config.width)); + setFeatureValue("OffsetX", static_cast(config.roi_offset_x)); } - if (config.height != config_.height || on_init_) { + if (config.roi_offset_y != config_.roi_offset_y || on_init_) { changed = true; - setFeatureValue("Height", static_cast(config.height)); + setFeatureValue("OffsetY", static_cast(config.roi_offset_y)); } if(changed && show_debug_prints_){