From 19e2309be71944d9a9d04034ac7973587bc38c93 Mon Sep 17 00:00:00 2001 From: tangchao0503 <735056338@qq.com> Date: Mon, 4 Sep 2023 18:03:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=BF=94=E5=9B=9E=E7=9A=84?= =?UTF-8?q?=E6=9B=9D=E5=85=89=E6=97=B6=E9=97=B4=E9=83=BD=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=BE=AE=E7=A7=92=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source_Files/ximeaimager.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Source_Files/ximeaimager.cpp b/Source_Files/ximeaimager.cpp index f9c3406..d04bf7e 100644 --- a/Source_Files/ximeaimager.cpp +++ b/Source_Files/ximeaimager.cpp @@ -204,9 +204,14 @@ void XimeaImager::setFramerate(double framerate) { m_imager.set_framerate(framerate); + int exposureTimeInUs = getExposureTime(); + int maxExposureTimeInUs=1/framerate*1000000; -// setExposureTime(maxExposureTimeInUs); -// setExposureTime(1000); + + if (exposureTimeInUs > maxExposureTimeInUs) + { + wrapSetExposureTime(maxExposureTimeInUs); + } m_iImagerState=102; emit ximeaImageStatus(m_iImagerState); @@ -249,9 +254,7 @@ double XimeaImager::setExposureTime(float exposureTime_in_us) //确保设置的积分时间比最大积分时间小 if(exposureTime_in_us