From aab8c7fe3e5e44153666f729aba8a4536154a686 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Mon, 1 Feb 2021 23:35:59 +0800 Subject: [PATCH] OSD: fix UART modes. --- menu.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/menu.cpp b/menu.cpp index c5508fe..226bf33 100644 --- a/menu.cpp +++ b/menu.cpp @@ -2846,8 +2846,7 @@ void HandleUI(void) menustate = MENU_UART4; parentstate = MENU_UART3; - struct stat filestat; - uint32_t max = (sizeof(config_uart_msg) / sizeof(config_uart_msg[0])) - (stat("/dev/ttyUSB0", &filestat) ? 1 : 0); + uint32_t max = (sizeof(config_uart_msg) / sizeof(config_uart_msg[0])); m = 0; for (uint32_t i = 0; i < 15; i++) @@ -2883,8 +2882,7 @@ void HandleUI(void) { if (menusub != 16) { - struct stat filestat; - uint32_t max = (sizeof(config_uart_msg) / sizeof(config_uart_msg[0])) - (stat("/dev/ttyUSB0", &filestat) ? 1 : 0); + uint32_t max = (sizeof(config_uart_msg) / sizeof(config_uart_msg[0])); if (menusub < max) SetUARTMode(menusub); } menusub = 0;