From eb46c0f4c0b912416e8ab344f65251080213d641 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 22 May 2022 10:14:12 +0200 Subject: [PATCH] WiP: disable BT trainer discovery until properly fixed --- radio/src/gui/colorlcd/trainer_setup.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/radio/src/gui/colorlcd/trainer_setup.cpp b/radio/src/gui/colorlcd/trainer_setup.cpp index 0731a38b5..98cb4ae10 100644 --- a/radio/src/gui/colorlcd/trainer_setup.cpp +++ b/radio/src/gui/colorlcd/trainer_setup.cpp @@ -43,10 +43,9 @@ class TrainerModuleWindow : public FormGroup void update(); protected: - // TrChoice *trainerChoice = nullptr; NumberEdit *channelStart = nullptr; NumberEdit *channelEnd = nullptr; - // bool trChoiceOpen = false; + #if defined(BLUETOOTH) StaticText *btChannelEnd = nullptr; StaticText *btDistAddress = nullptr; @@ -90,7 +89,8 @@ void TrainerModuleWindow::checkEvents() } } if (bluetooth.state != lastbluetoothstate) { - if (!popupopen && !trChoiceOpen) update(); + // TODO: + // if (!popupopen && !trChoiceOpen) update(); lastbluetoothstate = bluetooth.state; } #endif @@ -105,6 +105,7 @@ void TrainerModuleWindow::update() if (g_model.isTrainerTraineeEnable()) { #if defined(BLUETOOTH) if (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH) { + btDistAddress = new StaticText(this, grid.getFieldSlot(true), "---", 0, COLOR_THEME_PRIMARY1); if (bluetooth.state == BLUETOOTH_STATE_CONNECTED) @@ -126,10 +127,11 @@ void TrainerModuleWindow::update() reusableBuffer.moduleSetup.bt.devicesCount = 0; devicecount = 0; bluetooth.state = BLUETOOTH_STATE_DISCOVER_REQUESTED; - btPopUpMenu = new Menu(parent); - btPopUpMenu->setTitle(STR_BT_SELECT_DEVICE); - popupopen = true; - btPopUpMenu->setCloseHandler([=]() { popupopen = false; }); + // TODO: + // btPopUpMenu = new Menu(parent); + // btPopUpMenu->setTitle(STR_BT_SELECT_DEVICE); + // popupopen = true; + // btPopUpMenu->setCloseHandler([=]() { popupopen = false; }); } return 0; });