fix bugs
This commit is contained in:
parent
fab386fabc
commit
41fb6ab706
@ -88,7 +88,7 @@ int Uart::UartRecv(int fd, char srcshow, char *buffer) {
|
|||||||
ret = read_data(fd, buff, BUF_LENGTH, 10);
|
ret = read_data(fd, buff, BUF_LENGTH, 10);
|
||||||
if (ret <= 0) {
|
if (ret <= 0) {
|
||||||
timeoutflag++;
|
timeoutflag++;
|
||||||
if (timeoutflag > 5) {
|
if (timeoutflag > 10) {
|
||||||
FindRecvPackage(offSize, szbuffer, (char *)head);
|
FindRecvPackage(offSize, szbuffer, (char *)head);
|
||||||
memset(szbuffer, 0x00, sizeof(szbuffer));
|
memset(szbuffer, 0x00, sizeof(szbuffer));
|
||||||
timeoutflag = 0;
|
timeoutflag = 0;
|
||||||
@ -99,10 +99,11 @@ int Uart::UartRecv(int fd, char srcshow, char *buffer) {
|
|||||||
} else if (ret > 0) {
|
} else if (ret > 0) {
|
||||||
maxSize += ret;
|
maxSize += ret;
|
||||||
zlog_info(zct, "0x8888==str_recv===,ret = %d offSize = %d\n", ret, maxSize);
|
zlog_info(zct, "0x8888==str_recv===,ret = %d offSize = %d\n", ret, maxSize);
|
||||||
|
printf("""0x8888==str_recv===,ret = %d offSize = %d\n", ret, maxSize);
|
||||||
for (int i = 0; i < ret; i++) {
|
for (int i = 0; i < ret; i++) {
|
||||||
printf( "%02x ", buff[i] & 0xff);
|
printf( "%02x ", buff[i] & 0xff);
|
||||||
}
|
}
|
||||||
zlog_info(zct, "\n");
|
printf("\n");
|
||||||
timeoutflag = 0;
|
timeoutflag = 0;
|
||||||
m_TimeStamp = 0;
|
m_TimeStamp = 0;
|
||||||
if (offSize > sizeof(szbuffer)) {
|
if (offSize > sizeof(szbuffer)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user