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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user