修改文件名格式

MQTTtest
Matthew 10 months ago
parent 6aebb7e2ec
commit 7f643d9dc4

@ -1592,8 +1592,10 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
if (mPhotoInfo.retries < (DEFAULT_TAKE_PHOTO_RETRIES - 1))
{
shouldRetry = true;
char presetBuf[16] = { 0 };
snprintf(presetBuf, sizeof(presetBuf), "%02X", mPhotoInfo.retries);
// replaceAll(fullPath, ".jpg", std::string("-") + std::to_string(mPhotoInfo.retries) + ".jpg");
replaceAll(fullPath, "_FF_", std::string("_") + std::to_string(mPhotoInfo.retries) + std::string("_"));
replaceAll(fullPath, "_FF_", std::string("_") + presetBuf + std::string("_"));
XYLOG(XYLOG_SEVERITY_ERROR, "Photo is TOO dark or light(LDR=%u), will RETRY it", (uint32_t)captureResult.avgY);
}

Loading…
Cancel
Save