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();