fix bugs,version 5.1
This commit is contained in:
parent
c496b76a4a
commit
665de4ff86
@ -119,7 +119,7 @@ open4G:
|
|||||||
char szbuffer[200] = {0x00};
|
char szbuffer[200] = {0x00};
|
||||||
int offSize = 0;
|
int offSize = 0;
|
||||||
int timeoutflag = 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) {
|
while (1) {
|
||||||
char buff[1024] = {0x00};
|
char buff[1024] = {0x00};
|
||||||
int ret = read_data(fd, buff, 1024, 10);
|
int ret = read_data(fd, buff, 1024, 10);
|
||||||
@ -142,7 +142,7 @@ open4G:
|
|||||||
}
|
}
|
||||||
memset(szbuffer, 0x00, sizeof(szbuffer));
|
memset(szbuffer, 0x00, sizeof(szbuffer));
|
||||||
offSize = 0;
|
offSize = 0;
|
||||||
write_data(fd, "AT+QENG=\"servingcell\"\r\n", 27);
|
write_data(fd, (char*)"AT+QENG=\"servingcell\"\r\n", 27);
|
||||||
}
|
}
|
||||||
usleep(10000);
|
usleep(10000);
|
||||||
} else if (ret > 0) {
|
} else if (ret > 0) {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ void Uart::UpdateWirelessNode(uint16_t shortAdd) {
|
|||||||
char localtimestamp[32] = {0};
|
char localtimestamp[32] = {0};
|
||||||
GetTimeNet(localtimestamp, 1);
|
GetTimeNet(localtimestamp, 1);
|
||||||
char insertSql[100] = {0};
|
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));
|
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);
|
std::string spend_count = sqlite_db_ctrl::instance().GetData(" firmware_upgrade ","spend_count",wherecon);
|
||||||
if (atoi(spend_count.c_str()) >= 10){
|
if (atoi(spend_count.c_str()) >= 10){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user