diff --git a/uart/uart.cpp b/uart/uart.cpp index db96d9c..096c81b 100644 --- a/uart/uart.cpp +++ b/uart/uart.cpp @@ -88,7 +88,7 @@ int Uart::UartRecv(int fd, char srcshow, char *buffer) { ret = read_data(fd, buff, BUF_LENGTH, 10); if (ret <= 0) { timeoutflag++; - if (timeoutflag > 5) { + if (timeoutflag > 10) { FindRecvPackage(offSize, szbuffer, (char *)head); memset(szbuffer, 0x00, sizeof(szbuffer)); timeoutflag = 0; @@ -99,10 +99,11 @@ int Uart::UartRecv(int fd, char srcshow, char *buffer) { } else if (ret > 0) { maxSize += ret; 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++) { printf( "%02x ", buff[i] & 0xff); } - zlog_info(zct, "\n"); + printf("\n"); timeoutflag = 0; m_TimeStamp = 0; if (offSize > sizeof(szbuffer)) {