WiP: disable BT trainer discovery until properly fixed
This commit is contained in:
committed by
Raphael Coeffic
parent
c7f2eb7eb7
commit
eb46c0f4c0
@@ -43,10 +43,9 @@ class TrainerModuleWindow : public FormGroup
|
|||||||
void update();
|
void update();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// TrChoice *trainerChoice = nullptr;
|
|
||||||
NumberEdit *channelStart = nullptr;
|
NumberEdit *channelStart = nullptr;
|
||||||
NumberEdit *channelEnd = nullptr;
|
NumberEdit *channelEnd = nullptr;
|
||||||
// bool trChoiceOpen = false;
|
|
||||||
#if defined(BLUETOOTH)
|
#if defined(BLUETOOTH)
|
||||||
StaticText *btChannelEnd = nullptr;
|
StaticText *btChannelEnd = nullptr;
|
||||||
StaticText *btDistAddress = nullptr;
|
StaticText *btDistAddress = nullptr;
|
||||||
@@ -90,7 +89,8 @@ void TrainerModuleWindow::checkEvents()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bluetooth.state != lastbluetoothstate) {
|
if (bluetooth.state != lastbluetoothstate) {
|
||||||
if (!popupopen && !trChoiceOpen) update();
|
// TODO:
|
||||||
|
// if (!popupopen && !trChoiceOpen) update();
|
||||||
lastbluetoothstate = bluetooth.state;
|
lastbluetoothstate = bluetooth.state;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -105,6 +105,7 @@ void TrainerModuleWindow::update()
|
|||||||
if (g_model.isTrainerTraineeEnable()) {
|
if (g_model.isTrainerTraineeEnable()) {
|
||||||
#if defined(BLUETOOTH)
|
#if defined(BLUETOOTH)
|
||||||
if (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH) {
|
if (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH) {
|
||||||
|
|
||||||
btDistAddress = new StaticText(this, grid.getFieldSlot(true), "---", 0,
|
btDistAddress = new StaticText(this, grid.getFieldSlot(true), "---", 0,
|
||||||
COLOR_THEME_PRIMARY1);
|
COLOR_THEME_PRIMARY1);
|
||||||
if (bluetooth.state == BLUETOOTH_STATE_CONNECTED)
|
if (bluetooth.state == BLUETOOTH_STATE_CONNECTED)
|
||||||
@@ -126,10 +127,11 @@ void TrainerModuleWindow::update()
|
|||||||
reusableBuffer.moduleSetup.bt.devicesCount = 0;
|
reusableBuffer.moduleSetup.bt.devicesCount = 0;
|
||||||
devicecount = 0;
|
devicecount = 0;
|
||||||
bluetooth.state = BLUETOOTH_STATE_DISCOVER_REQUESTED;
|
bluetooth.state = BLUETOOTH_STATE_DISCOVER_REQUESTED;
|
||||||
btPopUpMenu = new Menu(parent);
|
// TODO:
|
||||||
btPopUpMenu->setTitle(STR_BT_SELECT_DEVICE);
|
// btPopUpMenu = new Menu(parent);
|
||||||
popupopen = true;
|
// btPopUpMenu->setTitle(STR_BT_SELECT_DEVICE);
|
||||||
btPopUpMenu->setCloseHandler([=]() { popupopen = false; });
|
// popupopen = true;
|
||||||
|
// btPopUpMenu->setCloseHandler([=]() { popupopen = false; });
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user