This commit is contained in:
zhangsheng 2025-07-10 16:23:27 +08:00
parent fab386fabc
commit 41fb6ab706

View File

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