Properly disable BT when module not present
(cherry picked from commit 2bc9a00f32a29a085e4764042ffc7d61019944f1)
This commit is contained in:
@@ -237,6 +237,12 @@ void menuRadioHardware(event_t event)
|
|||||||
});
|
});
|
||||||
|
|
||||||
uint8_t sub = menuVerticalPosition - HEADER_LINE;
|
uint8_t sub = menuVerticalPosition - HEADER_LINE;
|
||||||
|
|
||||||
|
#if defined(BLUETOOTH)
|
||||||
|
if (g_eeGeneral.bluetoothMode != BLUETOOTH_OFF && !IS_BLUETOOTH_CHIP_PRESENT()) {
|
||||||
|
g_eeGeneral.bluetoothMode = BLUETOOTH_OFF;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (uint8_t i=0; i<NUM_BODY_LINES; i++) {
|
for (uint8_t i=0; i<NUM_BODY_LINES; i++) {
|
||||||
coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
|
coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
|
||||||
@@ -394,9 +400,6 @@ void menuRadioHardware(event_t event)
|
|||||||
case ITEM_RADIO_HARDWARE_BLUETOOTH_MODE:
|
case ITEM_RADIO_HARDWARE_BLUETOOTH_MODE:
|
||||||
lcdDrawTextAlignedLeft(y, STR_BLUETOOTH);
|
lcdDrawTextAlignedLeft(y, STR_BLUETOOTH);
|
||||||
lcdDrawTextAtIndex(HW_SETTINGS_COLUMN2, y, STR_BLUETOOTH_MODES, g_eeGeneral.bluetoothMode, attr);
|
lcdDrawTextAtIndex(HW_SETTINGS_COLUMN2, y, STR_BLUETOOTH_MODES, g_eeGeneral.bluetoothMode, attr);
|
||||||
if (g_eeGeneral.bluetoothMode != BLUETOOTH_OFF && !IS_BLUETOOTH_CHIP_PRESENT()) {
|
|
||||||
g_eeGeneral.bluetoothMode = BLUETOOTH_OFF;
|
|
||||||
}
|
|
||||||
if (attr) {
|
if (attr) {
|
||||||
g_eeGeneral.bluetoothMode = checkIncDecGen(event, g_eeGeneral.bluetoothMode, BLUETOOTH_OFF, BLUETOOTH_TRAINER);
|
g_eeGeneral.bluetoothMode = checkIncDecGen(event, g_eeGeneral.bluetoothMode, BLUETOOTH_OFF, BLUETOOTH_TRAINER);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user