x9e with horus bt module (#5214)
* Basics to allow Horus BT module on X9E * wip * Temporary hack to prevent X9E to enter reset loop * The wait game starts :) * Temporary compil fixes * More sensibles defines
This commit is contained in:
@@ -241,7 +241,7 @@ int getSwitchWarningsCount()
|
||||
#define INTERNAL_MODULE_CHANNELS_ROWS IF_INTERNAL_MODULE_ON(1)
|
||||
#define PORT_CHANNELS_ROWS(x) (x==INTERNAL_MODULE ? INTERNAL_MODULE_CHANNELS_ROWS : (x==EXTERNAL_MODULE ? EXTERNAL_MODULE_CHANNELS_ROWS : 1))
|
||||
|
||||
#if defined(BLUETOOTH) && defined(DEBUG)
|
||||
#if defined(BLUETOOTH) && defined(USEHORUSBT)
|
||||
#define TRAINER_LINE1_BLUETOOTH_M_ROWS ((bluetoothDistantAddr[0] == 0 || bluetoothState == BLUETOOTH_STATE_CONNECTED) ? (uint8_t)0 : (uint8_t)1)
|
||||
#define TRAINER_LINE1_ROWS (g_model.trainerMode == TRAINER_MODE_SLAVE ? (uint8_t)1 : (g_model.trainerMode == TRAINER_MODE_MASTER_BLUETOOTH ? TRAINER_LINE1_BLUETOOTH_M_ROWS : (g_model.trainerMode == TRAINER_MODE_SLAVE_BLUETOOTH ? (uint8_t)1 : HIDDEN_ROW)))
|
||||
#define TRAINER_LINE2_ROWS (g_model.trainerMode == TRAINER_MODE_SLAVE ? (uint8_t)2 : HIDDEN_ROW)
|
||||
@@ -721,7 +721,7 @@ void menuModelSetup(event_t event)
|
||||
if (attr) {
|
||||
g_model.trainerMode = checkIncDec(event, g_model.trainerMode, 0, TRAINER_MODE_MAX(), EE_MODEL, isTrainerModeAvailable);
|
||||
}
|
||||
#if defined(BLUETOOTH) && defined(DEBUG)
|
||||
#if defined(BLUETOOTH) && defined(USEHORUSBT)
|
||||
if (attr && checkIncDec_Ret) {
|
||||
bluetoothState = BLUETOOTH_STATE_OFF;
|
||||
bluetoothDistantAddr[0] = 0;
|
||||
@@ -823,7 +823,7 @@ void menuModelSetup(event_t event)
|
||||
lcdDrawTextAlignedLeft(y, STR_TRAINER);
|
||||
break;
|
||||
|
||||
#if defined(BLUETOOTH) && defined(DEBUG)
|
||||
#if defined(BLUETOOTH) && defined(USEHORUSBT)
|
||||
case ITEM_MODEL_TRAINER_LINE1:
|
||||
if (g_model.trainerMode == TRAINER_MODE_MASTER_BLUETOOTH) {
|
||||
if (attr) {
|
||||
|
||||
@@ -77,7 +77,7 @@ enum menuRadioHwItems {
|
||||
#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, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#endif
|
||||
|
||||
#if defined(BLUETOOTH) && defined(DEBUG)
|
||||
#if defined(BLUETOOTH) && defined(USEHORUSBT)
|
||||
#define BLUETOOTH_ROWS 0, uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? -1 : 0),
|
||||
#else
|
||||
#define BLUETOOTH_ROWS
|
||||
@@ -198,7 +198,7 @@ void menuRadioHardware(event_t event)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(BLUETOOTH) && defined(DEBUG)
|
||||
#if defined(BLUETOOTH) && defined(USEHORUSBT)
|
||||
case ITEM_RADIO_HARDWARE_BLUETOOTH_MODE:
|
||||
lcdDrawText(INDENT_WIDTH, y, STR_BLUETOOTH);
|
||||
lcdDrawTextAtIndex(HW_SETTINGS_COLUMN, y, STR_BLUETOOTH_MODES, g_eeGeneral.bluetoothMode, attr);
|
||||
|
||||
@@ -565,8 +565,8 @@ bool isTrainerModeAvailable(int mode)
|
||||
{
|
||||
if (IS_EXTERNAL_MODULE_ENABLED() && (mode == TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE || mode == TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE))
|
||||
return false;
|
||||
#if defined(DEBUG)
|
||||
else if (mode == TRAINER_MODE_MASTER_BLUETOOTH || mode == TRAINER_MODE_MASTER_BATTERY_COMPARTMENT)
|
||||
#if defined(USEHORUSBT)
|
||||
else if (mode == TRAINER_MODE_MASTER_BATTERY_COMPARTMENT)
|
||||
#else
|
||||
else if (mode == TRAINER_MODE_MASTER_BLUETOOTH || mode == TRAINER_MODE_MASTER_BATTERY_COMPARTMENT || mode == TRAINER_MODE_SLAVE_BLUETOOTH)
|
||||
#endif
|
||||
@@ -704,7 +704,7 @@ const mm_protocol_definition multi_protocols[] = {
|
||||
{ MM_RF_PROTO_WK_2X01, 5, STR_SUBTYPE_WK2x01, nullptr },
|
||||
{ MM_RF_PROTO_Q303, 3, STR_SUBTYPE_Q303, nullptr },
|
||||
{ MM_RF_CUSTOM_SELECTED, 7, NO_SUBTYPE, STR_MULTI_OPTION },
|
||||
|
||||
|
||||
// Sentinel and default for protocols not listed above (MM_RF_CUSTOM is 0xff)
|
||||
{ 0xfe, 0, NO_SUBTYPE, nullptr }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user