弥补照片的拍照时间控制在计划时间一定范围内

如果在30s内,则不作改变。否则调整为计划时间加(通道数的数值*2)
hdrplus
Matthew 12 months ago
parent f033c88644
commit 6a63213ee8

@ -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
{

Loading…
Cancel
Save