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