fix bugs,version 5.1

This commit is contained in:
zhangsheng 2024-12-09 17:09:40 +08:00
parent c496b76a4a
commit 665de4ff86
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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){