From 6a63213ee86d634a9edcb27d87b755cd618c19c7 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 28 Jun 2024 22:58:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=A5=E8=A1=A5=E7=85=A7=E7=89=87=E7=9A=84?= =?UTF-8?q?=E6=8B=8D=E7=85=A7=E6=97=B6=E9=97=B4=E6=8E=A7=E5=88=B6=E5=9C=A8?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=97=B6=E9=97=B4=E4=B8=80=E5=AE=9A=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 如果在30s内,则不作改变。否则调整为计划时间加(通道数的数值*2) --- app/src/main/cpp/PhoneDevice.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 9d5a9b40..28f3c2ec 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1326,7 +1326,15 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat) return false; } - mPhotoInfo.photoTime = time(NULL); + time_t takingTime = time(NULL); + if (mPhotoInfo.remedy != 0) + { + if ((takingTime - mPhotoInfo.scheduleTime) > 30) + { + takingTime = mPhotoInfo.scheduleTime + mPhotoInfo.channel * 2; + } + } + mPhotoInfo.photoTime = takingTime; int baseline = 0; cv::Size textSize; double height = mat.size().height; @@ -1595,7 +1603,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat) { XYLOG(XYLOG_SEVERITY_INFO, "Succeeded to write photo: %s", fullPath.c_str()); } - TakePhotoCb(res, mPhotoInfo, fullPath, time(NULL), objs); + TakePhotoCb(res, mPhotoInfo, fullPath, takingTime, objs); } else {