diff --git a/uart/uart.cpp b/uart/uart.cpp index cdb39b9..49a4536 100644 --- a/uart/uart.cpp +++ b/uart/uart.cpp @@ -38,7 +38,7 @@ int Uart::UartRecv(int fd, char srcshow, char *buffer) { int timeoutflag = 0; char head[] = {0xAA, 0x55, 0xAA}; char szbuffer[BUF_LENGTH] = {0x00}; - while (1 && !bUpdate) { + while (1 && !bUpdate && !alarmFlag) { if (now_task == WAVE_CMD) { memset(buff, 0, sizeof(buff)); ret = read_data(fd, buff, BUF_LENGTH, 10);