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 {