From 8951b8cdafa466b9e96be7752e8dda7fc031b128 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 28 Mar 2025 11:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=AC=A1=E5=BF=83=E8=B7=B3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=89=E6=95=8F=E5=80=BC=E7=9A=84=E9=87=87=E9=9B=86?= =?UTF-8?q?=EF=BC=8C=E4=BE=9B=E5=90=8E=E9=9D=A2=E8=A7=84=E5=88=99=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/MicroPhoto.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/cpp/MicroPhoto.cpp b/app/src/main/cpp/MicroPhoto.cpp index e624286c..1f2bb614 100644 --- a/app/src/main/cpp/MicroPhoto.cpp +++ b/app/src/main/cpp/MicroPhoto.cpp @@ -527,6 +527,22 @@ Java_com_xypower_mpapp_MicroPhotoService_sendHeartbeat( pTerminal->SendHeartbeat(); +#ifdef OUTPUT_DBG_INFO + std::thread t([]() + { + time_t ts = time(NULL); + int ldr = GpioControl::getLightAdc(); + + char buf[64] = { 0 }; + snprintf(buf, sizeof(buf), "%s %d\r\n", FormatLocalDateTime(ts).c_str(), ldr); + + appendFile("/sdcard/com.xypower.mpapp/tmp/ldr.txt", buf, strlen(buf)); + + + }); + t.detach(); +#endif + return JNI_TRUE; }