From 41fb6ab70699af8d70a0e1e99b56d8d5d8abc696 Mon Sep 17 00:00:00 2001 From: zhangsheng Date: Thu, 10 Jul 2025 16:23:27 +0800 Subject: [PATCH] fix bugs --- uart/uart.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)) {