From db78ce77288e27d6103f7fdbcc955b571f93db47 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 23 Apr 2025 15:46:01 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96http=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 34 +++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index b3635549..ca73c134 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1728,22 +1728,7 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c img.clear(); netCaptureResult = requestCapture(localPhotoInfo.channel, localPhotoInfo.preset, netPhotoInfo, img); - if (netCaptureResult) - { - m_ethernetFailures = 0; - } - else - { - m_ethernetFailures++; - if (m_ethernetFailures > 3) - { - time_t rebootTime = GetRebootTime(); - if (ts - rebootTime > 1800) - { - Reboot(REBOOT_TYPE_DEVICE, true, "Ethernet Not Existing"); - } - } - } + if (netCaptureResult && !img.empty()) { if(img.size() <= 1000) @@ -1764,6 +1749,23 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c ethernetPowerCtrl.reset(); XYLOG(XYLOG_SEVERITY_DEBUG, "Ethernet Power OFF"); + if (netCaptureResult) + { + m_ethernetFailures = 0; + } + else + { + m_ethernetFailures++; + if (m_ethernetFailures > 3) + { + time_t rebootTime = GetRebootTime(); + if (ts - rebootTime > 1800) + { + Reboot(REBOOT_TYPE_DEVICE, true, "Ethernet Not Existing"); + } + } + } + if (!rgb.empty()) { time_t takingTime = ts; From 4c42820cea9b8aae156bf16acc28a136ff9365da Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 23 Apr 2025 15:56:49 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/camera2/ndkcamera.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/cpp/camera2/ndkcamera.cpp b/app/src/main/cpp/camera2/ndkcamera.cpp index 0e2fed64..9a3c092c 100644 --- a/app/src/main/cpp/camera2/ndkcamera.cpp +++ b/app/src/main/cpp/camera2/ndkcamera.cpp @@ -1367,6 +1367,7 @@ void NdkCamera::onImageAvailable(AImageReader* reader) mstatus = AImage_getTimestamp(image, &frameTs); #ifdef OUTPUT_DBG_INFO +#if 0 if (mWidth == 1920) { std::string dt = FormatLocalDateTime("%d%02d%02d%02d%02d%02d", time(NULL)); @@ -1374,6 +1375,7 @@ void NdkCamera::onImageAvailable(AImageReader* reader) fileName += "_" + mCameraId + std::to_string(frameTs) + ".yuv"; saveYuvToFile(image, fileName.c_str()); } +#endif #endif AImage_delete(image); From 5a91bd8dcb3d0f8f3ae3490b18f3f4d1e4104f24 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 23 Apr 2025 16:07:45 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/MicroPhoto.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/cpp/MicroPhoto.cpp b/app/src/main/cpp/MicroPhoto.cpp index 9b629b33..60e24dce 100644 --- a/app/src/main/cpp/MicroPhoto.cpp +++ b/app/src/main/cpp/MicroPhoto.cpp @@ -544,6 +544,7 @@ Java_com_xypower_mpapp_MicroPhotoService_sendHeartbeat( pTerminal->SendHeartbeat(); #ifdef OUTPUT_DBG_INFO +#if 0 std::thread t([]() { time_t ts = time(NULL); @@ -557,6 +558,7 @@ Java_com_xypower_mpapp_MicroPhotoService_sendHeartbeat( }); t.detach(); +#endif #endif return JNI_TRUE; From d4c598694315d5ae07b70c3a57f57369201dd347 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 23 Apr 2025 16:08:17 +0800 Subject: [PATCH 4/5] Update version to 1.3.136 Based Core Version to 1.4.74 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 98e1abaa..5b7db11e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ plugins { // 10,00,000 major-minor-build def AppMajorVersion = 1 def AppMinorVersion = 3 -def AppBuildNumber = 135 +def AppBuildNumber = 136 def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber From 11e5b98a902ad3a8a1fc7c87fbacb7db65f8c6f2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 23 Apr 2025 16:58:36 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=85=85=E7=94=B5=E7=94=B5=E5=8E=8B?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=B0=8F=E4=BA=8E3V=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=AE=BE=E7=BD=AE=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index ca73c134..3c317d38 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1019,7 +1019,14 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro { continue; } - snprintf(str, sizeof(str), "%.1f", (val / 1000.0)); + if (val < 3000) + { + strcpy(str, "0"); + } + else + { + snprintf(str, sizeof(str), "%.1f", (val / 1000.0)); + } it->second = std::string(str); break; }