Disable telemetry input, SBUS trainer and GPS on VCP

This would require an additional rx buffer to support getByte() properly.
This commit is contained in:
Raphael Coeffic
2022-03-20 16:30:59 +01:00
parent d39f3e058c
commit 4ee41afe5a
+11
View File
@@ -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;