USB-VCP no OFF if internal RF module is set to CRSF (#1957)

* Do not list OFF on VCP menu if internal RF module is set to CRSF to allow pass-through flashing.
Set USB-VCP automatically to CLI when CRSF mode is selected for internal module and it was previously OFF. Activate CLI when iCRSF is selected.

* Companion part

Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
Risto
2022-05-30 22:14:08 +02:00
committed by GitHub
co-authored by elecpower
parent cff819ea0e
commit 6b557e49ea
6 changed files with 54 additions and 9 deletions
+6
View File
@@ -382,6 +382,12 @@ int hasSerialMode(int mode)
bool isSerialModeAvailable(uint8_t port_nr, int mode)
{
#if defined(USB_SERIAL)
// Do not list OFF on VCP if internal RF module is set to CROSSFIRE to allow pass-through flashing
if (port_nr == SP_VCP && mode == UART_MODE_NONE && isInternalModuleCrossfire())
return false;
#endif
if (mode == UART_MODE_NONE)
return true;