reverting

This commit is contained in:
iceman1001 committed 2026-08-27 14:26:35 +02:00
1 parent f78890cb03
commit bbe0c11e4c
2 files changed
-17

No files matched your search

-10
View File
@@ -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
-7
View File
@@ -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