From 9061bb0927071ddf45d27757bfa7d5541c75da79 Mon Sep 17 00:00:00 2001 From: Fixstars-momoko Date: Fri, 30 Aug 2024 13:42:53 -0700 Subject: [PATCH] add CommandAcquisitionModeContdStart(); --- src/bb/image-io/rt_u3v.h | 73 ++++++++++++---------------------------- 1 file changed, 21 insertions(+), 52 deletions(-) diff --git a/src/bb/image-io/rt_u3v.h b/src/bb/image-io/rt_u3v.h index a19274bc..67266716 100644 --- a/src/bb/image-io/rt_u3v.h +++ b/src/bb/image-io/rt_u3v.h @@ -483,6 +483,23 @@ class U3V { return err_; } + GError* CommandAcquisitionModeContdStart(){ + for (auto i=0; imessage); + } + log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode"); + + arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_); + if (err_) { + throw std::runtime_error(err_->message); + } + log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart"); + } + return err_; + } + g_object_unref_t g_object_unref; arv_get_major_version_t arv_get_major_version; @@ -1059,19 +1076,7 @@ class U3VRealCam: public U3V{ * refer to https://github.com/AravisProject/aravis/blob/2ebaa8661761ea4bbc4df878aa67b4a9e1a9a3b9/docs/reference/aravis/porting-0.10.md */ if (order_filp_){ - for (auto i=0; imessage); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode"); - - arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_); - if (err_) { - throw std::runtime_error(err_->message); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart"); - } + err_ = CommandAcquisitionModeContdStart(); } //start streaming after AcquisitionStart for (auto i=0; imessage); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode"); - - arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_); - if (err_) { - throw std::runtime_error(err_->message); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart"); - } + err_ = CommandAcquisitionModeContdStart(); } for (auto i=0; imessage); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode"); - - arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_); - if (err_) { - throw std::runtime_error(err_->message); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart"); - } + err_ = CommandAcquisitionModeContdStart(); } //start streaming after AcquisitionStart for (auto i=0; imessage); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode"); - - arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_); - if (err_) { - throw std::runtime_error(err_->message); - } - log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart"); - } + err_ = CommandAcquisitionModeContdStart(); } for (auto i=0; i