- X7S option removed (#5388)

- runtime detection of bluetooth chip
This commit is contained in:
3djc
2017-11-19 23:49:38 +01:00
committed by Bertrand Songis
parent d11618eb3f
commit d13fb8918f
8 changed files with 37 additions and 24 deletions
+6 -1
View File
@@ -124,7 +124,9 @@ enum MenuRadioHardwareItems {
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
#define SWITCHES_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
#if defined(BLUETOOTH)
#if defined(PCBX7)
#define BLUETOOTH_ROWS uint8_t(btChipPresent ? 0 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
#elif defined(BLUETOOTH)
#define BLUETOOTH_ROWS 0, uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
#else
#define BLUETOOTH_ROWS
@@ -230,6 +232,9 @@ void menuRadioHardware(event_t event)
case ITEM_RADIO_HARDWARE_BLUETOOTH_MODE:
lcdDrawTextAlignedLeft(y, STR_BLUETOOTH);
lcdDrawTextAtIndex(HW_SETTINGS_COLUMN2, y, STR_BLUETOOTH_MODES, g_eeGeneral.bluetoothMode, attr);
if ((g_eeGeneral.bluetoothMode != BLUETOOTH_OFF) && !btChipPresent) {
g_eeGeneral.bluetoothMode = BLUETOOTH_OFF;
}
if (attr) {
g_eeGeneral.bluetoothMode = checkIncDecGen(event, g_eeGeneral.bluetoothMode, BLUETOOTH_OFF, BLUETOOTH_TRAINER);
}
+4
View File
@@ -117,6 +117,7 @@ void menuStatisticsView(event_t event)
#define MENU_DEBUG_COL2_OFS (17*FW)
#define MENU_DEBUG_Y_CURRENT (1*FH)
#define MENU_DEBUG_ROW1 (1*FH+1)
#define MENU_DEBUG_ROW2 (2*FH+1)
#define MENU_DEBUG_Y_MAH (2*FH)
#define MENU_DEBUG_Y_CPU_TEMP (3*FH)
#define MENU_DEBUG_Y_COPROC (4*FH)
@@ -308,6 +309,9 @@ void menuStatisticsDebug2(event_t event)
lcdDrawTextAlignedLeft(MENU_DEBUG_ROW1, "Tlm RX Err");
lcdDrawNumber(MENU_DEBUG_COL1_OFS, MENU_DEBUG_ROW1, telemetryErrors, RIGHT);
lcdDrawTextAlignedLeft(MENU_DEBUG_ROW2, "BT status");
lcdDrawNumber(MENU_DEBUG_COL1_OFS, MENU_DEBUG_ROW2, btChipPresent, RIGHT);
lcdDrawText(4*FW, 7*FH+1, STR_MENUTORESET);
lcdInvertLastLine();
}