This commit is contained in:
zhangsheng 2026-03-11 11:04:02 +08:00
parent 72dbf8e8a4
commit bce3805da5

View File

@ -38,7 +38,7 @@ int Uart::UartRecv(int fd, char srcshow, char *buffer) {
int timeoutflag = 0; int timeoutflag = 0;
char head[] = {0xAA, 0x55, 0xAA}; char head[] = {0xAA, 0x55, 0xAA};
char szbuffer[BUF_LENGTH] = {0x00}; char szbuffer[BUF_LENGTH] = {0x00};
while (1 && !bUpdate) { while (1 && !bUpdate && !alarmFlag) {
if (now_task == WAVE_CMD) { if (now_task == WAVE_CMD) {
memset(buff, 0, sizeof(buff)); memset(buff, 0, sizeof(buff));
ret = read_data(fd, buff, BUF_LENGTH, 10); ret = read_data(fd, buff, BUF_LENGTH, 10);