From bbe0c11e4c13944235825eebcb5e3bf34905d7a5 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 27 Aug 2026 14:26:35 +0200 Subject: [PATCH] reverting --- client/src/uart/uart_posix.c | 10 ---------- include/pm3_cmd.h | 7 ------- 2 files changed, 17 deletions(-) diff --git a/client/src/uart/uart_posix.c b/client/src/uart/uart_posix.c index 3e8f63706..b04a4c208 100644 --- a/client/src/uart/uart_posix.c +++ b/client/src/uart/uart_posix.c @@ -617,16 +617,6 @@ int uart_receive(const serial_port sp, uint8_t *pbtRx, uint32_t pszMaxRxLen, uin FD_ZERO(&rfds); FD_SET(spu->fd, &rfds); tv = timeout; - if ((*pszRxLen == 0) && - (spu->udpBuffer == NULL) && - (timeout.tv_sec == 0) && - (timeout.tv_usec <= UART_FPC_CLIENT_RX_TIMEOUT_MS * 1000)) { - // Nothing of a frame in hand yet - see the header note. Local links - // only: a network link keeps its own longer timeout, where polling - // this fast would cost more than it saves. - tv.tv_sec = 0; - tv.tv_usec = UART_USB_CLIENT_RX_IDLE_TIMEOUT_MS * 1000; - } res = select(spu->fd + 1, &rfds, NULL, NULL, &tv); // Read error diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index b76c7e205..9dd79232c 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -1150,13 +1150,6 @@ typedef struct { // uart_win32.c & uart_posix.c #define UART_FPC_CLIENT_RX_TIMEOUT_MS 200 #define UART_USB_CLIENT_RX_TIMEOUT_MS 20 -// Idle poll, used only while no part of a frame is in hand. The comm thread -// transmits a queued command only after its receive phase returns, so a long -// idle wait here delays every single command by up to one full timeout. -// Returning "no data" promptly costs nothing; once part of a frame IS in hand -// the full timeout above applies, so a frame split across USB frames is never -// truncated. -#define UART_USB_CLIENT_RX_IDLE_TIMEOUT_MS 1 #define UART_NET_CLIENT_RX_TIMEOUT_MS 500 #define UART_TCP_LOCAL_CLIENT_RX_TIMEOUT_MS 40 #define UART_UDP_LOCAL_CLIENT_RX_TIMEOUT_MS 20