From bae16b9427a4a3c121e04e1db5a0b097e678dbdb Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 28 Mar 2025 11:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/MicroPhoto.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/MicroPhoto.cpp b/app/src/main/cpp/MicroPhoto.cpp index 1f2bb614..b49cd287 100644 --- a/app/src/main/cpp/MicroPhoto.cpp +++ b/app/src/main/cpp/MicroPhoto.cpp @@ -532,11 +532,11 @@ Java_com_xypower_mpapp_MicroPhotoService_sendHeartbeat( { 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)); + appendFile("/sdcard/com.xypower.mpapp/tmp/ldr.txt", (const unsigned char* )buf, strlen(buf)); });