diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 7c84201941..b37f72c58e 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -88,7 +88,9 @@ class HomeScreen : public UIScreen { FIRST, RECENT, RADIO, +#ifndef UI_HIDE_BLUETOOTH_PAGE BLUETOOTH, +#endif ADVERT, #if ENV_INCLUDE_GPS == 1 GPS, @@ -278,6 +280,7 @@ class HomeScreen : public UIScreen { display.setCursor(0, 53); sprintf(tmp, "Noise floor: %d", radio_driver.getNoiseFloor()); display.print(tmp); +#ifndef UI_HIDE_BLUETOOTH_PAGE } else if (_page == HomePage::BLUETOOTH) { display.setColor(DisplayDriver::GREEN); display.drawXbm((display.width() - 32) / 2, 18, @@ -285,6 +288,7 @@ class HomeScreen : public UIScreen { 32, 32); display.setTextSize(1); display.drawTextCentered(display.width() / 2, 64 - 11, "toggle: " PRESS_LABEL); +#endif } else if (_page == HomePage::ADVERT) { display.setColor(DisplayDriver::GREEN); display.drawXbm((display.width() - 32) / 2, 18, advert_icon, 32, 32); @@ -425,6 +429,7 @@ class HomeScreen : public UIScreen { } return true; } +#ifndef UI_HIDE_BLUETOOTH_PAGE if (c == KEY_ENTER && _page == HomePage::BLUETOOTH) { if (_task->isSerialEnabled()) { // toggle Bluetooth on/off _task->disableSerial(); @@ -433,6 +438,7 @@ class HomeScreen : public UIScreen { } return true; } +#endif if (c == KEY_ENTER && _page == HomePage::ADVERT) { _task->notify(UIEventType::ack); if (the_mesh.advert()) { diff --git a/variants/thinknode_m6/platformio.ini b/variants/thinknode_m6/platformio.ini index 6fe9043668..54e82092ed 100644 --- a/variants/thinknode_m6/platformio.ini +++ b/variants/thinknode_m6/platformio.ini @@ -85,12 +85,16 @@ build_flags = -D OFFLINE_QUEUE_SIZE=256 -D AUTO_SHUTDOWN_MILLIVOLTS=3300 -D QSPIFLASH=1 + -D DISPLAY_CLASS=NullDisplayDriver + -D PIN_STATUS_LED=PIN_LED_RED + -D UI_HIDE_BLUETOOTH_PAGE ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${ThinkNode_M6.build_src_filter} + + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> lib_deps = ${ThinkNode_M6.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -109,10 +113,14 @@ build_flags = -D QSPIFLASH=1 -D OFFLINE_QUEUE_SIZE=256 -D AUTO_SHUTDOWN_MILLIVOLTS=3300 + -D DISPLAY_CLASS=NullDisplayDriver + -D PIN_STATUS_LED=PIN_LED_RED + -D UI_HIDE_BLUETOOTH_PAGE build_src_filter = ${ThinkNode_M6.build_src_filter} + + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> lib_deps = ${ThinkNode_M6.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/thinknode_m6/target.h b/variants/thinknode_m6/target.h index 76188e584e..07ff322947 100644 --- a/variants/thinknode_m6/target.h +++ b/variants/thinknode_m6/target.h @@ -10,7 +10,9 @@ #include #include #ifdef DISPLAY_CLASS - #include + // The M6 is screenless; DISPLAY_CLASS=NullDisplayDriver is used only to run + // UITask headless so the status LED (PIN_STATUS_LED) and button work. + #include #include #endif