Compilation fixes
This commit is contained in:
@@ -243,7 +243,7 @@ int getSwitchWarningsCount()
|
||||
#define PORT_CHANNELS_ROWS(x) (x==INTERNAL_MODULE ? INTERNAL_MODULE_CHANNELS_ROWS : (x==EXTERNAL_MODULE ? EXTERNAL_MODULE_CHANNELS_ROWS : 1))
|
||||
|
||||
#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_BLUETOOTH_M_ROWS ((bluetoothDistantAddr[0] == 0 || bluetooth.state == BLUETOOTH_STATE_CONNECTED) ? (uint8_t)0 : (uint8_t)1)
|
||||
#define TRAINER_LINE1_ROWS (g_model.trainerData.mode == TRAINER_MODE_SLAVE ? (uint8_t)1 : (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH ? TRAINER_LINE1_BLUETOOTH_M_ROWS : (g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH ? (uint8_t)1 : HIDDEN_ROW)))
|
||||
#define TRAINER_LINE2_ROWS (g_model.trainerData.mode == TRAINER_MODE_SLAVE ? (uint8_t)2 : HIDDEN_ROW)
|
||||
#else
|
||||
@@ -717,7 +717,7 @@ void menuModelSetup(event_t event)
|
||||
}
|
||||
#if defined(BLUETOOTH) && defined(USEHORUSBT)
|
||||
if (attr && checkIncDec_Ret) {
|
||||
bluetoothState = BLUETOOTH_STATE_OFF;
|
||||
bluetooth.state = BLUETOOTH_STATE_OFF;
|
||||
bluetoothDistantAddr[0] = 0;
|
||||
}
|
||||
#endif
|
||||
@@ -842,7 +842,7 @@ void menuModelSetup(event_t event)
|
||||
}
|
||||
if (bluetoothDistantAddr[0]) {
|
||||
lcdDrawText(INDENT_WIDTH, y+1, bluetoothDistantAddr, TINSIZE);
|
||||
if (bluetoothState != BLUETOOTH_STATE_CONNECTED) {
|
||||
if (bluetooth.state != BLUETOOTH_STATE_CONNECTED) {
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, BUTTON("Bind"), menuHorizontalPosition == 0 ? attr : 0);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN+5*FW, y, BUTTON("Clear"), menuHorizontalPosition == 1 ? attr : 0);
|
||||
}
|
||||
@@ -850,26 +850,26 @@ void menuModelSetup(event_t event)
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, BUTTON("Clear"), attr);
|
||||
}
|
||||
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
|
||||
if (bluetoothState == BLUETOOTH_STATE_CONNECTED || menuHorizontalPosition == 1) {
|
||||
bluetoothState = BLUETOOTH_STATE_OFF;
|
||||
if (bluetooth.state == BLUETOOTH_STATE_CONNECTED || menuHorizontalPosition == 1) {
|
||||
bluetooth.state = BLUETOOTH_STATE_OFF;
|
||||
bluetoothDistantAddr[0] = 0;
|
||||
}
|
||||
else {
|
||||
bluetoothState = BLUETOOTH_STATE_BIND_REQUESTED;
|
||||
bluetooth.state = BLUETOOTH_STATE_BIND_REQUESTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
lcdDrawText(INDENT_WIDTH, y, "---");
|
||||
if (bluetoothState < BLUETOOTH_STATE_IDLE)
|
||||
if (bluetooth.state < BLUETOOTH_STATE_IDLE)
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, BUTTON("Init"), attr);
|
||||
else
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, BUTTON("Discover"), attr);
|
||||
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
|
||||
if (bluetoothState < BLUETOOTH_STATE_IDLE)
|
||||
bluetoothState = BLUETOOTH_STATE_OFF;
|
||||
if (bluetooth.state < BLUETOOTH_STATE_IDLE)
|
||||
bluetooth.state = BLUETOOTH_STATE_OFF;
|
||||
else
|
||||
bluetoothState = BLUETOOTH_STATE_DISCOVER_REQUESTED;
|
||||
bluetooth.state = BLUETOOTH_STATE_DISCOVER_REQUESTED;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user