From 0170e21b1dd9e94554a6220862bbdfb38bdeb32a Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 14 Apr 2025 14:44:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BD=91=E7=BB=9C=E9=87=8D?= =?UTF-8?q?=E8=AF=95=E6=AC=A1=E6=95=B0=E5=92=8C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index b4adfc2f..300bc597 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1704,7 +1704,8 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c cv::Mat rgb; bool netCaptureResult = false; - for (int idx = 0; idx < 64; idx++) + std::string lastError; + for (int idx = 0; idx < 128; idx++) { netHandle = GetEthnetHandle(); netPhotoInfo.netHandle = netHandle; @@ -1739,8 +1740,8 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c XYLOG(XYLOG_SEVERITY_INFO, "NetCapture Succeeded PHOTOID=%u Img Size=%u", localPhotoInfo.photoId, (uint32_t)img.size()); if(img.size() <= 1000) { - std::string hexStr = ByteArrayToString(&img[0], img.size()); - XYLOG(XYLOG_SEVERITY_DEBUG,"Img Size<1000, img=%s", hexStr.c_str()); + lastError = ByteArrayToString(&img[0], img.size()); + // XYLOG(XYLOG_SEVERITY_DEBUG,"Img Size<1000, img=%s", hexStr.c_str()); } rgb = cv::imdecode(cv::Mat(img), cv::IMREAD_COLOR); if (!rgb.empty()) @@ -1782,8 +1783,8 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c } else { - XYLOG(XYLOG_SEVERITY_ERROR, "Failed to TP on NET Camera CH=%u PR=%X PHOTOID=%u URL=http://%s%s", (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, - localPhotoInfo.photoId, netPhotoInfo.ip, netPhotoInfo.url); + XYLOG(XYLOG_SEVERITY_ERROR, "Failed to TP on NET Camera CH=%u PR=%X PHOTOID=%u URL=http://%s%s, LastErr:%s", (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, + localPhotoInfo.photoId, netPhotoInfo.ip, netPhotoInfo.url, lastError.c_str()); #if !defined(NDEBUG) && defined(OUTPUT_DBG_INFO) std::string pwrStatus = powerCtrlPtr->GetStatus(); pwrStatus += ethernetPowerCtrl->GetStatus();