From b9c328a88202ad29af547f68368b8d73caa8d9a0 Mon Sep 17 00:00:00 2001 From: amdoolittle Date: Fri, 16 Oct 2026 10:04:44 -0700 Subject: [PATCH 1/2] Remove BLE screen when BLE not available --- examples/companion_radio/ui-new/UITask.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index bc25de79c..60106d1c9 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -91,7 +91,9 @@ class HomeScreen : public UIScreen { FIRST, RECENT, RADIO, +#ifdef BLE_PIN_CODE BLUETOOTH, +# endif ADVERT, #if ENV_INCLUDE_GPS == 1 GPS, @@ -372,6 +374,7 @@ public: display.setCursor(0, 53); sprintf(tmp, "Noise floor: %d", radio_driver.getNoiseFloor()); display.print(tmp); +#ifdef BLE_PIN_CODE } else if (_page == HomePage::BLUETOOTH) { display.setColor(UIColor::corp_blue); display.drawXbm((display.width() - 32) / 2, 18, @@ -380,6 +383,7 @@ public: display.setColor(UIColor::secondary_txt); display.setTextSize(1); display.drawTextCentered(display.width() / 2, 64 - 11, "toggle: " PRESS_LABEL); +#endif } else if (_page == HomePage::ADVERT) { display.setColor(UIColor::corp_blue); display.drawXbm((display.width() - 32) / 2, 18, advert_icon, 32, 32); @@ -575,6 +579,7 @@ public: #endif return true; } +#ifdef BLE_PIN_CODE if (c == KEY_ENTER && _page == HomePage::BLUETOOTH) { if (_task->isBluetoothEnabled()) { // toggle Bluetooth on/off _task->disableBluetooth(); @@ -583,6 +588,7 @@ public: } return true; } +#endif if (c == KEY_ENTER && _page == HomePage::ADVERT) { _task->notify(UIEventType::ack); if (the_mesh.advert()) { From 6e1f474f7dedc144cab2a094cdf4798bab5c371e Mon Sep 17 00:00:00 2001 From: amdoolittle Date: Fri, 16 Oct 2026 17:30:19 -0700 Subject: [PATCH 2/2] Update UITask.cpp Housekeeping: removed unnecessary space --- examples/companion_radio/ui-new/UITask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 60106d1c9..6e38c1fbe 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -93,7 +93,7 @@ class HomeScreen : public UIScreen { RADIO, #ifdef BLE_PIN_CODE BLUETOOTH, -# endif +#endif ADVERT, #if ENV_INCLUDE_GPS == 1 GPS,