From 4ee41afe5af7bc918229cd08bab7cb0646a05f39 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 14 Mar 2022 13:46:29 +0100 Subject: [PATCH] Disable telemetry input, SBUS trainer and GPS on VCP This would require an additional rx buffer to support getByte() properly. --- radio/src/gui/gui_common.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/radio/src/gui/gui_common.cpp b/radio/src/gui/gui_common.cpp index 8ecec7573..70f5640ee 100644 --- a/radio/src/gui/gui_common.cpp +++ b/radio/src/gui/gui_common.cpp @@ -393,12 +393,23 @@ bool isSerialModeAvailable(uint8_t port_nr, int mode) #if !defined(INTERNAL_GPS) if (mode == UART_MODE_GPS) return false; +#elif defined(USB_SERIAL) + // GPS is not supported on VCP + if (port_nr == SP_VCP && mode == UART_MODE_GPS) + return false; #endif #if !defined(LUA) if (mode == UART_MODE_LUA) return false; #endif + +#if defined(USB_SERIAL) + // Telemetry input & SBUS trainer on VCP is not yet supported + if (port_nr == SP_VCP && + (mode == UART_MODE_TELEMETRY || mode == UART_MODE_SBUS_TRAINER)) + return false; +#endif auto p = hasSerialMode(mode); if (p >= 0 && p != port_nr) return false;