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,6 +393,10 @@ bool isSerialModeAvailable(uint8_t port_nr, int mode)
|
|||||||
#if !defined(INTERNAL_GPS)
|
#if !defined(INTERNAL_GPS)
|
||||||
if (mode == UART_MODE_GPS)
|
if (mode == UART_MODE_GPS)
|
||||||
return false;
|
return false;
|
||||||
|
#elif defined(USB_SERIAL)
|
||||||
|
// GPS is not supported on VCP
|
||||||
|
if (port_nr == SP_VCP && mode == UART_MODE_GPS)
|
||||||
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LUA)
|
#if !defined(LUA)
|
||||||
@@ -400,6 +404,13 @@ bool isSerialModeAvailable(uint8_t port_nr, int mode)
|
|||||||
return false;
|
return false;
|
||||||
#endif
|
#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);
|
auto p = hasSerialMode(mode);
|
||||||
if (p >= 0 && p != port_nr) return false;
|
if (p >= 0 && p != port_nr) return false;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user