From 665de4ff8611c8940e3fdf486323eb94a9339357 Mon Sep 17 00:00:00 2001 From: zhangsheng Date: Mon, 9 Dec 2024 17:09:40 +0800 Subject: [PATCH] fix bugs,version 5.1 --- threadfunc/thread_func.cpp | 6 +++--- uart/uart_parameter_config.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/threadfunc/thread_func.cpp b/threadfunc/thread_func.cpp index c8e2ea3..44d7c56 100644 --- a/threadfunc/thread_func.cpp +++ b/threadfunc/thread_func.cpp @@ -119,7 +119,7 @@ open4G: char szbuffer[200] = {0x00}; int offSize = 0; int timeoutflag = 0; - write_data(fd, "AT+QENG=\"servingcell\"\r\n", 27); + write_data(fd, (char*)"AT+QENG=\"servingcell\"\r\n", 27); while (1) { char buff[1024] = {0x00}; int ret = read_data(fd, buff, 1024, 10); @@ -142,7 +142,7 @@ open4G: } memset(szbuffer, 0x00, sizeof(szbuffer)); offSize = 0; - write_data(fd, "AT+QENG=\"servingcell\"\r\n", 27); + write_data(fd, (char*)"AT+QENG=\"servingcell\"\r\n", 27); } usleep(10000); } else if (ret > 0) { @@ -386,4 +386,4 @@ void DiskSpaceCheck() { } sleep(30); } -} \ No newline at end of file +} diff --git a/uart/uart_parameter_config.cpp b/uart/uart_parameter_config.cpp index f868e3b..9032a3d 100644 --- a/uart/uart_parameter_config.cpp +++ b/uart/uart_parameter_config.cpp @@ -49,7 +49,7 @@ void Uart::UpdateWirelessNode(uint16_t shortAdd) { char localtimestamp[32] = {0}; GetTimeNet(localtimestamp, 1); char insertSql[100] = {0}; - char wherecon[50] = {0}; + char wherecon[100] = {0}; sprintf(wherecon," short_Addr = '%02x%02x' and status = 3 order by start_timestamp DESC",UINT16_HIGH(shortAdd), UINT16_LOW(shortAdd)); std::string spend_count = sqlite_db_ctrl::instance().GetData(" firmware_upgrade ","spend_count",wherecon); if (atoi(spend_count.c_str()) >= 10){