From 7c9a7a41fed6611a0e6a75306e932c04c251c556 Mon Sep 17 00:00:00 2001 From: zhangsheng Date: Mon, 25 Nov 2024 15:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E6=B8=85?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=B3=A2=E5=BD=A2=E7=BC=93=E5=AD=98=E7=A9=BA?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- threadfunc/thread_func.cpp | 4 +++- uart/uart_feature_parse.cpp | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/threadfunc/thread_func.cpp b/threadfunc/thread_func.cpp index a212d95..7caa4fe 100644 --- a/threadfunc/thread_func.cpp +++ b/threadfunc/thread_func.cpp @@ -354,11 +354,13 @@ void CleanLogFile(std::string log_dir, size_t retain) { void DiskSpaceCheck() { std::string directory = "/opt/log"; + std::string directory_data = "/opt/data"; while (1) { boost::filesystem::space_info si = boost::filesystem::space("/opt"); if (si.free <= 20000000) { zlog_warn(zct, "disk free space:%llu for /opt", si.free); - CleanLogFile(directory, 10); + CleanLogFile(directory, 10); + CleanLogFile(directory_data, 100); boost::filesystem::space_info si1 = boost::filesystem::space("/opt"); if (si1.free <= 20000000) { zlog_warn(zct, "[DiskSpaceCheck] can not release enough space and clean more log file"); diff --git a/uart/uart_feature_parse.cpp b/uart/uart_feature_parse.cpp index eb7056f..2015f35 100644 --- a/uart/uart_feature_parse.cpp +++ b/uart/uart_feature_parse.cpp @@ -21,9 +21,9 @@ std::vector g_VecWaveDataZ; std::map g_mapCompress; std::map g_mapWaveChannel; -unsigned char data[1024 * 30] = {0x00}; -unsigned char outdata[1024 * 50] = {0x00}; -unsigned char dealdata[1024 * 30] = {0x00}; +unsigned char data[96000] = {0x00}; +unsigned char outdata[96000] = {0x00}; +unsigned char dealdata[96000] = {0x00}; char mqttData[512000] = {0}; void Uart::RecordBattery(std::string &strLongAddr, DataRecvStatic &dataStatic, std::string &nowTimetamp) {