Allow USB mode selection on USB connect (#5193)

Allow all USB modes to be compiled in at the same time
This commit is contained in:
Arne Schwabe
2017-09-10 17:28:08 +02:00
committed by Bertrand Songis
parent 2910488a30
commit b7acee5723
45 changed files with 1515 additions and 1239 deletions
+5
View File
@@ -88,6 +88,7 @@ enum MenuRadioSetupItems {
IF_FAI_CHOICE(ITEM_SETUP_FAI)
CASE_MAVLINK(ITEM_MAVLINK_BAUD)
ITEM_SETUP_SWITCHES_DELAY,
ITEM_SETUP_USB_MODE,
ITEM_SETUP_RX_CHANNEL_ORD,
ITEM_SETUP_STICK_MODE_LABELS,
ITEM_SETUP_STICK_MODE,
@@ -478,6 +479,10 @@ void menuRadioSetup(event_t event)
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.switchesDelay, -15, 100-15);
break;
case ITEM_SETUP_USB_MODE:
g_eeGeneral.USBMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_USBMODE, STR_USBMODES, g_eeGeneral.USBMode, USB_UNSELECTED_MODE, USB_MAX_MODE, attr, event);
break;
case ITEM_SETUP_RX_CHANNEL_ORD:
lcdDrawTextAlignedLeft(y, STR_RXCHANNELORD); // RAET->AETR
for (uint8_t i=1; i<=4; i++) {