From 0b38bfd81a727f066f62a44f3812a8fa6c0d594a Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Wed, 18 Nov 2026 18:18:06 +1100 Subject: [PATCH 01/12] * refactored UITask from repeater/room/sensor to /helpers/ui/server * added BaseUITask for common behaviours * ui_task now instantiated in one of the variant's target-*.cpp modules --- examples/simple_repeater/MyMesh.h | 4 +- examples/simple_repeater/UITask.h | 22 --- examples/simple_repeater/main.cpp | 7 +- examples/simple_room_server/MyMesh.h | 4 +- examples/simple_room_server/UITask.cpp | 125 ------------------ examples/simple_room_server/UITask.h | 19 --- examples/simple_room_server/main.cpp | 7 +- examples/simple_sensor/SensorMesh.h | 4 +- examples/simple_sensor/UITask.cpp | 125 ------------------ examples/simple_sensor/UITask.h | 19 --- examples/simple_sensor/main.cpp | 7 +- src/helpers/ui/BaseUITask.cpp | 17 +++ src/helpers/ui/BaseUITask.h | 19 +++ .../helpers/ui/server}/UITask.cpp | 25 ++-- src/helpers/ui/server/UITask.h | 23 ++++ variants/heltec_v3/platformio.ini | 28 +++- variants/heltec_v3/target-companion.cpp | 9 ++ variants/heltec_v3/target-other.cpp | 9 ++ variants/heltec_v3/target.cpp | 5 - variants/heltec_v3/target.h | 2 + 20 files changed, 117 insertions(+), 363 deletions(-) delete mode 100644 examples/simple_repeater/UITask.h delete mode 100644 examples/simple_room_server/UITask.cpp delete mode 100644 examples/simple_room_server/UITask.h delete mode 100644 examples/simple_sensor/UITask.cpp delete mode 100644 examples/simple_sensor/UITask.h create mode 100644 src/helpers/ui/BaseUITask.cpp create mode 100644 src/helpers/ui/BaseUITask.h rename {examples/simple_repeater => src/helpers/ui/server}/UITask.cpp (91%) create mode 100644 src/helpers/ui/server/UITask.h create mode 100644 variants/heltec_v3/target-companion.cpp create mode 100644 variants/heltec_v3/target-other.cpp diff --git a/examples/simple_repeater/MyMesh.h b/examples/simple_repeater/MyMesh.h index 7e4cfd4f..dcaa71db 100644 --- a/examples/simple_repeater/MyMesh.h +++ b/examples/simple_repeater/MyMesh.h @@ -74,8 +74,6 @@ struct NeighbourInfo { #define FIRMWARE_VERSION "v1.18.0" #endif -#define FIRMWARE_ROLE "repeater" - #define PACKET_LOG_FILE "/packet_log" class MyMesh : public mesh::Mesh, public CommonCLICallbacks { @@ -189,7 +187,7 @@ public: void sendNodeDiscoverReq(); const char* getFirmwareVer() override { return FIRMWARE_VERSION; } const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; } - const char* getRole() override { return FIRMWARE_ROLE; } + const char* getRole() override { return "repeater"; } const char* getNodeName() { return _prefs.node_name; } NodePrefs* getNodePrefs() { return &_prefs; diff --git a/examples/simple_repeater/UITask.h b/examples/simple_repeater/UITask.h deleted file mode 100644 index d8e3ce1d..00000000 --- a/examples/simple_repeater/UITask.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include -#include - -class UITask { - mesh::MainBoard* _board; - DisplayDriver* _display; - unsigned long _next_read, _next_refresh, _auto_off; - int _prevBtnState; - NodePrefs* _node_prefs; - char _version_info[32]; - unsigned long _powering_off_at = 0; - unsigned long _started_at = 0; - - void renderCurrScreen(); -public: - UITask(mesh::MainBoard& board, DisplayDriver& display) : _board(&board), _display(&display) { _next_read = _next_refresh = 0; } - void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version); - - void loop(); -}; \ No newline at end of file diff --git a/examples/simple_repeater/main.cpp b/examples/simple_repeater/main.cpp index d475b13d..cb1a7d69 100644 --- a/examples/simple_repeater/main.cpp +++ b/examples/simple_repeater/main.cpp @@ -3,11 +3,6 @@ #include "MyMesh.h" -#ifdef DISPLAY_CLASS - #include "UITask.h" - static UITask ui_task(board, display); -#endif - #ifdef ETHERNET_ENABLED #define ETHERNET_CLI_BANNER "MeshCore Repeater CLI" #include @@ -107,7 +102,7 @@ void setup() { the_mesh.begin(fs); #ifdef DISPLAY_CLASS - ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION); + ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION, "< Repeater >"); #endif #ifdef ETHERNET_ENABLED diff --git a/examples/simple_room_server/MyMesh.h b/examples/simple_room_server/MyMesh.h index 507b42b1..1a81340a 100644 --- a/examples/simple_room_server/MyMesh.h +++ b/examples/simple_room_server/MyMesh.h @@ -77,8 +77,6 @@ #define TXT_ACK_DELAY 200 #endif -#define FIRMWARE_ROLE "room_server" - #define PACKET_LOG_FILE "/packet_log" #define MAX_POST_TEXT_LEN (160-9) @@ -189,7 +187,7 @@ public: const char* getFirmwareVer() override { return FIRMWARE_VERSION; } const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; } - const char* getRole() override { return FIRMWARE_ROLE; } + const char* getRole() override { return "room_server"; } const char* getNodeName() { return _prefs.node_name; } NodePrefs* getNodePrefs() { return &_prefs; diff --git a/examples/simple_room_server/UITask.cpp b/examples/simple_room_server/UITask.cpp deleted file mode 100644 index 8e4c2fcf..00000000 --- a/examples/simple_room_server/UITask.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#include "UITask.h" -#include -#include - -#ifndef USER_BTN_PRESSED -#define USER_BTN_PRESSED LOW -#endif - -#define AUTO_OFF_MILLIS 20000 // 20 seconds -#define BOOT_SCREEN_MILLIS 4000 // 4 seconds - -// 'meshcore', 128x13px -static const uint8_t meshcore_logo [] PROGMEM = { - 0x3c, 0x01, 0xe3, 0xff, 0xc7, 0xff, 0x8f, 0x03, 0x87, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, - 0x3c, 0x03, 0xe3, 0xff, 0xc7, 0xff, 0x8e, 0x03, 0x8f, 0xfe, 0x3f, 0xfe, 0x1f, 0xff, 0x1f, 0xfe, - 0x3e, 0x03, 0xc3, 0xff, 0x8f, 0xff, 0x0e, 0x07, 0x8f, 0xfe, 0x7f, 0xfe, 0x1f, 0xff, 0x1f, 0xfc, - 0x3e, 0x07, 0xc7, 0x80, 0x0e, 0x00, 0x0e, 0x07, 0x9e, 0x00, 0x78, 0x0e, 0x3c, 0x0f, 0x1c, 0x00, - 0x3e, 0x0f, 0xc7, 0x80, 0x1e, 0x00, 0x0e, 0x07, 0x1e, 0x00, 0x70, 0x0e, 0x38, 0x0f, 0x3c, 0x00, - 0x7f, 0x0f, 0xc7, 0xfe, 0x1f, 0xfc, 0x1f, 0xff, 0x1c, 0x00, 0x70, 0x0e, 0x38, 0x0e, 0x3f, 0xf8, - 0x7f, 0x1f, 0xc7, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1c, 0x00, 0xf0, 0x0e, 0x38, 0x0e, 0x3f, 0xf8, - 0x7f, 0x3f, 0xc7, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1c, 0x00, 0xf0, 0x1e, 0x3f, 0xfe, 0x3f, 0xf0, - 0x77, 0x3b, 0x87, 0x00, 0x00, 0x07, 0x1c, 0x0f, 0x3c, 0x00, 0xe0, 0x1c, 0x7f, 0xfc, 0x38, 0x00, - 0x77, 0xfb, 0x8f, 0x00, 0x00, 0x07, 0x1c, 0x0f, 0x3c, 0x00, 0xe0, 0x1c, 0x7f, 0xf8, 0x38, 0x00, - 0x73, 0xf3, 0x8f, 0xff, 0x0f, 0xff, 0x1c, 0x0e, 0x3f, 0xf8, 0xff, 0xfc, 0x70, 0x78, 0x7f, 0xf8, - 0xe3, 0xe3, 0x8f, 0xff, 0x1f, 0xfe, 0x3c, 0x0e, 0x3f, 0xf8, 0xff, 0xfc, 0x70, 0x3c, 0x7f, 0xf8, - 0xe3, 0xe3, 0x8f, 0xff, 0x1f, 0xfc, 0x3c, 0x0e, 0x1f, 0xf8, 0xff, 0xf8, 0x70, 0x3c, 0x7f, 0xf8, -}; - -void UITask::begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version) { - _prevBtnState = HIGH; - _auto_off = millis() + AUTO_OFF_MILLIS; - _node_prefs = node_prefs; - _display->turnOn(); - - // strip off dash and commit hash by changing dash to null terminator - // e.g: v1.2.3-abcdef -> v1.2.3 - char *version = strdup(firmware_version); - char *dash = strchr(version, '-'); - if(dash){ - *dash = 0; - } - - // v1.2.3 (1 Jan 2025) - snprintf(_version_info, sizeof(_version_info), "%s (%s)", version, build_date); - free(version); -} - -void UITask::renderCurrScreen() { - char tmp[80]; - if (millis() < BOOT_SCREEN_MILLIS) { // boot screen - // meshcore logo - _display->setColor(UIColor::corp_blue); - int logoWidth = 128; - _display->drawXbm((_display->width() - logoWidth) / 2, 3, meshcore_logo, logoWidth, 13); - - // meshcore website - const char* website = "https://meshcore.io"; - _display->setColor(UIColor::primary_txt); - _display->setTextSize(1); - uint16_t websiteWidth = _display->getTextWidth(website); - _display->setCursor((_display->width() - websiteWidth) / 2, 22); - _display->print(website); - - // version info - _display->setTextSize(1); - uint16_t versionWidth = _display->getTextWidth(_version_info); - _display->setCursor((_display->width() - versionWidth) / 2, 35); - _display->print(_version_info); - - // node type - const char* node_type = "< Room Server >"; - uint16_t typeWidth = _display->getTextWidth(node_type); - _display->setCursor((_display->width() - typeWidth) / 2, 48); - _display->print(node_type); - } else { // home screen - // node name - _display->setCursor(0, 0); - _display->setTextSize(1); - _display->setColor(UIColor::primary_txt); - _display->print(_node_prefs->node_name); - - // freq / sf - _display->setCursor(0, 20); - sprintf(tmp, "FREQ: %06.3f SF%d", _node_prefs->freq, _node_prefs->sf); - _display->print(tmp); - - // bw / cr - _display->setCursor(0, 30); - sprintf(tmp, "BW: %03.2f CR: %d", _node_prefs->bw, _node_prefs->cr); - _display->print(tmp); - } -} - -void UITask::loop() { -#ifdef PIN_USER_BTN - if (millis() >= _next_read) { - int btnState = digitalRead(PIN_USER_BTN); - if (btnState != _prevBtnState) { - if (btnState == USER_BTN_PRESSED) { // pressed? - if (_display->isOn()) { - // TODO: any action ? - } else { - _display->turnOn(); - } - _auto_off = millis() + AUTO_OFF_MILLIS; // extend auto-off timer - } - _prevBtnState = btnState; - } - _next_read = millis() + 200; // 5 reads per second - } -#endif - - if (_display->isOn()) { - if (millis() >= _next_refresh) { - _display->startFrame(); - renderCurrScreen(); - _display->endFrame(); - - _next_refresh = millis() + 1000; // refresh every second - } - if (millis() > _auto_off) { - _display->turnOff(); - } - } -} diff --git a/examples/simple_room_server/UITask.h b/examples/simple_room_server/UITask.h deleted file mode 100644 index a27259f1..00000000 --- a/examples/simple_room_server/UITask.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include -#include - -class UITask { - DisplayDriver* _display; - unsigned long _next_read, _next_refresh, _auto_off; - int _prevBtnState; - NodePrefs* _node_prefs; - char _version_info[32]; - - void renderCurrScreen(); -public: - UITask(DisplayDriver& display) : _display(&display) { _next_read = _next_refresh = 0; } - void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version); - - void loop(); -}; \ No newline at end of file diff --git a/examples/simple_room_server/main.cpp b/examples/simple_room_server/main.cpp index 4bfad4e5..dad05bba 100644 --- a/examples/simple_room_server/main.cpp +++ b/examples/simple_room_server/main.cpp @@ -8,11 +8,6 @@ #include #endif -#ifdef DISPLAY_CLASS - #include "UITask.h" - static UITask ui_task(display); -#endif - StdRNG fast_rng; SimpleMeshTables tables; MyMesh the_mesh(board, radio_driver, *new ArduinoMillis(), fast_rng, rtc_clock, tables); @@ -88,7 +83,7 @@ void setup() { the_mesh.begin(fs); #ifdef DISPLAY_CLASS - ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION); + ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION, "< Room Server >"); #endif #ifdef ETHERNET_ENABLED diff --git a/examples/simple_sensor/SensorMesh.h b/examples/simple_sensor/SensorMesh.h index e6746d47..2dc610cc 100644 --- a/examples/simple_sensor/SensorMesh.h +++ b/examples/simple_sensor/SensorMesh.h @@ -41,8 +41,6 @@ #define FIRMWARE_VERSION "v1.18.0" #endif -#define FIRMWARE_ROLE "sensor" - #define MAX_SEARCH_RESULTS 24 #define MAX_CONCURRENT_ALERTS 4 @@ -56,7 +54,7 @@ public: // CommonCLI callbacks const char* getFirmwareVer() override { return FIRMWARE_VERSION; } const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; } - const char* getRole() override { return FIRMWARE_ROLE; } + const char* getRole() override { return "sensor"; } const char* getNodeName() { return _prefs.node_name; } NodePrefs* getNodePrefs() { return &_prefs; } void savePrefs() override { _cli.savePrefs(_fs); } diff --git a/examples/simple_sensor/UITask.cpp b/examples/simple_sensor/UITask.cpp deleted file mode 100644 index 75a0b465..00000000 --- a/examples/simple_sensor/UITask.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#include "UITask.h" -#include -#include - -#ifndef USER_BTN_PRESSED -#define USER_BTN_PRESSED LOW -#endif - -#define AUTO_OFF_MILLIS 20000 // 20 seconds -#define BOOT_SCREEN_MILLIS 4000 // 4 seconds - -// 'meshcore', 128x13px -static const uint8_t meshcore_logo [] PROGMEM = { - 0x3c, 0x01, 0xe3, 0xff, 0xc7, 0xff, 0x8f, 0x03, 0x87, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, - 0x3c, 0x03, 0xe3, 0xff, 0xc7, 0xff, 0x8e, 0x03, 0x8f, 0xfe, 0x3f, 0xfe, 0x1f, 0xff, 0x1f, 0xfe, - 0x3e, 0x03, 0xc3, 0xff, 0x8f, 0xff, 0x0e, 0x07, 0x8f, 0xfe, 0x7f, 0xfe, 0x1f, 0xff, 0x1f, 0xfc, - 0x3e, 0x07, 0xc7, 0x80, 0x0e, 0x00, 0x0e, 0x07, 0x9e, 0x00, 0x78, 0x0e, 0x3c, 0x0f, 0x1c, 0x00, - 0x3e, 0x0f, 0xc7, 0x80, 0x1e, 0x00, 0x0e, 0x07, 0x1e, 0x00, 0x70, 0x0e, 0x38, 0x0f, 0x3c, 0x00, - 0x7f, 0x0f, 0xc7, 0xfe, 0x1f, 0xfc, 0x1f, 0xff, 0x1c, 0x00, 0x70, 0x0e, 0x38, 0x0e, 0x3f, 0xf8, - 0x7f, 0x1f, 0xc7, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1c, 0x00, 0xf0, 0x0e, 0x38, 0x0e, 0x3f, 0xf8, - 0x7f, 0x3f, 0xc7, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1c, 0x00, 0xf0, 0x1e, 0x3f, 0xfe, 0x3f, 0xf0, - 0x77, 0x3b, 0x87, 0x00, 0x00, 0x07, 0x1c, 0x0f, 0x3c, 0x00, 0xe0, 0x1c, 0x7f, 0xfc, 0x38, 0x00, - 0x77, 0xfb, 0x8f, 0x00, 0x00, 0x07, 0x1c, 0x0f, 0x3c, 0x00, 0xe0, 0x1c, 0x7f, 0xf8, 0x38, 0x00, - 0x73, 0xf3, 0x8f, 0xff, 0x0f, 0xff, 0x1c, 0x0e, 0x3f, 0xf8, 0xff, 0xfc, 0x70, 0x78, 0x7f, 0xf8, - 0xe3, 0xe3, 0x8f, 0xff, 0x1f, 0xfe, 0x3c, 0x0e, 0x3f, 0xf8, 0xff, 0xfc, 0x70, 0x3c, 0x7f, 0xf8, - 0xe3, 0xe3, 0x8f, 0xff, 0x1f, 0xfc, 0x3c, 0x0e, 0x1f, 0xf8, 0xff, 0xf8, 0x70, 0x3c, 0x7f, 0xf8, -}; - -void UITask::begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version) { - _prevBtnState = HIGH; - _auto_off = millis() + AUTO_OFF_MILLIS; - _node_prefs = node_prefs; - _display->turnOn(); - - // strip off dash and commit hash by changing dash to null terminator - // e.g: v1.2.3-abcdef -> v1.2.3 - char *version = strdup(firmware_version); - char *dash = strchr(version, '-'); - if(dash){ - *dash = 0; - } - - // v1.2.3 (1 Jan 2025) - snprintf(_version_info, sizeof(_version_info), "%s (%s)", version, build_date); - free(version); -} - -void UITask::renderCurrScreen() { - char tmp[80]; - if (millis() < BOOT_SCREEN_MILLIS) { // boot screen - // meshcore logo - _display->setColor(UIColor::corp_blue); - int logoWidth = 128; - _display->drawXbm((_display->width() - logoWidth) / 2, 3, meshcore_logo, logoWidth, 13); - - // meshcore website - const char* website = "https://meshcore.io"; - _display->setColor(UIColor::primary_txt); - _display->setTextSize(1); - uint16_t websiteWidth = _display->getTextWidth(website); - _display->setCursor((_display->width() - websiteWidth) / 2, 22); - _display->print(website); - - // version info - _display->setTextSize(1); - uint16_t versionWidth = _display->getTextWidth(_version_info); - _display->setCursor((_display->width() - versionWidth) / 2, 35); - _display->print(_version_info); - - // node type - const char* node_type = "< Sensor >"; - uint16_t typeWidth = _display->getTextWidth(node_type); - _display->setCursor((_display->width() - typeWidth) / 2, 48); - _display->print(node_type); - } else { // home screen - // node name - _display->setCursor(0, 0); - _display->setTextSize(1); - _display->setColor(UIColor::primary_txt); - _display->print(_node_prefs->node_name); - - // freq / sf - _display->setCursor(0, 20); - sprintf(tmp, "FREQ: %06.3f SF%d", _node_prefs->freq, _node_prefs->sf); - _display->print(tmp); - - // bw / cr - _display->setCursor(0, 30); - sprintf(tmp, "BW: %03.2f CR: %d", _node_prefs->bw, _node_prefs->cr); - _display->print(tmp); - } -} - -void UITask::loop() { -#ifdef PIN_USER_BTN - if (millis() >= _next_read) { - int btnState = digitalRead(PIN_USER_BTN); - if (btnState != _prevBtnState) { - if (btnState == USER_BTN_PRESSED) { // pressed? - if (_display->isOn()) { - // TODO: any action ? - } else { - _display->turnOn(); - } - _auto_off = millis() + AUTO_OFF_MILLIS; // extend auto-off timer - } - _prevBtnState = btnState; - } - _next_read = millis() + 200; // 5 reads per second - } -#endif - - if (_display->isOn()) { - if (millis() >= _next_refresh) { - _display->startFrame(); - renderCurrScreen(); - _display->endFrame(); - - _next_refresh = millis() + 1000; // refresh every second - } - if (millis() > _auto_off) { - _display->turnOff(); - } - } -} diff --git a/examples/simple_sensor/UITask.h b/examples/simple_sensor/UITask.h deleted file mode 100644 index a27259f1..00000000 --- a/examples/simple_sensor/UITask.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include -#include - -class UITask { - DisplayDriver* _display; - unsigned long _next_read, _next_refresh, _auto_off; - int _prevBtnState; - NodePrefs* _node_prefs; - char _version_info[32]; - - void renderCurrScreen(); -public: - UITask(DisplayDriver& display) : _display(&display) { _next_read = _next_refresh = 0; } - void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version); - - void loop(); -}; \ No newline at end of file diff --git a/examples/simple_sensor/main.cpp b/examples/simple_sensor/main.cpp index 66991daa..5a99dcbf 100644 --- a/examples/simple_sensor/main.cpp +++ b/examples/simple_sensor/main.cpp @@ -1,10 +1,5 @@ #include "SensorMesh.h" -#ifdef DISPLAY_CLASS - #include "UITask.h" - static UITask ui_task(display); -#endif - class MyMesh : public SensorMesh { public: MyMesh(mesh::MainBoard& board, mesh::Radio& radio, mesh::MillisecondClock& ms, mesh::RNG& rng, mesh::RTCClock& rtc, mesh::MeshTables& tables) @@ -111,7 +106,7 @@ void setup() { the_mesh.begin(fs); #ifdef DISPLAY_CLASS - ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION); + ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION, "< Sensor >"); #endif // send out initial zero hop Advertisement to the mesh diff --git a/src/helpers/ui/BaseUITask.cpp b/src/helpers/ui/BaseUITask.cpp new file mode 100644 index 00000000..4df2d37b --- /dev/null +++ b/src/helpers/ui/BaseUITask.cpp @@ -0,0 +1,17 @@ +#include "BaseUITask.h" +#include + +void BaseUITask::loop() { + if (_display->isOn()) { + if (millis() >= _next_refresh) { + _display->startFrame(); + long interval = renderCurrScreen(); + _display->endFrame(); + + _next_refresh = millis() + interval; + } + if (millis() > _auto_off) { + _display->turnOff(); + } + } +} \ No newline at end of file diff --git a/src/helpers/ui/BaseUITask.h b/src/helpers/ui/BaseUITask.h new file mode 100644 index 00000000..433e8ba5 --- /dev/null +++ b/src/helpers/ui/BaseUITask.h @@ -0,0 +1,19 @@ +#pragma once + +#include +#include +// #include + +class BaseUITask { +protected: + mesh::MainBoard* _board; + DisplayDriver* _display; + unsigned long _next_refresh, _auto_off; + + BaseUITask(mesh::MainBoard* board, DisplayDriver* display) : _board(board), _display(display) { _next_refresh = 0; } + + virtual long renderCurrScreen() = 0; + +public: + virtual void loop(); +}; diff --git a/examples/simple_repeater/UITask.cpp b/src/helpers/ui/server/UITask.cpp similarity index 91% rename from examples/simple_repeater/UITask.cpp rename to src/helpers/ui/server/UITask.cpp index e0b6a41d..b6a08270 100644 --- a/examples/simple_repeater/UITask.cpp +++ b/src/helpers/ui/server/UITask.cpp @@ -29,7 +29,7 @@ static const uint8_t meshcore_logo [] PROGMEM = { 0xe3, 0xe3, 0x8f, 0xff, 0x1f, 0xfc, 0x3c, 0x0e, 0x1f, 0xf8, 0xff, 0xf8, 0x70, 0x3c, 0x7f, 0xf8, }; -void UITask::begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version) { +void UITask::begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version, const char* role_lbl) { _prevBtnState = HIGH; _auto_off = millis() + AUTO_OFF_MILLIS; _started_at = millis(); @@ -44,16 +44,18 @@ void UITask::begin(NodePrefs* node_prefs, const char* build_date, const char* fi // e.g: v1.2.3-abcdef -> v1.2.3 char *version = strdup(firmware_version); char *dash = strchr(version, '-'); - if(dash){ + if (dash){ *dash = 0; } // v1.2.3 (1 Jan 2025) snprintf(_version_info, sizeof(_version_info), "%s (%s)", version, build_date); free(version); + + _role_label = role_lbl; } -void UITask::renderCurrScreen() { +long UITask::renderCurrScreen() { char tmp[80]; if (millis() < _started_at + BOOT_SCREEN_MILLIS) { // boot screen // meshcore logo @@ -72,8 +74,7 @@ void UITask::renderCurrScreen() { _display->drawTextCentered(_display->width() / 2, 35, _version_info); // node type - const char* node_type = "< Repeater >"; - _display->drawTextCentered(_display->width() / 2, 48, node_type); + _display->drawTextCentered(_display->width() / 2, 48, _role_label); } else if (_powering_off_at > 0) { // meshcore logo _display->setColor(UIColor::corp_blue); @@ -107,6 +108,7 @@ void UITask::renderCurrScreen() { sprintf(tmp, "BW: %03.2f CR: %d", _node_prefs->bw, _node_prefs->cr); _display->print(tmp); } + return 1000; // 1 sec interval } void UITask::loop() { @@ -126,18 +128,7 @@ void UITask::loop() { } #endif - if (_display->isOn()) { - if (millis() >= _next_refresh) { - _display->startFrame(); - renderCurrScreen(); - _display->endFrame(); - - _next_refresh = millis() + 1000; // refresh every second - } - if (millis() > _auto_off) { - _display->turnOff(); - } - } + BaseUITask::loop(); if (_powering_off_at > 0) { // power off timer armed #if defined(LED_PIN) && defined(LED_STATE_ON) diff --git a/src/helpers/ui/server/UITask.h b/src/helpers/ui/server/UITask.h new file mode 100644 index 00000000..57e649ac --- /dev/null +++ b/src/helpers/ui/server/UITask.h @@ -0,0 +1,23 @@ +#pragma once + +#include +#include + +class UITask : public BaseUITask { + unsigned long _next_read; + int _prevBtnState; + NodePrefs* _node_prefs; + char _version_info[32]; + const char* _role_label; + unsigned long _powering_off_at = 0; + unsigned long _started_at = 0; + +protected: + long renderCurrScreen() override; + +public: + UITask(mesh::MainBoard& board, DisplayDriver& display) : BaseUITask(&board, &display) { _next_read = 0; } + void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version, const char* role_lbl); + + void loop() override; +}; diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index 06c02856..a5978c3e 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -31,7 +31,8 @@ build_flags = -D PIN_GPS_TX=48 -D PIN_GPS_EN=26 build_src_filter = ${esp32_base.build_src_filter} - +<../variants/heltec_v3> + +<../variants/heltec_v3/target.cpp> + + + lib_deps = ${esp32_base.lib_deps} @@ -41,6 +42,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec Repeater"' -D ADVERT_LAT=0.0 @@ -51,7 +53,9 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + +<../examples/simple_repeater> + +<../variants/heltec_v3/target-other.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -76,7 +80,9 @@ build_flags = build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + + +<../examples/simple_repeater> + +<../variants/heltec_v3/target-other.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -98,7 +104,9 @@ build_flags = build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + + +<../examples/simple_repeater> + +<../variants/heltec_v3/target-other.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -107,6 +115,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec Room"' -D ADVERT_LAT=0.0 @@ -117,7 +126,9 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + +<../examples/simple_room_server> + +<../variants/heltec_v3/target-other.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -140,7 +151,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} - -I examples/companion_radio/ui-new +; -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -150,8 +161,10 @@ build_flags = build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + + +<../examples/companion_radio/*.cpp> +<../examples/companion_radio/ui-new/*.cpp> + +<../variants/heltec_v3/target-companion.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -160,7 +173,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} - -I examples/companion_radio/ui-new +; -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -174,10 +187,12 @@ build_flags = build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + + + + +<../examples/companion_radio/*.cpp> +<../examples/companion_radio/ui-new/*.cpp> + +<../variants/heltec_v3/target-companion.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -186,7 +201,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} - -I examples/companion_radio/ui-new +; -I examples/companion_radio/ui-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -200,10 +215,12 @@ build_flags = build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + + + + +<../examples/companion_radio/*.cpp> +<../examples/companion_radio/ui-new/*.cpp> + +<../variants/heltec_v3/target-companion.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -212,6 +229,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec v3 Sensor"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -223,7 +241,9 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + + +<../examples/simple_sensor> + +<../variants/heltec_v3/target-other.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/heltec_v3/target-companion.cpp b/variants/heltec_v3/target-companion.cpp new file mode 100644 index 00000000..571abbb9 --- /dev/null +++ b/variants/heltec_v3/target-companion.cpp @@ -0,0 +1,9 @@ +#include +#include "target.h" + +#ifdef DISPLAY_CLASS + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + + // TODO: UITask +#endif diff --git a/variants/heltec_v3/target-other.cpp b/variants/heltec_v3/target-other.cpp new file mode 100644 index 00000000..bccc29b0 --- /dev/null +++ b/variants/heltec_v3/target-other.cpp @@ -0,0 +1,9 @@ +#include +#include "target.h" + +#ifdef DISPLAY_CLASS + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + + UITask ui_task(board, display); +#endif diff --git a/variants/heltec_v3/target.cpp b/variants/heltec_v3/target.cpp index f2f712eb..e2cca868 100644 --- a/variants/heltec_v3/target.cpp +++ b/variants/heltec_v3/target.cpp @@ -24,11 +24,6 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); EnvironmentSensorManager sensors; #endif -#ifdef DISPLAY_CLASS - DISPLAY_CLASS display; - MomentaryButton user_btn(PIN_USER_BTN, 1000, true); -#endif - bool radio_init() { fallback_clock.begin(); rtc_clock.begin(Wire); diff --git a/variants/heltec_v3/target.h b/variants/heltec_v3/target.h index 2944b384..242a51e5 100644 --- a/variants/heltec_v3/target.h +++ b/variants/heltec_v3/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include // needs -I(nclude) path setting #endif extern HeltecV3Board board; @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); From d05ed2122c23611888eaf6e5c5242aaa5beaa357 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Wed, 18 Nov 2026 22:00:04 +1100 Subject: [PATCH 02/12] * companion UI's moved/refactored to src/helpers/ui * only select variants .ini config refactored so far (Heltec V3, MeshTracker V1, LilyGo T-Echo Card) --- examples/companion_radio/DataStore.h | 2 +- examples/companion_radio/MyMesh.cpp | 29 ------- examples/companion_radio/MyMesh.h | 47 +++--------- examples/companion_radio/main.cpp | 7 +- src/helpers/BaseChatMesh.h | 3 + .../helpers/CompanionNodePrefs.h | 0 src/helpers/MeshEventListener.h | 24 ++++++ .../helpers/ui}/AbstractUITask.h | 7 +- .../helpers/ui/companion-new}/UITask.cpp | 75 ++++++++++++++----- .../helpers/ui/companion-new}/UITask.h | 14 +++- .../helpers/ui/companion-new}/icons.h | 0 .../helpers/ui/companion-orig}/Button.cpp | 0 .../helpers/ui/companion-orig}/Button.h | 0 .../helpers/ui/companion-orig}/UITask.cpp | 32 +++++--- .../helpers/ui/companion-orig}/UITask.h | 12 +-- .../ui/companion-tiny}/ScrollingStatusBar.h | 0 .../helpers/ui/companion-tiny}/UITask.cpp | 60 +++++++++++---- .../helpers/ui/companion-tiny}/UITask.h | 14 +++- .../helpers/ui/companion-tiny}/u8g2_icons.h | 0 variants/heltec_v3/platformio.ini | 3 +- variants/heltec_v3/target-companion.cpp | 5 +- variants/lilygo_techo_card/platformio.ini | 25 +++++-- .../lilygo_techo_card/target-companion.cpp | 13 ++++ variants/lilygo_techo_card/target-other.cpp | 10 +++ variants/lilygo_techo_card/target.cpp | 7 -- variants/lilygo_techo_card/target.h | 2 + variants/meshtracker_x1/platformio.ini | 16 ++-- variants/meshtracker_x1/target-companion.cpp | 10 +++ variants/meshtracker_x1/target.cpp | 4 - variants/meshtracker_x1/target.h | 2 + 30 files changed, 260 insertions(+), 163 deletions(-) rename examples/companion_radio/NodePrefs.h => src/helpers/CompanionNodePrefs.h (100%) create mode 100644 src/helpers/MeshEventListener.h rename {examples/companion_radio => src/helpers/ui}/AbstractUITask.h (89%) rename {examples/companion_radio/ui-new => src/helpers/ui/companion-new}/UITask.cpp (95%) rename {examples/companion_radio/ui-new => src/helpers/ui/companion-new}/UITask.h (89%) rename {examples/companion_radio/ui-new => src/helpers/ui/companion-new}/icons.h (100%) rename {examples/companion_radio/ui-orig => src/helpers/ui/companion-orig}/Button.cpp (100%) rename {examples/companion_radio/ui-orig => src/helpers/ui/companion-orig}/Button.h (100%) rename {examples/companion_radio/ui-orig => src/helpers/ui/companion-orig}/UITask.cpp (96%) rename {examples/companion_radio/ui-orig => src/helpers/ui/companion-orig}/UITask.h (88%) rename {examples/companion_radio/ui-tiny => src/helpers/ui/companion-tiny}/ScrollingStatusBar.h (100%) rename {examples/companion_radio/ui-tiny => src/helpers/ui/companion-tiny}/UITask.cpp (93%) rename {examples/companion_radio/ui-tiny => src/helpers/ui/companion-tiny}/UITask.h (87%) rename {examples/companion_radio/ui-tiny => src/helpers/ui/companion-tiny}/u8g2_icons.h (100%) create mode 100644 variants/lilygo_techo_card/target-companion.cpp create mode 100644 variants/lilygo_techo_card/target-other.cpp create mode 100644 variants/meshtracker_x1/target-companion.cpp diff --git a/examples/companion_radio/DataStore.h b/examples/companion_radio/DataStore.h index e0a145ca..b2100fed 100644 --- a/examples/companion_radio/DataStore.h +++ b/examples/companion_radio/DataStore.h @@ -3,7 +3,7 @@ #include #include #include -#include "NodePrefs.h" +#include class DataStoreHost { public: diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index cd6966e8..9dcb9d05 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -392,20 +392,6 @@ void MyMesh::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path if (!is_new) dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY); // only schedule lazy write for contacts that are in contacts[] } -static int sort_by_recent(const void *a, const void *b) { - return ((AdvertPath *) b)->recv_timestamp - ((AdvertPath *) a)->recv_timestamp; -} - -int MyMesh::getRecentlyHeard(AdvertPath dest[], int max_num) { - if (max_num > ADVERT_PATH_TABLE_SIZE) max_num = ADVERT_PATH_TABLE_SIZE; - qsort(advert_paths, ADVERT_PATH_TABLE_SIZE, sizeof(advert_paths[0]), sort_by_recent); - - for (int i = 0; i < max_num; i++) { - dest[i] = advert_paths[i]; - } - return max_num; -} - void MyMesh::onContactPathUpdated(const ContactInfo &contact) { out_frame[0] = PUSH_CODE_PATH_UPDATED; memcpy(&out_frame[1], contact.id.pub_key, PUB_KEY_SIZE); @@ -2625,21 +2611,6 @@ void MyMesh::loop() { } } -bool MyMesh::advert() { - mesh::Packet* pkt; - if (_prefs.advert_loc_policy == ADVERT_LOC_NONE) { - pkt = createSelfAdvert(_prefs.node_name); - } else { - pkt = createSelfAdvert(_prefs.node_name, sensors.node_lat, sensors.node_lon); - } - if (pkt) { - sendZeroHop(pkt); - return true; - } else { - return false; - } -} - // To check if there is pending work bool MyMesh::hasPendingWork() const { return _mgr->getOutboundTotal() > 0 || dirty_contacts_expiry != 0; diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index 846708b5..228f049e 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -23,7 +23,7 @@ #endif #include "DataStore.h" -#include "NodePrefs.h" +#include #include #include @@ -68,6 +68,7 @@ #include #include +#include /* -------------------------------------------------------------------------------------- */ @@ -75,10 +76,6 @@ #define REQ_TYPE_KEEP_ALIVE 0x02 #define REQ_TYPE_GET_TELEMETRY_DATA 0x03 -// Copied from simple_repeater -#define CTL_TYPE_NODE_DISCOVER_REQ 0x80 -#define CTL_TYPE_NODE_DISCOVER_RESP 0x90 - struct AdvertPath { uint8_t pubkey_prefix[7]; uint8_t path_len; @@ -89,30 +86,11 @@ struct AdvertPath { class MyMesh : public BaseChatMesh, public DataStoreHost { public: - class Listener { - public: - virtual void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) = 0; - virtual void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) = 0; - virtual void onQueueSizeChanged(int msgcount) = 0; - virtual void onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path_len, const uint8_t* path) { } - virtual void onControlDataRecv(const mesh::Packet* pkt) { } - virtual void onChannelDataRecv(mesh::Packet *pkt, const mesh::GroupChannel &channel, uint16_t data_type, - const uint8_t *data, size_t data_len) { } - virtual void onACKRecv(uint32_t ack_crc) { } - virtual uint8_t onUnhandledRequest(const ContactInfo &contact, uint32_t sender_timestamp, const uint8_t *data, - uint8_t len, uint8_t *reply) { return 0; /* unknown request type */ } - virtual bool onUnhandledResponse(const ContactInfo &from, uint32_t tag, const uint8_t* data, uint8_t len) { return false; /* not handled */ } - virtual void onTraceRecv(mesh::Packet *pkt, uint32_t tag, uint32_t auth_code, uint8_t flags, - const uint8_t *path_snrs, const uint8_t *path_hashes, uint8_t path_len) { } - virtual void onRawDataRecv(mesh::Packet *pkt) { } - virtual ~Listener() { } - }; - MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMeshTables &tables, DataStore& store); void begin(); void startInterface(BaseSerialInterface &serial); - void setListener(Listener* listener) { _listener = listener; } + void setListener(MeshEventListener* listener) { _listener = listener; } const char *getNodeName(); NodePrefs *getNodePrefs(); @@ -121,10 +99,14 @@ public: void loop(); void handleCmdFrame(size_t len); - bool advert(); - void enterCLIRescue(); - int getRecentlyHeard(AdvertPath dest[], int max_num); + void enterCLIRescue() override; + void savePrefs() override { + _prefs.node_lat = sensors.node_lat; + _prefs.node_lon = sensors.node_lon; + _store->savePrefs(_prefs); + _prefs.clearDirty(); + } protected: float getAirtimeBudgetFactor() const override; @@ -194,13 +176,6 @@ protected: } public: - void savePrefs() { - _prefs.node_lat = sensors.node_lat; - _prefs.node_lon = sensors.node_lon; - _store->savePrefs(_prefs); - _prefs.clearDirty(); - } - #if ENV_INCLUDE_GPS == 1 void applyGpsPrefs() { if (_prefs.gps_interval > 0 && @@ -247,7 +222,7 @@ private: uint32_t pending_telemetry, pending_discovery; // pending _TELEMETRY_REQ uint32_t pending_req; // pending _BINARY_REQ BaseSerialInterface *_serial; - Listener* _listener; + MeshEventListener* _listener; ContactsIterator _iter; uint32_t _iter_filter_since; diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 3e7ec6dc..1093efc1 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -112,11 +112,6 @@ MultiSerialInterface interface_manager; #endif /* GLOBAL OBJECTS */ -#ifdef DISPLAY_CLASS - #include "UITask.h" - UITask ui_task(&board, &interface_manager); -#endif - StdRNG fast_rng; SimpleMeshTables tables; MyMesh the_mesh(radio_driver, fast_rng, rtc_clock, tables, store); @@ -327,7 +322,7 @@ void setup() { #endif #ifdef DISPLAY_CLASS - ui_task.begin(disp, &sensors, the_mesh.getNodePrefs()); // still want to pass this in as dependency, as prefs might be moved + ui_task.begin(disp, &sensors, the_mesh.getNodePrefs(), &the_mesh, the_mesh.getBLEPin(), FIRMWARE_VERSION, FIRMWARE_BUILD_DATE); the_mesh.setListener(&ui_task); #ifdef EINK_REFRESH_LOOP if (disp != NULL) disp->setBusyHook(loopDuringDisplayRefresh); diff --git a/src/helpers/BaseChatMesh.h b/src/helpers/BaseChatMesh.h index 835384b7..b6aa79a8 100644 --- a/src/helpers/BaseChatMesh.h +++ b/src/helpers/BaseChatMesh.h @@ -182,5 +182,8 @@ public: bool setChannel(int idx, const ChannelDetails& src); int findChannelIdx(const mesh::GroupChannel& ch); + virtual void savePrefs() { } + virtual void enterCLIRescue() { } + void loop(); }; diff --git a/examples/companion_radio/NodePrefs.h b/src/helpers/CompanionNodePrefs.h similarity index 100% rename from examples/companion_radio/NodePrefs.h rename to src/helpers/CompanionNodePrefs.h diff --git a/src/helpers/MeshEventListener.h b/src/helpers/MeshEventListener.h new file mode 100644 index 00000000..86c4e03f --- /dev/null +++ b/src/helpers/MeshEventListener.h @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include + +class MeshEventListener { +public: + virtual void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) = 0; + virtual void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) = 0; + virtual void onQueueSizeChanged(int msgcount) = 0; + virtual void onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path_len, const uint8_t* path) { } + virtual void onControlDataRecv(const mesh::Packet* pkt) { } + virtual void onChannelDataRecv(mesh::Packet *pkt, const mesh::GroupChannel &channel, uint16_t data_type, + const uint8_t *data, size_t data_len) { } + virtual void onACKRecv(uint32_t ack_crc) { } + virtual uint8_t onUnhandledRequest(const ContactInfo &contact, uint32_t sender_timestamp, const uint8_t *data, + uint8_t len, uint8_t *reply) { return 0; /* unknown request type */ } + virtual bool onUnhandledResponse(const ContactInfo &from, uint32_t tag, const uint8_t* data, uint8_t len) { return false; /* not handled */ } + virtual void onTraceRecv(mesh::Packet *pkt, uint32_t tag, uint32_t auth_code, uint8_t flags, + const uint8_t *path_snrs, const uint8_t *path_hashes, uint8_t path_len) { } + virtual void onRawDataRecv(mesh::Packet *pkt) { } + virtual ~MeshEventListener() { } +}; diff --git a/examples/companion_radio/AbstractUITask.h b/src/helpers/ui/AbstractUITask.h similarity index 89% rename from examples/companion_radio/AbstractUITask.h rename to src/helpers/ui/AbstractUITask.h index d927c1a3..fa2449a8 100644 --- a/examples/companion_radio/AbstractUITask.h +++ b/src/helpers/ui/AbstractUITask.h @@ -5,15 +5,14 @@ #include #include #include +#include +#include #include #ifdef PIN_BUZZER #include #endif -#include "NodePrefs.h" -#include "MyMesh.h" - enum class UIEventType { none, contactMessage, @@ -23,7 +22,7 @@ enum class UIEventType { ack }; -class AbstractUITask : public MyMesh::Listener { +class AbstractUITask : public MeshEventListener { protected: mesh::MainBoard* _board; MultiSerialInterface* _interfaceManager; diff --git a/examples/companion_radio/ui-new/UITask.cpp b/src/helpers/ui/companion-new/UITask.cpp similarity index 95% rename from examples/companion_radio/ui-new/UITask.cpp rename to src/helpers/ui/companion-new/UITask.cpp index ee225341..714daa28 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/src/helpers/ui/companion-new/UITask.cpp @@ -1,8 +1,8 @@ #include "UITask.h" #include -#include "../MyMesh.h" #include "target.h" #include +#include #ifdef ENABLE_WIFI_INTERFACE #include #endif @@ -31,18 +31,22 @@ #define PRESS_LABEL "long press" #endif +// Copied from simple_repeater +#define CTL_TYPE_NODE_DISCOVER_REQ 0x80 +#define CTL_TYPE_NODE_DISCOVER_RESP 0x90 + #include "icons.h" class SplashScreen : public UIScreen { UITask* _task; unsigned long dismiss_after; char _version_info[12]; + const char* _build_date; public: - SplashScreen(UITask* task) : _task(task) { + SplashScreen(UITask* task, const char* ver, const char* build_date) : _task(task) { // strip off dash and commit hash by changing dash to null terminator // e.g: v1.2.3-abcdef -> v1.2.3 - const char *ver = FIRMWARE_VERSION; const char *dash = strchr(ver, '-'); int len = dash ? dash - ver : strlen(ver); @@ -50,6 +54,8 @@ public: memcpy(_version_info, ver, len); _version_info[len] = 0; + _build_date = build_date; + dismiss_after = millis() + BOOT_SCREEN_MILLIS; } @@ -74,7 +80,7 @@ public: display.setColor(UIColor::secondary_txt); display.setTextSize(1); - display.drawTextCentered(display.width()/2, 48, FIRMWARE_BUILD_DATE); + display.drawTextCentered(display.width()/2, 48, _build_date); return 1000; } @@ -110,6 +116,11 @@ static void formatFixAge(char* buf, size_t size, uint32_t seconds) { } #endif +struct AdvertPath { + char name[32]; + uint32_t recv_timestamp; +}; + class HomeScreen : public UIScreen { enum HomePage { FIRST, @@ -140,6 +151,7 @@ class HomeScreen : public UIScreen { NodePrefs* _node_prefs; uint8_t _page; bool _shutdown_init; + int recent_next_idx; AdvertPath recent[UI_RECENT_LIST_SIZE]; #if UI_DISCOVER_SCREEN DiscoveredNode discovered[DISCOVERED_NODES_TABLE_SIZE]; // not circular, latest discovered nodes are not kept @@ -230,19 +242,31 @@ class HomeScreen : public UIScreen { public: HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs) : _task(task), _rtc(rtc), _sensors(sensors), _node_prefs(node_prefs), _page(0), - _shutdown_init(false), sensors_lpp(200) { } + _shutdown_init(false), sensors_lpp(200) + { + memset(recent, 0, sizeof(recent)); + recent_next_idx = 0; + } + + void addToRecents(ContactInfo &contact) { + auto p = &recent[recent_next_idx]; + recent_next_idx = (recent_next_idx + 1) % UI_RECENT_LIST_SIZE; + + strcpy(p->name, contact.name); + p->recv_timestamp = _rtc->getCurrentTime(); + } #if UI_DISCOVER_SCREEN bool sendDiscoverRequest() { uint8_t cmd_bytes[6]; cmd_bytes[0] = CTL_TYPE_NODE_DISCOVER_REQ | 1; // DISCOVER_REQ | prefix only cmd_bytes[1] = 0xFF; // Repeaters - the_mesh.getRNG()->random((uint8_t *) &disc_node_req_tag, 4); // generate random tag + _task->getMesh()->getRNG()->random((uint8_t *) &disc_node_req_tag, 4); // generate random tag memcpy(&cmd_bytes[2], &disc_node_req_tag, 4); disc_nodes_count = 0; - mesh::Packet* req = the_mesh.createControlData(cmd_bytes, sizeof(cmd_bytes)); + mesh::Packet* req = _task->getMesh()->createControlData(cmd_bytes, sizeof(cmd_bytes)); if (req) { - the_mesh.sendZeroHop(req); + _task->getMesh()->sendZeroHop(req); discovery_req_time = millis(); return true; } @@ -256,7 +280,7 @@ public: d->type = packet->payload[0] & 0xF; d->snr_out = ((int8_t)packet->payload[1]) / 4.0; d->snr_in = radio_driver.getLastSNR(); - ContactInfo* c = the_mesh.lookupContactByPubKey(&packet->payload[6], 8); + ContactInfo* c = _task->getMesh()->lookupContactByPubKey(&packet->payload[6], 8); if (c != NULL) { strncpy(d->name, c->name, 32); } else { @@ -340,9 +364,9 @@ public: display.drawTextCentered(display.width() / 2, 110, "< Connected >"); else display.drawTextCentered(display.width() / 2, 43, "< Connected >"); - } else if (the_mesh.getBLEPin() != 0) { // BT pin + } else if (_task->getBLEPin() != 0) { // BT pin display.setColor(UIColor::warning_txt); - sprintf(tmp, "Pin:%d", the_mesh.getBLEPin()); + sprintf(tmp, "Pin:%d", _task->getBLEPin()); if (_node_prefs->ui_show_clock) { display.setTextSize(1); display.drawTextCentered(display.width() / 2, 110, tmp); @@ -352,11 +376,10 @@ public: } } } else if (_page == HomePage::RECENT) { - the_mesh.getRecentlyHeard(recent, UI_RECENT_LIST_SIZE); display.setColor(UIColor::primary_txt); int y = 20; - for (int i = 0; i < UI_RECENT_LIST_SIZE; i++, y += 11) { - auto a = &recent[i]; + for (int i = 0, k = recent_next_idx; i < UI_RECENT_LIST_SIZE; i++, y += 11, k = (k + 1) % UI_RECENT_LIST_SIZE) { + auto a = &recent[k]; if (a->name[0] == 0) continue; // empty slot int secs = _rtc->getCurrentTime() - a->recv_timestamp; if (secs < 60) { @@ -623,7 +646,15 @@ public: #endif if (c == KEY_ENTER && _page == HomePage::ADVERT) { _task->notify(UIEventType::ack); - if (the_mesh.advert()) { + + mesh::Packet* pkt; + if (_node_prefs->advert_loc_policy == ADVERT_LOC_NONE) { + pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name); + } else { + pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name, sensors.node_lat, sensors.node_lon); + } + if (pkt) { + _task->getMesh()->sendZeroHop(pkt); _task->showAlert("Advert sent!", 1000); } else { _task->showAlert("Advert failed..", 1000); @@ -756,9 +787,11 @@ public: } }; -void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs) { +void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) { _display = display; _sensors = sensors; + the_mesh = mesh; + _ble_pin = ble_pin; #if defined(PIN_USER_BTN) user_btn.begin(); @@ -791,7 +824,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no ui_started_at = millis(); _alert_expiry = 0; - splash = new SplashScreen(this); + splash = new SplashScreen(this, ver, build_date); home = new HomeScreen(this, &rtc_clock, sensors, node_prefs); msg_preview = new MsgPreviewScreen(this, &rtc_clock); setCurrScreen(splash); @@ -888,6 +921,8 @@ void UITask::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path if (!hasConnection()) { notify(UIEventType::newContactMessage); } + + ((HomeScreen *) home)->addToRecents(contact); } void UITask::onControlDataRecv(const mesh::Packet* packet) { @@ -1178,7 +1213,7 @@ char UITask::checkDisplayOn(char c) { char UITask::handleLongPress(char c) { if (millis() - ui_started_at < 8000) { // long press in first 8 seconds since startup -> CLI/rescue - the_mesh.enterCLIRescue(); + the_mesh->enterCLIRescue(); c = 0; // consume event } return c; @@ -1223,7 +1258,7 @@ void UITask::toggleGPS() { _node_prefs->getGpsPrefs()->setGpsEnabled(*_sensors, true); notify(UIEventType::ack); } - the_mesh.savePrefs(); + the_mesh->savePrefs(); showAlert(_node_prefs->getGpsPrefs()->isGpsEnabled() ? "GPS: Enabled" : "GPS: Disabled", 800); _next_refresh = 0; break; @@ -1251,7 +1286,7 @@ void UITask::toggleBuzzer() { buzzer.quiet(true); } _node_prefs->buzzer_quiet = buzzer.isQuiet(); - the_mesh.savePrefs(); + the_mesh->savePrefs(); showAlert(buzzer.isQuiet() ? "Buzzer: OFF" : "Buzzer: ON", 800); _next_refresh = 0; // trigger refresh #endif diff --git a/examples/companion_radio/ui-new/UITask.h b/src/helpers/ui/companion-new/UITask.h similarity index 89% rename from examples/companion_radio/ui-new/UITask.h rename to src/helpers/ui/companion-new/UITask.h index 045b1060..288a8245 100644 --- a/examples/companion_radio/ui-new/UITask.h +++ b/src/helpers/ui/companion-new/UITask.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -19,8 +20,8 @@ #include #endif -#include "../AbstractUITask.h" -#include "../NodePrefs.h" +#include +#include #ifdef UI_NO_DISCOVER_SCREEN #error "UI_NO_DISCOVER_SCREEN is obsolete - use -D UI_DISCOVER_SCREEN=0 instead" @@ -49,6 +50,8 @@ struct DiscoveredNode { class UITask : public AbstractUITask { DisplayDriver* _display; SensorManager* _sensors; + BaseChatMesh* the_mesh; + uint32_t _ble_pin; #ifdef PIN_BUZZER genericBuzzer buzzer; #endif @@ -95,7 +98,7 @@ public: ui_started_at = 0; curr = NULL; } - void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs); + void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); void gotoHomeScreen() { setCurrScreen(home); } void showAlert(const char* text, int duration_millis); @@ -103,6 +106,9 @@ public: bool hasDisplay() const { return _display != NULL; } bool isButtonPressed() const; + BaseChatMesh* getMesh() const { return the_mesh; } + uint32_t getBLEPin() const { return _ble_pin; } + bool isBuzzerQuiet() { #ifdef PIN_BUZZER return buzzer.isQuiet(); @@ -116,7 +122,7 @@ public: void toggleGPS(); void triggerGPS(); - // MyMesh::Listener + // MeshEventListener void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) override; void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override; void onQueueSizeChanged(int offline_queue_size) override; diff --git a/examples/companion_radio/ui-new/icons.h b/src/helpers/ui/companion-new/icons.h similarity index 100% rename from examples/companion_radio/ui-new/icons.h rename to src/helpers/ui/companion-new/icons.h diff --git a/examples/companion_radio/ui-orig/Button.cpp b/src/helpers/ui/companion-orig/Button.cpp similarity index 100% rename from examples/companion_radio/ui-orig/Button.cpp rename to src/helpers/ui/companion-orig/Button.cpp diff --git a/examples/companion_radio/ui-orig/Button.h b/src/helpers/ui/companion-orig/Button.h similarity index 100% rename from examples/companion_radio/ui-orig/Button.h rename to src/helpers/ui/companion-orig/Button.h diff --git a/examples/companion_radio/ui-orig/UITask.cpp b/src/helpers/ui/companion-orig/UITask.cpp similarity index 96% rename from examples/companion_radio/ui-orig/UITask.cpp rename to src/helpers/ui/companion-orig/UITask.cpp index c2fd80fb..144e4d60 100644 --- a/examples/companion_radio/ui-orig/UITask.cpp +++ b/src/helpers/ui/companion-orig/UITask.cpp @@ -1,7 +1,7 @@ #include "UITask.h" #include #include -#include "../MyMesh.h" +#include "target.h" #define AUTO_OFF_MILLIS 15000 // 15 seconds #define BOOT_SCREEN_MILLIS 3000 // 3 seconds @@ -40,9 +40,12 @@ static const uint8_t meshcore_logo [] PROGMEM = { 0xe3, 0xe3, 0x8f, 0xff, 0x1f, 0xfc, 0x3c, 0x0e, 0x1f, 0xf8, 0xff, 0xf8, 0x70, 0x3c, 0x7f, 0xf8, }; -void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs) { +void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) { _display = display; _sensors = sensors; + the_mesh = mesh; + _ble_pin = ble_pin; + _auto_off = millis() + AUTO_OFF_MILLIS; clearMsgPreview(); _node_prefs = node_prefs; @@ -52,14 +55,14 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no // strip off dash and commit hash by changing dash to null terminator // e.g: v1.2.3-abcdef -> v1.2.3 - char *version = strdup(FIRMWARE_VERSION); + char *version = strdup(ver); char *dash = strchr(version, '-'); if (dash) { *dash = 0; } // v1.2.3 (1 Jan 2025) - sprintf(_version_info, "%s (%s)", version, FIRMWARE_BUILD_DATE); + sprintf(_version_info, "%s (%s)", version, build_date); #ifdef PIN_BUZZER buzzer.begin(); @@ -300,11 +303,11 @@ void UITask::renderCurrScreen() { _display->print(tmp); // BT pin - if (!hasConnection() && the_mesh.getBLEPin() != 0) { + if (!hasConnection() && _ble_pin != 0) { _display->setColor(UIColor::warning_txt); _display->setTextSize(2); _display->setCursor(0, 43); - sprintf(tmp, "Pin:%d", the_mesh.getBLEPin()); + sprintf(tmp, "Pin:%d", _ble_pin); _display->print(tmp); _display->setColor(UIColor::primary_txt); } else { @@ -555,7 +558,14 @@ void UITask::handleButtonDoublePress() { #ifdef PIN_BUZZER notify(UIEventType::ack); #endif - if (the_mesh.advert()) { + mesh::Packet* pkt; + if (_node_prefs->advert_loc_policy == ADVERT_LOC_NONE) { + pkt = the_mesh->createSelfAdvert(_node_prefs->node_name); + } else { + pkt = the_mesh->createSelfAdvert(_node_prefs->node_name, sensors.node_lat, sensors.node_lon); + } + if (pkt) { + the_mesh->sendZeroHop(pkt); MESH_DEBUG_PRINTLN("Advert sent!"); sprintf(_alert, "Advert sent!"); } else { @@ -584,7 +594,7 @@ void UITask::handleButtonTriplePress() { case 2: sprintf(_alert, "Alerts: Vibe only"); break; default: sprintf(_alert, "Alerts: Silent"); break; } - the_mesh.savePrefs(); + the_mesh->savePrefs(); _need_refresh = true; #elif defined(PIN_BUZZER) if (buzzer.isQuiet()) { @@ -596,7 +606,7 @@ void UITask::handleButtonTriplePress() { sprintf(_alert, "Buzzer: OFF"); } _node_prefs->buzzer_quiet = buzzer.isQuiet(); - the_mesh.savePrefs(); + the_mesh->savePrefs(); _need_refresh = true; #endif } @@ -617,7 +627,7 @@ void UITask::handleButtonQuadruplePress() { notify(UIEventType::ack); sprintf(_alert, "GPS: Enabled"); } - the_mesh.savePrefs(); + the_mesh->savePrefs(); break; } } @@ -628,7 +638,7 @@ void UITask::handleButtonQuadruplePress() { void UITask::handleButtonLongPress() { MESH_DEBUG_PRINTLN("UITask: long press triggered"); if (millis() - ui_started_at < 8000) { // long press in first 8 seconds since startup -> CLI/rescue - the_mesh.enterCLIRescue(); + the_mesh->enterCLIRescue(); } else { shutdown(); } diff --git a/examples/companion_radio/ui-orig/UITask.h b/src/helpers/ui/companion-orig/UITask.h similarity index 88% rename from examples/companion_radio/ui-orig/UITask.h rename to src/helpers/ui/companion-orig/UITask.h index d5f79898..21070528 100644 --- a/examples/companion_radio/ui-orig/UITask.h +++ b/src/helpers/ui/companion-orig/UITask.h @@ -3,14 +3,15 @@ #include #include #include +#include #include #ifdef PIN_BUZZER #include #endif -#include "../AbstractUITask.h" -#include "../NodePrefs.h" +#include +#include #include "Button.h" @@ -21,6 +22,8 @@ class UITask : public AbstractUITask { DisplayDriver* _display; SensorManager* _sensors; + BaseChatMesh* the_mesh; + uint32_t _ble_pin; #ifdef PIN_BUZZER genericBuzzer buzzer; #endif @@ -57,7 +60,6 @@ class UITask : public AbstractUITask { void handleButtonTriplePress(); void handleButtonQuadruplePress(); void handleButtonLongPress(); - public: @@ -65,12 +67,12 @@ public: _next_refresh = 0; ui_started_at = 0; } - void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs); + void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); bool hasDisplay() const { return _display != NULL; } void clearMsgPreview(); - // MyMesh::Listener + // MeshEventListener void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) override; void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override; void onQueueSizeChanged(int offline_queue_size) override; diff --git a/examples/companion_radio/ui-tiny/ScrollingStatusBar.h b/src/helpers/ui/companion-tiny/ScrollingStatusBar.h similarity index 100% rename from examples/companion_radio/ui-tiny/ScrollingStatusBar.h rename to src/helpers/ui/companion-tiny/ScrollingStatusBar.h diff --git a/examples/companion_radio/ui-tiny/UITask.cpp b/src/helpers/ui/companion-tiny/UITask.cpp similarity index 93% rename from examples/companion_radio/ui-tiny/UITask.cpp rename to src/helpers/ui/companion-tiny/UITask.cpp index 1b48cca8..f9f06aea 100644 --- a/examples/companion_radio/ui-tiny/UITask.cpp +++ b/src/helpers/ui/companion-tiny/UITask.cpp @@ -1,6 +1,5 @@ #include "UITask.h" #include -#include "../MyMesh.h" #include "target.h" #include "u8g2_icons.h" @@ -36,12 +35,12 @@ class SplashScreen : public UIScreen { unsigned long dismiss_after; unsigned long version_after; char _version_info[12]; + const char* _build_date; public: - SplashScreen(UITask* task) : _task(task) { + SplashScreen(UITask* task, const char* ver, const char* build_date) : _task(task) { // strip off dash and commit hash by changing dash to null terminator // e.g: v1.2.3-abcdef -> v1.2.3 - const char *ver = FIRMWARE_VERSION; const char *dash = strchr(ver, '-'); int len = dash ? dash - ver : strlen(ver); @@ -49,6 +48,8 @@ public: memcpy(_version_info, ver, len); _version_info[len] = 0; + _build_date = build_date; + version_after = millis() + BOOT_SCREEN_MILLIS / 2; dismiss_after = millis() + BOOT_SCREEN_MILLIS; } @@ -75,7 +76,7 @@ public: display.setColor(UIColor::secondary_txt); display.setTextSize(1); - display.drawTextCentered(display.width()/2, 27, FIRMWARE_BUILD_DATE); + display.drawTextCentered(display.width()/2, 27, _build_date); } return 1000; } @@ -87,6 +88,11 @@ public: } }; +struct AdvertPath { + char name[32]; + uint32_t recv_timestamp; +}; + class HomeScreen : public UIScreen { enum HomePage { FIRST, @@ -110,6 +116,7 @@ class HomeScreen : public UIScreen { NodePrefs* _node_prefs; uint8_t _page; bool _shutdown_init; + int recent_next_idx; AdvertPath recent[UI_RECENT_LIST_SIZE]; CayenneLPP sensors_lpp; @@ -142,7 +149,19 @@ class HomeScreen : public UIScreen { public: HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs) : _task(task), _rtc(rtc), _sensors(sensors), _node_prefs(node_prefs), _page(0), - _shutdown_init(false), sensors_lpp(200) { } + _shutdown_init(false), sensors_lpp(200) + { + memset(recent, 0, sizeof(recent)); + recent_next_idx = 0; + } + + void addToRecents(ContactInfo &contact) { + auto p = &recent[recent_next_idx]; + recent_next_idx = (recent_next_idx + 1) % UI_RECENT_LIST_SIZE; + + strcpy(p->name, contact.name); + p->recv_timestamp = _rtc->getCurrentTime(); + } void poll() override { if (_shutdown_init && !_task->isButtonPressed()) { // must wait for USR button to be released @@ -184,18 +203,17 @@ public: display.setTextSize(1); display.drawTextCentered(display.width() / 2, display.height()-8, "< Connected >"); - } else if (the_mesh.getBLEPin() != 0) { // BT pin + } else if (_task->getBLEPin() != 0) { // BT pin display.setColor(UIColor::warning_txt); display.setTextSize(2); - sprintf(tmp, "Pin:%d", the_mesh.getBLEPin()); + sprintf(tmp, "Pin:%d", _task->getBLEPin()); display.drawTextCentered(display.width() / 2, display.height()-8, tmp); } } else if (_page == HomePage::RECENT) { - the_mesh.getRecentlyHeard(recent, UI_RECENT_LIST_SIZE); display.setColor(UIColor::primary_txt); int y = 8; - for (int i = 0; i < UI_RECENT_LIST_SIZE; i++, y += 11) { - auto a = &recent[i]; + for (int i = 0, k = recent_next_idx; i < UI_RECENT_LIST_SIZE; i++, y += 11, k = (k + 1) % UI_RECENT_LIST_SIZE) { + auto a = &recent[k]; if (a->name[0] == 0) continue; // empty slot int secs = _rtc->getCurrentTime() - a->recv_timestamp; if (secs < 60) { @@ -400,7 +418,14 @@ public: } if (c == KEY_ENTER && _page == HomePage::ADVERT) { _task->notify(UIEventType::ack); - if (the_mesh.advert()) { + mesh::Packet* pkt; + if (_node_prefs->advert_loc_policy == ADVERT_LOC_NONE) { + pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name); + } else { + pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name, sensors.node_lat, sensors.node_lon); + } + if (pkt) { + _task->getMesh()->sendZeroHop(pkt); _task->showAlert("Advert sent!", 1000); } else { _task->showAlert("Advert failed..", 1000); @@ -429,9 +454,11 @@ public: }; -void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs) { +void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) { _display = display; _sensors = sensors; + the_mesh = mesh; + _ble_pin = ble_pin; _auto_off = millis() + AUTO_OFF_MILLIS; _cached_batt_mv = getBattMilliVolts(); @@ -463,7 +490,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no ui_started_at = millis(); _alert_expiry = 0; - splash = new SplashScreen(this); + splash = new SplashScreen(this, ver, build_date); home = new HomeScreen(this, &rtc_clock, sensors, node_prefs); setCurrScreen(splash); } @@ -547,6 +574,7 @@ void UITask::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path if (!hasConnection()) { notify(UIEventType::newContactMessage); } + ((HomeScreen *) home)->addToRecents(contact); } void UITask::userLedHandler() { @@ -794,7 +822,7 @@ char UITask::checkDisplayOn(char c) { char UITask::handleLongPress(char c) { if (millis() - ui_started_at < 8000) { // long press in first 8 seconds since startup -> CLI/rescue - the_mesh.enterCLIRescue(); + the_mesh->enterCLIRescue(); c = 0; // consume event } return c; @@ -839,7 +867,7 @@ void UITask::toggleGPS() { _node_prefs->getGpsPrefs()->setGpsEnabled(*_sensors, true); notify(UIEventType::ack); } - the_mesh.savePrefs(); + the_mesh->savePrefs(); showAlert(_node_prefs->getGpsPrefs()->isGpsEnabled() ? "GPS: Enabled" : "GPS: Disabled", 800); _next_refresh = 0; break; @@ -858,7 +886,7 @@ void UITask::toggleBuzzer() { buzzer.quiet(true); } _node_prefs->buzzer_quiet = buzzer.isQuiet(); - the_mesh.savePrefs(); + the_mesh->savePrefs(); showAlert(buzzer.isQuiet() ? "Buzzer: OFF" : "Buzzer: ON", 800); _next_refresh = 0; // trigger refresh #endif diff --git a/examples/companion_radio/ui-tiny/UITask.h b/src/helpers/ui/companion-tiny/UITask.h similarity index 87% rename from examples/companion_radio/ui-tiny/UITask.h rename to src/helpers/ui/companion-tiny/UITask.h index 084919aa..ea581edb 100644 --- a/examples/companion_radio/ui-tiny/UITask.h +++ b/src/helpers/ui/companion-tiny/UITask.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -22,12 +23,14 @@ #include #endif -#include "../AbstractUITask.h" -#include "../NodePrefs.h" +#include +#include class UITask : public AbstractUITask { DisplayDriver* _display; SensorManager* _sensors; + BaseChatMesh* the_mesh; + uint32_t _ble_pin; ScrollingStatusBar _statusBar; #ifdef PIN_BUZZER genericBuzzer buzzer; @@ -77,7 +80,7 @@ public: ui_started_at = 0; curr = NULL; } - void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs); + void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); void gotoHomeScreen() { setCurrScreen(home); } void showAlert(const char* text, int duration_millis); @@ -86,6 +89,9 @@ public: bool hasDisplay() const { return _display != NULL; } bool isButtonPressed() const; + BaseChatMesh* getMesh() const { return the_mesh; } + uint32_t getBLEPin() const { return _ble_pin; } + bool isBuzzerQuiet() { #ifdef PIN_BUZZER return buzzer.isQuiet(); @@ -98,7 +104,7 @@ public: bool getGPSState(); void toggleGPS(); - // MyMesh::Listener + // MeshEventListener void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) override; void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override; void onQueueSizeChanged(int offline_queue_size) override; diff --git a/examples/companion_radio/ui-tiny/u8g2_icons.h b/src/helpers/ui/companion-tiny/u8g2_icons.h similarity index 100% rename from examples/companion_radio/ui-tiny/u8g2_icons.h rename to src/helpers/ui/companion-tiny/u8g2_icons.h diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index a5978c3e..ef9ba10b 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -173,7 +173,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} -; -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -191,7 +191,6 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> +<../variants/heltec_v3/target-companion.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} diff --git a/variants/heltec_v3/target-companion.cpp b/variants/heltec_v3/target-companion.cpp index 571abbb9..3e31880c 100644 --- a/variants/heltec_v3/target-companion.cpp +++ b/variants/heltec_v3/target-companion.cpp @@ -2,8 +2,11 @@ #include "target.h" #ifdef DISPLAY_CLASS + #include + extern MultiSerialInterface interface_manager; + DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - // TODO: UITask + UITask ui_task(&board, &interface_manager); #endif diff --git a/variants/lilygo_techo_card/platformio.ini b/variants/lilygo_techo_card/platformio.ini index 17ba8d1b..b76eed9a 100644 --- a/variants/lilygo_techo_card/platformio.ini +++ b/variants/lilygo_techo_card/platformio.ini @@ -21,11 +21,13 @@ build_flags = ${nrf52_base.build_flags} -D PIN_OLED_RESET=-1 build_src_filter = ${nrf52_base.build_src_filter} + - + + +<../variants/lilygo_techo_card/TechoCardBoard.cpp> + + + - +<../variants/lilygo_techo_card> + +<../variants/lilygo_techo_card/target.cpp> + +<../variants/lilygo_techo_card/variant.cpp> + + lib_deps = ${nrf52_base.lib_deps} stevemarple/MicroNMEA @ ^2.0.6 @@ -38,9 +40,12 @@ upload_protocol = nrfutil [env:LilyGo_T-Echo_Card_repeater] extends = LilyGo_T-Echo_Card build_src_filter = ${LilyGo_T-Echo_Card.build_src_filter} + + +<../examples/simple_repeater> + +<../variants/lilygo_techo_card/target-other.cpp> build_flags = ${LilyGo_T-Echo_Card.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Echo Card Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -52,9 +57,12 @@ build_flags = [env:LilyGo_T-Echo_Card_room_server] extends = LilyGo_T-Echo_Card build_src_filter = ${LilyGo_T-Echo_Card.build_src_filter} + + +<../examples/simple_room_server> + +<../variants/lilygo_techo_card/target-other.cpp> build_flags = ${LilyGo_T-Echo_Card.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Echo Card Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -69,7 +77,7 @@ board_upload.maximum_size = 712704 build_flags = ${LilyGo_T-Echo_Card.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-tiny + -I src/helpers/ui/companion-tiny -D PIN_BUZZER=38 -D QSPIFLASH=1 -D MAX_CONTACTS=350 @@ -84,8 +92,9 @@ build_flags = -D AUTO_SHUTDOWN_MILLIVOLTS=3300 build_src_filter = ${LilyGo_T-Echo_Card.build_src_filter} + + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-tiny/*.cpp> + +<../variants/lilygo_techo_card/target-companion.cpp> + lib_deps = ${LilyGo_T-Echo_Card.lib_deps} @@ -99,7 +108,7 @@ board_upload.maximum_size = 712704 build_flags = ${LilyGo_T-Echo_Card.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-tiny + -I src/helpers/ui/companion-tiny -D PIN_BUZZER=38 -D QSPIFLASH=1 -D MAX_CONTACTS=350 @@ -112,8 +121,9 @@ build_flags = -D AUTO_SHUTDOWN_MILLIVOLTS=3300 -D ENABLE_USB_INTERFACE build_src_filter = ${LilyGo_T-Echo_Card.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-tiny/*.cpp> + +<../variants/lilygo_techo_card/target-companion.cpp> + lib_deps = ${LilyGo_T-Echo_Card.lib_deps} @@ -124,3 +134,6 @@ lib_deps = extends = LilyGo_T-Echo_Card build_src_filter = ${LilyGo_T-Echo_Card.build_src_filter} +<../examples/kiss_modem/> +build_flags = + ${LilyGo_T-Echo_Card.build_flags} + -U DISPLAY_CLASS diff --git a/variants/lilygo_techo_card/target-companion.cpp b/variants/lilygo_techo_card/target-companion.cpp new file mode 100644 index 00000000..481a1a4f --- /dev/null +++ b/variants/lilygo_techo_card/target-companion.cpp @@ -0,0 +1,13 @@ +#include +#include "target.h" + +#ifdef DISPLAY_CLASS + #include + extern MultiSerialInterface interface_manager; + + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + MomentaryButton back_btn(PIN_BUTTON2, 1000, true); + UITask ui_task(&board, &interface_manager); +#endif + diff --git a/variants/lilygo_techo_card/target-other.cpp b/variants/lilygo_techo_card/target-other.cpp new file mode 100644 index 00000000..0522b18e --- /dev/null +++ b/variants/lilygo_techo_card/target-other.cpp @@ -0,0 +1,10 @@ +#include +#include "target.h" + +#ifdef DISPLAY_CLASS + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + MomentaryButton back_btn(PIN_BUTTON2, 1000, true); + + UITask ui_task(board, display); +#endif diff --git a/variants/lilygo_techo_card/target.cpp b/variants/lilygo_techo_card/target.cpp index ea74bd0c..6d1e1510 100644 --- a/variants/lilygo_techo_card/target.cpp +++ b/variants/lilygo_techo_card/target.cpp @@ -20,13 +20,6 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea); EnvironmentSensorManager sensors = EnvironmentSensorManager(); #endif - -#ifdef DISPLAY_CLASS - DISPLAY_CLASS display; - MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - MomentaryButton back_btn(PIN_BUTTON2, 1000, true); -#endif - bool radio_init() { rtc_clock.begin(Wire); diff --git a/variants/lilygo_techo_card/target.h b/variants/lilygo_techo_card/target.h index f394f7da..bd76e0b7 100644 --- a/variants/lilygo_techo_card/target.h +++ b/variants/lilygo_techo_card/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include + #include // needs -I(nclude) path setting #endif extern TechoCardBoard board; @@ -23,6 +24,7 @@ extern EnvironmentSensorManager sensors; extern DISPLAY_CLASS display; extern MomentaryButton user_btn; extern MomentaryButton back_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/meshtracker_x1/platformio.ini b/variants/meshtracker_x1/platformio.ini index 80286460..51a52778 100644 --- a/variants/meshtracker_x1/platformio.ini +++ b/variants/meshtracker_x1/platformio.ini @@ -31,7 +31,9 @@ build_flags = ${nrf52_base.build_flags} -D ENV_INCLUDE_GPS=1 build_src_filter = ${nrf52_base.build_src_filter} + - +<../variants/meshtracker_x1> + +<../variants/meshtracker_x1/MeshTrackerX1Board.cpp> + +<../variants/meshtracker_x1/target.cpp> + +<../variants/meshtracker_x1/variant.cpp> lib_deps = ${nrf52_base.lib_deps} https://github.com/adafruit/Adafruit_SPA06_003/archive/refs/tags/1.0.2.zip stevemarple/MicroNMEA @ ^2.0.6 @@ -41,7 +43,6 @@ upload_protocol = nrfutil [env:MeshTracker_X1_repeater] extends = MeshTracker_X1 build_flags = ${MeshTracker_X1.build_flags} - -I examples/companion_radio/ui-orig -D ADVERT_NAME='"MeshTracker X1 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -56,7 +57,6 @@ lib_deps = ${MeshTracker_X1.lib_deps} [env:MeshTracker_X1_room_server] extends = MeshTracker_X1 build_flags = ${MeshTracker_X1.build_flags} - -I examples/companion_radio/ui-orig -D ADVERT_NAME='"MeshTracker X1 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -73,7 +73,7 @@ extends = MeshTracker_X1 board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${MeshTracker_X1.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D QSPIFLASH=1 -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -89,8 +89,9 @@ build_src_filter = ${MeshTracker_X1.build_src_filter} + + + + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + +<../variants/meshtracker_x1/target-companion.cpp> lib_deps = ${MeshTracker_X1.lib_deps} densaugeo/base64 @ ~1.4.0 end2endzone/NonBlockingRTTTL@^1.3.0 @@ -101,7 +102,7 @@ extends = MeshTracker_X1 board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${MeshTracker_X1.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D QSPIFLASH=1 -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -121,8 +122,9 @@ build_src_filter = ${MeshTracker_X1.build_src_filter} + + + + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + +<../variants/meshtracker_x1/target-companion.cpp> lib_deps = ${MeshTracker_X1.lib_deps} densaugeo/base64 @ ~1.4.0 end2endzone/NonBlockingRTTTL@^1.3.0 diff --git a/variants/meshtracker_x1/target-companion.cpp b/variants/meshtracker_x1/target-companion.cpp new file mode 100644 index 00000000..ed46ebcc --- /dev/null +++ b/variants/meshtracker_x1/target-companion.cpp @@ -0,0 +1,10 @@ +#include +#include "target.h" + +#ifdef DISPLAY_CLASS + #include + extern MultiSerialInterface interface_manager; + + NullDisplayDriver display; + UITask ui_task(&board, &interface_manager); +#endif diff --git a/variants/meshtracker_x1/target.cpp b/variants/meshtracker_x1/target.cpp index 84e0870e..2c1703bc 100644 --- a/variants/meshtracker_x1/target.cpp +++ b/variants/meshtracker_x1/target.cpp @@ -14,10 +14,6 @@ AirohaGpsDriver gps_driver(Serial1); MicroNMEALocationProvider nmea(gps_driver, &rtc_clock); MeshTrackerX1SensorManager sensors = MeshTrackerX1SensorManager(nmea); -#ifdef DISPLAY_CLASS - NullDisplayDriver display; -#endif - bool radio_init() { return radio.std_init(&SPI); } diff --git a/variants/meshtracker_x1/target.h b/variants/meshtracker_x1/target.h index e678e29c..27110343 100644 --- a/variants/meshtracker_x1/target.h +++ b/variants/meshtracker_x1/target.h @@ -11,6 +11,7 @@ #include #ifdef DISPLAY_CLASS #include "NullDisplayDriver.h" + #include // needs -I(nclude) path setting #endif class MeshTrackerX1SensorManager: public SensorManager { @@ -34,6 +35,7 @@ public: #ifdef DISPLAY_CLASS extern NullDisplayDriver display; + extern UITask ui_task; #endif extern MeshTrackerX1Board board; From 26ae484af81aa99481aed2c4708d23a05c7bdfc8 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Wed, 18 Nov 2026 23:31:08 +1100 Subject: [PATCH 03/12] * interface manager now injected via begin() --- examples/companion_radio/main.cpp | 2 +- src/helpers/ui/AbstractUITask.h | 2 +- src/helpers/ui/companion-new/UITask.cpp | 5 ++++- src/helpers/ui/companion-new/UITask.h | 5 +++-- src/helpers/ui/companion-orig/UITask.cpp | 5 ++++- src/helpers/ui/companion-orig/UITask.h | 5 +++-- src/helpers/ui/companion-tiny/UITask.cpp | 6 ++++-- src/helpers/ui/companion-tiny/UITask.h | 5 +++-- variants/heltec_v3/platformio.ini | 6 ++---- variants/heltec_v3/target-companion.cpp | 5 +---- variants/lilygo_techo_card/target-companion.cpp | 5 +---- variants/meshtracker_x1/target-companion.cpp | 5 +---- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 1093efc1..57a33c17 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -322,7 +322,7 @@ void setup() { #endif #ifdef DISPLAY_CLASS - ui_task.begin(disp, &sensors, the_mesh.getNodePrefs(), &the_mesh, the_mesh.getBLEPin(), FIRMWARE_VERSION, FIRMWARE_BUILD_DATE); + ui_task.begin(disp, &sensors, the_mesh.getNodePrefs(), &interface_manager, &the_mesh, the_mesh.getBLEPin(), FIRMWARE_VERSION, FIRMWARE_BUILD_DATE); the_mesh.setListener(&ui_task); #ifdef EINK_REFRESH_LOOP if (disp != NULL) disp->setBusyHook(loopDuringDisplayRefresh); diff --git a/src/helpers/ui/AbstractUITask.h b/src/helpers/ui/AbstractUITask.h index fa2449a8..98343aa7 100644 --- a/src/helpers/ui/AbstractUITask.h +++ b/src/helpers/ui/AbstractUITask.h @@ -27,7 +27,7 @@ protected: mesh::MainBoard* _board; MultiSerialInterface* _interfaceManager; - AbstractUITask(mesh::MainBoard* board, MultiSerialInterface* interfaceManager) : _board(board), _interfaceManager(interfaceManager) { + AbstractUITask(mesh::MainBoard* board, MultiSerialInterface* interfaceManager = NULL) : _board(board), _interfaceManager(interfaceManager) { } public: diff --git a/src/helpers/ui/companion-new/UITask.cpp b/src/helpers/ui/companion-new/UITask.cpp index 714daa28..652fef94 100644 --- a/src/helpers/ui/companion-new/UITask.cpp +++ b/src/helpers/ui/companion-new/UITask.cpp @@ -787,9 +787,12 @@ public: } }; -void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) { +void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, MultiSerialInterface* serial, + BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) +{ _display = display; _sensors = sensors; + _interfaceManager = serial; the_mesh = mesh; _ble_pin = ble_pin; diff --git a/src/helpers/ui/companion-new/UITask.h b/src/helpers/ui/companion-new/UITask.h index 288a8245..f6ee999b 100644 --- a/src/helpers/ui/companion-new/UITask.h +++ b/src/helpers/ui/companion-new/UITask.h @@ -93,12 +93,13 @@ class UITask : public AbstractUITask { public: - UITask(mesh::MainBoard* board, MultiSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL) { + UITask(mesh::MainBoard* board) : AbstractUITask(board), _display(NULL), _sensors(NULL) { next_batt_chck = _next_refresh = 0; ui_started_at = 0; curr = NULL; } - void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); + void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, MultiSerialInterface* serial, + BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); void gotoHomeScreen() { setCurrScreen(home); } void showAlert(const char* text, int duration_millis); diff --git a/src/helpers/ui/companion-orig/UITask.cpp b/src/helpers/ui/companion-orig/UITask.cpp index 144e4d60..2c5abff7 100644 --- a/src/helpers/ui/companion-orig/UITask.cpp +++ b/src/helpers/ui/companion-orig/UITask.cpp @@ -40,9 +40,12 @@ static const uint8_t meshcore_logo [] PROGMEM = { 0xe3, 0xe3, 0x8f, 0xff, 0x1f, 0xfc, 0x3c, 0x0e, 0x1f, 0xf8, 0xff, 0xf8, 0x70, 0x3c, 0x7f, 0xf8, }; -void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) { +void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, MultiSerialInterface* serial, + BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) +{ _display = display; _sensors = sensors; + _interfaceManager = serial; the_mesh = mesh; _ble_pin = ble_pin; diff --git a/src/helpers/ui/companion-orig/UITask.h b/src/helpers/ui/companion-orig/UITask.h index 21070528..d5b59a54 100644 --- a/src/helpers/ui/companion-orig/UITask.h +++ b/src/helpers/ui/companion-orig/UITask.h @@ -63,11 +63,12 @@ class UITask : public AbstractUITask { public: - UITask(mesh::MainBoard* board, MultiSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL) { + UITask(mesh::MainBoard* board) : AbstractUITask(board), _display(NULL), _sensors(NULL) { _next_refresh = 0; ui_started_at = 0; } - void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); + void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, MultiSerialInterface* serial, + BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); bool hasDisplay() const { return _display != NULL; } void clearMsgPreview(); diff --git a/src/helpers/ui/companion-tiny/UITask.cpp b/src/helpers/ui/companion-tiny/UITask.cpp index f9f06aea..a26c50e0 100644 --- a/src/helpers/ui/companion-tiny/UITask.cpp +++ b/src/helpers/ui/companion-tiny/UITask.cpp @@ -453,10 +453,12 @@ public: } }; - -void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) { +void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, MultiSerialInterface* serial, + BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date) +{ _display = display; _sensors = sensors; + _interfaceManager = serial; the_mesh = mesh; _ble_pin = ble_pin; _auto_off = millis() + AUTO_OFF_MILLIS; diff --git a/src/helpers/ui/companion-tiny/UITask.h b/src/helpers/ui/companion-tiny/UITask.h index ea581edb..7dce2a1a 100644 --- a/src/helpers/ui/companion-tiny/UITask.h +++ b/src/helpers/ui/companion-tiny/UITask.h @@ -74,13 +74,14 @@ class UITask : public AbstractUITask { public: - UITask(mesh::MainBoard* board, MultiSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL) { + UITask(mesh::MainBoard* board) : AbstractUITask(board), _display(NULL), _sensors(NULL) { next_batt_chck = _next_refresh = 0; _cached_batt_mv = 0; ui_started_at = 0; curr = NULL; } - void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); + void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, MultiSerialInterface* serial, + BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date); void gotoHomeScreen() { setCurrScreen(home); } void showAlert(const char* text, int duration_millis); diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index ef9ba10b..412b386e 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -151,7 +151,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} -; -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -163,7 +163,6 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> +<../variants/heltec_v3/target-companion.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} @@ -200,7 +199,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} -; -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -218,7 +217,6 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> +<../variants/heltec_v3/target-companion.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} diff --git a/variants/heltec_v3/target-companion.cpp b/variants/heltec_v3/target-companion.cpp index 3e31880c..c8b9f0c7 100644 --- a/variants/heltec_v3/target-companion.cpp +++ b/variants/heltec_v3/target-companion.cpp @@ -2,11 +2,8 @@ #include "target.h" #ifdef DISPLAY_CLASS - #include - extern MultiSerialInterface interface_manager; - DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - UITask ui_task(&board, &interface_manager); + UITask ui_task(&board); #endif diff --git a/variants/lilygo_techo_card/target-companion.cpp b/variants/lilygo_techo_card/target-companion.cpp index 481a1a4f..af01d850 100644 --- a/variants/lilygo_techo_card/target-companion.cpp +++ b/variants/lilygo_techo_card/target-companion.cpp @@ -2,12 +2,9 @@ #include "target.h" #ifdef DISPLAY_CLASS - #include - extern MultiSerialInterface interface_manager; - DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); MomentaryButton back_btn(PIN_BUTTON2, 1000, true); - UITask ui_task(&board, &interface_manager); + UITask ui_task(&board); #endif diff --git a/variants/meshtracker_x1/target-companion.cpp b/variants/meshtracker_x1/target-companion.cpp index ed46ebcc..aaa710e6 100644 --- a/variants/meshtracker_x1/target-companion.cpp +++ b/variants/meshtracker_x1/target-companion.cpp @@ -2,9 +2,6 @@ #include "target.h" #ifdef DISPLAY_CLASS - #include - extern MultiSerialInterface interface_manager; - NullDisplayDriver display; - UITask ui_task(&board, &interface_manager); + UITask ui_task(&board); #endif From b72fd0dd5e784e6f903380b05287de0652f49819 Mon Sep 17 00:00:00 2001 From: fdlamotte Date: Wed, 18 Nov 2026 11:40:11 -0400 Subject: [PATCH 04/12] ui-task: apply refactoring on thinknode_m5 (#3869) --- variants/thinknode_m5/platformio.ini | 46 ++++++++++++++++------ variants/thinknode_m5/target-companion.cpp | 10 +++++ variants/thinknode_m5/target-other.cpp | 10 +++++ variants/thinknode_m5/target.cpp | 6 --- variants/thinknode_m5/target.h | 2 + 5 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 variants/thinknode_m5/target-companion.cpp create mode 100644 variants/thinknode_m5/target-other.cpp diff --git a/variants/thinknode_m5/platformio.ini b/variants/thinknode_m5/platformio.ini index b2c7201e..8e0a602e 100644 --- a/variants/thinknode_m5/platformio.ini +++ b/variants/thinknode_m5/platformio.ini @@ -20,7 +20,6 @@ build_flags = ${esp32_base.build_flags} -D PIN_BUTTON2=14 -D EXP_PIN_LED=1 ; led is on bus expander -D DISPLAY_ROTATION=4 - -D DISPLAY_CLASS=GxEPDDisplay -D EINK_DISPLAY_MODEL=GxEPD2_154_D67 -D EINK_SCALE_X=1.5625f -D EINK_SCALE_Y=1.5625f @@ -49,7 +48,9 @@ build_src_filter = ${esp32_base.build_src_filter} + + + - +<../variants/thinknode_m5> + + + +<../variants/thinknode_m5/target.cpp> + +<../variants/thinknode_m5/ThinknodeM5Board.cpp> lib_deps = ${esp32_base.lib_deps} zinggjm/GxEPD2 @ 1.6.2 bakercp/CRC32 @ ^2.0.0 @@ -60,13 +61,17 @@ lib_deps = ${esp32_base.lib_deps} extends = ThinkNode_M5 build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/simple_repeater/*.cpp> + +<../variants/thinknode_m5/target-other.cpp> + + build_flags = ${ThinkNode_M5.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Thinknode M5 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=8 + -D DISPLAY_CLASS=GxEPDDisplay ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 lib_deps = @@ -99,8 +104,11 @@ extends = ThinkNode_M5 build_src_filter = ${ThinkNode_M5.build_src_filter} + +<../examples/simple_repeater/*.cpp> + +<../variants/thinknode_m5/target-other.cpp> + + build_flags = ${ThinkNode_M5.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -108,6 +116,7 @@ build_flags = -D MAX_NEIGHBOURS=8 -D WITH_ESPNOW_BRIDGE=1 -D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' + -D DISPLAY_CLASS=GxEPDDisplay ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 lib_deps = @@ -118,13 +127,17 @@ lib_deps = extends = ThinkNode_M5 build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/simple_room_server> + +<../variants/thinknode_m5/target-other.cpp> + + build_flags = ${ThinkNode_M5.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Thinknode M5 Room Server"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' -D ROOM_PASSWORD='"hello"' + -D DISPLAY_CLASS=GxEPDDisplay ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 lib_deps = @@ -149,19 +162,21 @@ lib_deps = extends = ThinkNode_M5 build_flags = ${ThinkNode_M5.build_flags} - -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D OFFLINE_QUEUE_SIZE=256 + -D DISPLAY_CLASS=GxEPDDisplay ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 ; -D GPS_NMEA_DEBUG + -I src/helpers/ui/companion-new build_src_filter = ${ThinkNode_M5.build_src_filter} + +<../examples/companion_radio/*.cpp> + +<../variants/thinknode_m5/target-companion.cpp> + + + + - +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + lib_deps = ${ThinkNode_M5.lib_deps} @@ -178,11 +193,14 @@ build_flags = -D OFFLINE_QUEUE_SIZE=256 -D ENABLE_USB_INTERFACE -D ENABLE_WIFI_INTERFACE + -D DISPLAY_CLASS=GxEPDDisplay + -I src/helpers/ui/companion-new build_src_filter = ${ThinkNode_M5.build_src_filter} + +<../examples/companion_radio/*.cpp> + +<../variants/thinknode_m5/target-companion.cpp> + + + + - +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = @@ -202,12 +220,15 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' + -D DISPLAY_CLASS=GxEPDDisplay + -I src/helpers/ui/companion-new build_src_filter = ${ThinkNode_M5.build_src_filter} + +<../examples/companion_radio/*.cpp> + +<../variants/thinknode_m5/target-companion.cpp> + + + + + - +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + lib_deps = ${ThinkNode_M5.lib_deps} @@ -223,13 +244,16 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D SERIAL_TX=D6 -D SERIAL_RX=D7 + -D DISPLAY_CLASS=GxEPDDisplay ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 + -I src/helpers/ui/companion-new build_src_filter = ${ThinkNode_M5.build_src_filter} + +<../examples/companion_radio/*.cpp> + +<../variants/thinknode_m5/target-companion.cpp> + + + + - +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + lib_deps = ${ThinkNode_M5.lib_deps} diff --git a/variants/thinknode_m5/target-companion.cpp b/variants/thinknode_m5/target-companion.cpp new file mode 100644 index 00000000..5d64b0c4 --- /dev/null +++ b/variants/thinknode_m5/target-companion.cpp @@ -0,0 +1,10 @@ +#include +#include "target.h" + +#ifdef DISPLAY_CLASS + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); + + UITask ui_task(&board); +#endif \ No newline at end of file diff --git a/variants/thinknode_m5/target-other.cpp b/variants/thinknode_m5/target-other.cpp new file mode 100644 index 00000000..734263ef --- /dev/null +++ b/variants/thinknode_m5/target-other.cpp @@ -0,0 +1,10 @@ +#include +#include "target.h" + +#ifdef DISPLAY_CLASS + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); + + UITask ui_task(board, display); +#endif diff --git a/variants/thinknode_m5/target.cpp b/variants/thinknode_m5/target.cpp index 0ed9a0d0..5c1d001b 100644 --- a/variants/thinknode_m5/target.cpp +++ b/variants/thinknode_m5/target.cpp @@ -24,12 +24,6 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea); EnvironmentSensorManager sensors = EnvironmentSensorManager(); #endif -#ifdef DISPLAY_CLASS - DISPLAY_CLASS display; - MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); -#endif - bool radio_init() { fallback_clock.begin(); rtc_clock.begin(Wire); diff --git a/variants/thinknode_m5/target.h b/variants/thinknode_m5/target.h index 7cce1edb..d5b8d61d 100644 --- a/variants/thinknode_m5/target.h +++ b/variants/thinknode_m5/target.h @@ -13,6 +13,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ThinknodeM5Board board; @@ -25,6 +26,7 @@ extern PCA9557 expander; extern DISPLAY_CLASS display; extern MomentaryButton user_btn; extern MomentaryButton backlight_btn; + extern UITask ui_task; #endif bool radio_init(); From 1ad8ca230a29953f8bb853d867901bca347f90b9 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 11:54:24 +1100 Subject: [PATCH 05/12] * UITask constructors now with same params, so don't have to have separate target-* modules/dirs --- src/helpers/ui/companion-new/UITask.h | 2 +- src/helpers/ui/companion-orig/UITask.h | 2 +- src/helpers/ui/companion-tiny/UITask.h | 2 +- src/helpers/ui/server/UITask.h | 2 +- variants/heltec_v3/platformio.ini | 18 +++++++++--------- .../target.cpp} | 0 .../{target-other.cpp => ui-other/target.cpp} | 2 +- .../lilygo_techo_card/target-companion.cpp | 10 ---------- variants/lilygo_techo_card/target-other.cpp | 10 ---------- variants/lilygo_techo_card/target.cpp | 8 ++++++++ variants/meshtracker_x1/platformio.ini | 6 +----- variants/meshtracker_x1/target-companion.cpp | 7 ------- variants/meshtracker_x1/target.cpp | 5 +++++ 13 files changed, 28 insertions(+), 46 deletions(-) rename variants/heltec_v3/{target-companion.cpp => ui-companion/target.cpp} (100%) rename variants/heltec_v3/{target-other.cpp => ui-other/target.cpp} (80%) delete mode 100644 variants/lilygo_techo_card/target-companion.cpp delete mode 100644 variants/lilygo_techo_card/target-other.cpp delete mode 100644 variants/meshtracker_x1/target-companion.cpp diff --git a/src/helpers/ui/companion-new/UITask.h b/src/helpers/ui/companion-new/UITask.h index f6ee999b..a0f2398e 100644 --- a/src/helpers/ui/companion-new/UITask.h +++ b/src/helpers/ui/companion-new/UITask.h @@ -93,7 +93,7 @@ class UITask : public AbstractUITask { public: - UITask(mesh::MainBoard* board) : AbstractUITask(board), _display(NULL), _sensors(NULL) { + UITask(mesh::MainBoard* board, DisplayDriver* display = NULL) : AbstractUITask(board), _display(display), _sensors(NULL) { next_batt_chck = _next_refresh = 0; ui_started_at = 0; curr = NULL; diff --git a/src/helpers/ui/companion-orig/UITask.h b/src/helpers/ui/companion-orig/UITask.h index d5b59a54..1dc6ccb7 100644 --- a/src/helpers/ui/companion-orig/UITask.h +++ b/src/helpers/ui/companion-orig/UITask.h @@ -63,7 +63,7 @@ class UITask : public AbstractUITask { public: - UITask(mesh::MainBoard* board) : AbstractUITask(board), _display(NULL), _sensors(NULL) { + UITask(mesh::MainBoard* board, DisplayDriver* display = NULL) : AbstractUITask(board), _display(display), _sensors(NULL) { _next_refresh = 0; ui_started_at = 0; } diff --git a/src/helpers/ui/companion-tiny/UITask.h b/src/helpers/ui/companion-tiny/UITask.h index 7dce2a1a..c45b83b6 100644 --- a/src/helpers/ui/companion-tiny/UITask.h +++ b/src/helpers/ui/companion-tiny/UITask.h @@ -74,7 +74,7 @@ class UITask : public AbstractUITask { public: - UITask(mesh::MainBoard* board) : AbstractUITask(board), _display(NULL), _sensors(NULL) { + UITask(mesh::MainBoard* board, DisplayDriver* display = NULL) : AbstractUITask(board), _display(display), _sensors(NULL) { next_batt_chck = _next_refresh = 0; _cached_batt_mv = 0; ui_started_at = 0; diff --git a/src/helpers/ui/server/UITask.h b/src/helpers/ui/server/UITask.h index 57e649ac..6e3b4b49 100644 --- a/src/helpers/ui/server/UITask.h +++ b/src/helpers/ui/server/UITask.h @@ -16,7 +16,7 @@ protected: long renderCurrScreen() override; public: - UITask(mesh::MainBoard& board, DisplayDriver& display) : BaseUITask(&board, &display) { _next_read = 0; } + UITask(mesh::MainBoard* board, DisplayDriver* display) : BaseUITask(board, display) { _next_read = 0; } void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version, const char* role_lbl); void loop() override; diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index 412b386e..95629b41 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -31,7 +31,7 @@ build_flags = -D PIN_GPS_TX=48 -D PIN_GPS_EN=26 build_src_filter = ${esp32_base.build_src_filter} - +<../variants/heltec_v3/target.cpp> + +<../variants/heltec_v3/*.cpp> + + lib_deps = @@ -55,7 +55,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/simple_repeater> - +<../variants/heltec_v3/target-other.cpp> + +<../variants/heltec_v3/ui-other/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -82,7 +82,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/simple_repeater> - +<../variants/heltec_v3/target-other.cpp> + +<../variants/heltec_v3/ui-other/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -106,7 +106,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/simple_repeater> - +<../variants/heltec_v3/target-other.cpp> + +<../variants/heltec_v3/ui-other/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -128,7 +128,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/simple_room_server> - +<../variants/heltec_v3/target-other.cpp> + +<../variants/heltec_v3/ui-other/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} @@ -163,7 +163,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../variants/heltec_v3/target-companion.cpp> + +<../variants/heltec_v3/ui-companion/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -190,7 +190,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../variants/heltec_v3/target-companion.cpp> + +<../variants/heltec_v3/ui-companion/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -217,7 +217,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../variants/heltec_v3/target-companion.cpp> + +<../variants/heltec_v3/ui-companion/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -240,7 +240,7 @@ build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + +<../examples/simple_sensor> - +<../variants/heltec_v3/target-other.cpp> + +<../variants/heltec_v3/ui-other/*.cpp> lib_deps = ${Heltec_lora32_v3.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/heltec_v3/target-companion.cpp b/variants/heltec_v3/ui-companion/target.cpp similarity index 100% rename from variants/heltec_v3/target-companion.cpp rename to variants/heltec_v3/ui-companion/target.cpp diff --git a/variants/heltec_v3/target-other.cpp b/variants/heltec_v3/ui-other/target.cpp similarity index 80% rename from variants/heltec_v3/target-other.cpp rename to variants/heltec_v3/ui-other/target.cpp index bccc29b0..77de9788 100644 --- a/variants/heltec_v3/target-other.cpp +++ b/variants/heltec_v3/ui-other/target.cpp @@ -5,5 +5,5 @@ DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - UITask ui_task(board, display); + UITask ui_task(&board, &display); #endif diff --git a/variants/lilygo_techo_card/target-companion.cpp b/variants/lilygo_techo_card/target-companion.cpp deleted file mode 100644 index af01d850..00000000 --- a/variants/lilygo_techo_card/target-companion.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include "target.h" - -#ifdef DISPLAY_CLASS - DISPLAY_CLASS display; - MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - MomentaryButton back_btn(PIN_BUTTON2, 1000, true); - UITask ui_task(&board); -#endif - diff --git a/variants/lilygo_techo_card/target-other.cpp b/variants/lilygo_techo_card/target-other.cpp deleted file mode 100644 index 0522b18e..00000000 --- a/variants/lilygo_techo_card/target-other.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include "target.h" - -#ifdef DISPLAY_CLASS - DISPLAY_CLASS display; - MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - MomentaryButton back_btn(PIN_BUTTON2, 1000, true); - - UITask ui_task(board, display); -#endif diff --git a/variants/lilygo_techo_card/target.cpp b/variants/lilygo_techo_card/target.cpp index 6d1e1510..b3375dbb 100644 --- a/variants/lilygo_techo_card/target.cpp +++ b/variants/lilygo_techo_card/target.cpp @@ -20,6 +20,14 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea); EnvironmentSensorManager sensors = EnvironmentSensorManager(); #endif +#ifdef DISPLAY_CLASS + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + MomentaryButton back_btn(PIN_BUTTON2, 1000, true); + + UITask ui_task(&board, &display); +#endif + bool radio_init() { rtc_clock.begin(Wire); diff --git a/variants/meshtracker_x1/platformio.ini b/variants/meshtracker_x1/platformio.ini index 51a52778..fa8cc4ba 100644 --- a/variants/meshtracker_x1/platformio.ini +++ b/variants/meshtracker_x1/platformio.ini @@ -31,9 +31,7 @@ build_flags = ${nrf52_base.build_flags} -D ENV_INCLUDE_GPS=1 build_src_filter = ${nrf52_base.build_src_filter} + - +<../variants/meshtracker_x1/MeshTrackerX1Board.cpp> - +<../variants/meshtracker_x1/target.cpp> - +<../variants/meshtracker_x1/variant.cpp> + +<../variants/meshtracker_x1/*.cpp> lib_deps = ${nrf52_base.lib_deps} https://github.com/adafruit/Adafruit_SPA06_003/archive/refs/tags/1.0.2.zip stevemarple/MicroNMEA @ ^2.0.6 @@ -91,7 +89,6 @@ build_src_filter = ${MeshTracker_X1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../variants/meshtracker_x1/target-companion.cpp> lib_deps = ${MeshTracker_X1.lib_deps} densaugeo/base64 @ ~1.4.0 end2endzone/NonBlockingRTTTL@^1.3.0 @@ -124,7 +121,6 @@ build_src_filter = ${MeshTracker_X1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../variants/meshtracker_x1/target-companion.cpp> lib_deps = ${MeshTracker_X1.lib_deps} densaugeo/base64 @ ~1.4.0 end2endzone/NonBlockingRTTTL@^1.3.0 diff --git a/variants/meshtracker_x1/target-companion.cpp b/variants/meshtracker_x1/target-companion.cpp deleted file mode 100644 index aaa710e6..00000000 --- a/variants/meshtracker_x1/target-companion.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include "target.h" - -#ifdef DISPLAY_CLASS - NullDisplayDriver display; - UITask ui_task(&board); -#endif diff --git a/variants/meshtracker_x1/target.cpp b/variants/meshtracker_x1/target.cpp index 2c1703bc..daba0619 100644 --- a/variants/meshtracker_x1/target.cpp +++ b/variants/meshtracker_x1/target.cpp @@ -14,6 +14,11 @@ AirohaGpsDriver gps_driver(Serial1); MicroNMEALocationProvider nmea(gps_driver, &rtc_clock); MeshTrackerX1SensorManager sensors = MeshTrackerX1SensorManager(nmea); +#ifdef DISPLAY_CLASS + NullDisplayDriver display; + UITask ui_task(&board, &display); +#endif + bool radio_init() { return radio.std_init(&SPI); } From 98f9e81681f1cbbc9c0490ce03d2ac95e68dd545 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 12:05:14 +1100 Subject: [PATCH 06/12] * thinknode_m5: simplified the target.* modules --- variants/thinknode_m5/platformio.ini | 17 +++++------------ variants/thinknode_m5/target-companion.cpp | 10 ---------- variants/thinknode_m5/target-other.cpp | 10 ---------- variants/thinknode_m5/target.cpp | 8 ++++++++ 4 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 variants/thinknode_m5/target-companion.cpp delete mode 100644 variants/thinknode_m5/target-other.cpp diff --git a/variants/thinknode_m5/platformio.ini b/variants/thinknode_m5/platformio.ini index 8e0a602e..e4dfdc61 100644 --- a/variants/thinknode_m5/platformio.ini +++ b/variants/thinknode_m5/platformio.ini @@ -49,8 +49,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + - +<../variants/thinknode_m5/target.cpp> - +<../variants/thinknode_m5/ThinknodeM5Board.cpp> + +<../variants/thinknode_m5/*.cpp> lib_deps = ${esp32_base.lib_deps} zinggjm/GxEPD2 @ 1.6.2 bakercp/CRC32 @ ^2.0.0 @@ -61,7 +60,6 @@ lib_deps = ${esp32_base.lib_deps} extends = ThinkNode_M5 build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/simple_repeater/*.cpp> - +<../variants/thinknode_m5/target-other.cpp> + build_flags = ${ThinkNode_M5.build_flags} @@ -104,7 +102,6 @@ extends = ThinkNode_M5 build_src_filter = ${ThinkNode_M5.build_src_filter} + +<../examples/simple_repeater/*.cpp> - +<../variants/thinknode_m5/target-other.cpp> + build_flags = ${ThinkNode_M5.build_flags} @@ -127,7 +124,6 @@ lib_deps = extends = ThinkNode_M5 build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/simple_room_server> - +<../variants/thinknode_m5/target-other.cpp> + build_flags = ${ThinkNode_M5.build_flags} @@ -162,6 +158,7 @@ lib_deps = extends = ThinkNode_M5 build_flags = ${ThinkNode_M5.build_flags} + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -170,10 +167,8 @@ build_flags = ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 ; -D GPS_NMEA_DEBUG - -I src/helpers/ui/companion-new build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../variants/thinknode_m5/target-companion.cpp> + + + @@ -187,7 +182,7 @@ lib_deps = extends = ThinkNode_M5 build_flags = ${ThinkNode_M5.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -197,7 +192,6 @@ build_flags = -I src/helpers/ui/companion-new build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../variants/thinknode_m5/target-companion.cpp> + + + @@ -212,7 +206,7 @@ lib_deps = extends = ThinkNode_M5 build_flags = ${ThinkNode_M5.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -224,7 +218,6 @@ build_flags = -I src/helpers/ui/companion-new build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../variants/thinknode_m5/target-companion.cpp> + + + @@ -239,7 +232,7 @@ lib_deps = extends = ThinkNode_M5 build_flags = ${ThinkNode_M5.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D SERIAL_TX=D6 diff --git a/variants/thinknode_m5/target-companion.cpp b/variants/thinknode_m5/target-companion.cpp deleted file mode 100644 index 5d64b0c4..00000000 --- a/variants/thinknode_m5/target-companion.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include "target.h" - -#ifdef DISPLAY_CLASS - DISPLAY_CLASS display; - MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); - - UITask ui_task(&board); -#endif \ No newline at end of file diff --git a/variants/thinknode_m5/target-other.cpp b/variants/thinknode_m5/target-other.cpp deleted file mode 100644 index 734263ef..00000000 --- a/variants/thinknode_m5/target-other.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include "target.h" - -#ifdef DISPLAY_CLASS - DISPLAY_CLASS display; - MomentaryButton user_btn(PIN_USER_BTN, 1000, true); - MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); - - UITask ui_task(board, display); -#endif diff --git a/variants/thinknode_m5/target.cpp b/variants/thinknode_m5/target.cpp index 5c1d001b..493ce844 100644 --- a/variants/thinknode_m5/target.cpp +++ b/variants/thinknode_m5/target.cpp @@ -24,6 +24,14 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea); EnvironmentSensorManager sensors = EnvironmentSensorManager(); #endif +#ifdef DISPLAY_CLASS + DISPLAY_CLASS display; + MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); + + UITask ui_task(&board, &display); +#endif + bool radio_init() { fallback_clock.begin(); rtc_clock.begin(Wire); From ce02d5a7876432393d3c82e923e6cb3a109fdef7 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 15:22:23 +1100 Subject: [PATCH 07/12] * lotsa super boring refactoring --- .../dfrobot_lorawan_esp32s3/platformio.ini | 4 +- variants/dfrobot_lorawan_esp32s3/target.cpp | 1 + variants/dfrobot_lorawan_esp32s3/target.h | 2 + variants/ebyte_eora_s3/platformio.ini | 8 ++-- variants/ebyte_eora_s3/target.cpp | 1 + variants/ebyte_eora_s3/target.h | 2 + variants/gat562_30s_mesh_kit/platformio.ini | 8 ++-- variants/gat562_30s_mesh_kit/target.cpp | 1 + variants/gat562_30s_mesh_kit/target.h | 2 + variants/gat562_mesh_evb_pro/target.cpp | 2 +- variants/gat562_mesh_evb_pro/target.h | 2 + .../gat562_mesh_tracker_pro/platformio.ini | 8 ++-- variants/gat562_mesh_tracker_pro/target.cpp | 1 + variants/gat562_mesh_tracker_pro/target.h | 2 + variants/gat562_mesh_watch13/platformio.ini | 4 +- variants/gat562_mesh_watch13/target.cpp | 1 + variants/gat562_mesh_watch13/target.h | 2 + variants/heltec_e213/platformio.ini | 8 ++-- variants/heltec_e213/target.cpp | 1 + variants/heltec_e213/target.h | 2 + variants/heltec_e290/platformio.ini | 8 ++-- variants/heltec_e290/target.cpp | 1 + variants/heltec_e290/target.h | 2 + variants/heltec_mesh_solar/target.cpp | 1 + variants/heltec_mesh_solar/target.h | 2 + variants/heltec_rc32/platformio.ini | 24 ++++++------ variants/heltec_rc32/target.cpp | 1 + variants/heltec_rc32/target.h | 2 + variants/heltec_rc52/platformio.ini | 16 ++++---- variants/heltec_rc52/target.cpp | 1 + variants/heltec_rc52/target.h | 2 + variants/heltec_t096/platformio.ini | 8 ++-- variants/heltec_t096/target.cpp | 1 + variants/heltec_t096/target.h | 2 + variants/heltec_t1/platformio.ini | 8 ++-- variants/heltec_t1/target.cpp | 1 + variants/heltec_t1/target.h | 2 + variants/heltec_t114/platformio.ini | 16 ++++---- variants/heltec_t114/target.cpp | 1 + variants/heltec_t114/target.h | 2 + variants/heltec_t190/platformio.ini | 8 ++-- variants/heltec_t190/target.cpp | 1 + variants/heltec_t190/target.h | 2 + variants/heltec_tower_v2/platformio.ini | 8 ++-- variants/heltec_tower_v2/target.cpp | 1 + variants/heltec_tower_v2/target.h | 2 + variants/heltec_tracker/platformio.ini | 8 ++-- variants/heltec_tracker/target.cpp | 1 + variants/heltec_tracker/target.h | 2 + variants/heltec_tracker_v2/platformio.ini | 12 +++--- variants/heltec_tracker_v2/target.cpp | 1 + variants/heltec_tracker_v2/target.h | 2 + variants/heltec_v2/platformio.ini | 12 +++--- variants/heltec_v2/target.cpp | 1 + variants/heltec_v2/target.h | 2 + variants/heltec_v3/platformio.ini | 1 + variants/heltec_v4/platformio.ini | 24 ++++++------ variants/heltec_v4/target.cpp | 1 + variants/heltec_v4/target.h | 2 + variants/heltec_v4_r8/platformio.ini | 24 ++++++------ variants/heltec_v4_r8/target.cpp | 1 + variants/heltec_v4_r8/target.h | 2 + variants/heltec_wireless_paper/platformio.ini | 8 ++-- variants/heltec_wireless_paper/target.cpp | 1 + variants/heltec_wireless_paper/target.h | 2 + variants/ikoka_handheld_nrf/platformio.ini | 2 +- variants/ikoka_handheld_nrf/target.cpp | 1 + variants/ikoka_handheld_nrf/target.h | 3 ++ variants/ikoka_nano_nrf/platformio.ini | 8 ++-- variants/ikoka_nano_nrf/target.cpp | 1 + variants/ikoka_nano_nrf/target.h | 3 ++ variants/ikoka_stick_nrf/platformio.ini | 8 ++-- variants/ikoka_stick_nrf/target.cpp | 1 + variants/ikoka_stick_nrf/target.h | 3 ++ variants/keepteen_lt1/platformio.ini | 8 ++-- variants/keepteen_lt1/target.cpp | 1 + variants/keepteen_lt1/target.h | 2 + variants/lilygo_t3_stm32/platformio.ini | 4 +- variants/lilygo_t3s3/platformio.ini | 8 ++-- variants/lilygo_t3s3/target.cpp | 1 + variants/lilygo_t3s3/target.h | 2 + variants/lilygo_t3s3_sx1276/platformio.ini | 8 ++-- variants/lilygo_t3s3_sx1276/target.cpp | 1 + variants/lilygo_t3s3_sx1276/target.h | 2 + variants/lilygo_t_impulse_plus/platformio.ini | 4 +- variants/lilygo_t_impulse_plus/target.cpp | 1 + variants/lilygo_t_impulse_plus/target.h | 2 + variants/lilygo_tbeam_1w/platformio.ini | 12 +++--- variants/lilygo_tbeam_1w/target.cpp | 1 + variants/lilygo_tbeam_1w/target.h | 3 ++ variants/lilygo_tbeam_SX1262/platformio.ini | 4 +- variants/lilygo_tbeam_SX1262/target.cpp | 1 + variants/lilygo_tbeam_SX1262/target.h | 2 + variants/lilygo_tbeam_SX1276/platformio.ini | 4 +- variants/lilygo_tbeam_SX1276/target.cpp | 1 + variants/lilygo_tbeam_SX1276/target.h | 2 + .../platformio.ini | 8 ++-- .../lilygo_tbeam_supreme_SX1262/target.cpp | 1 + variants/lilygo_tbeam_supreme_SX1262/target.h | 2 + variants/lilygo_tdeck/platformio.ini | 8 ++-- variants/lilygo_tdeck/target.cpp | 1 + variants/lilygo_tdeck/target.h | 2 + variants/lilygo_techo/platformio.ini | 8 ++-- variants/lilygo_techo/target.cpp | 1 + variants/lilygo_techo/target.h | 2 + variants/lilygo_techo_lite/platformio.ini | 12 +++--- variants/lilygo_techo_lite/target.cpp | 1 + variants/lilygo_techo_lite/target.h | 2 + variants/lilygo_tlora_v2_1/platformio.ini | 12 +++--- variants/lilygo_tlora_v2_1/target.cpp | 1 + variants/lilygo_tlora_v2_1/target.h | 2 + variants/mesh_pocket/platformio.ini | 17 ++++++--- variants/mesh_pocket/target.cpp | 1 + variants/mesh_pocket/target.h | 2 + variants/meshadventurer/platformio.ini | 31 ++++++++++++---- variants/meshadventurer/target.cpp | 1 + variants/meshadventurer/target.h | 2 + variants/meshnology_w12/platformio.ini | 21 +++++++---- variants/meshnology_w12/target.cpp | 1 + variants/meshnology_w12/target.h | 2 + variants/meshtiny/platformio.ini | 8 ++-- variants/meshtiny/target.cpp | 3 +- variants/meshtiny/target.h | 2 + variants/minewsemi_me25ls01/platformio.ini | 13 +++---- variants/minewsemi_me25ls01/target.cpp | 1 + variants/minewsemi_me25ls01/target.h | 2 + variants/muzi_base/platformio.ini | 37 +++++++++++-------- variants/muzi_base/target.cpp | 1 + variants/muzi_base/target.h | 2 + variants/muziworks_r1_neo/R1NeoBoard.h | 2 - variants/muziworks_r1_neo/platformio.ini | 13 ++++--- variants/muziworks_r1_neo/target.cpp | 1 + variants/muziworks_r1_neo/target.h | 6 +++ variants/nano_g2_ultra/platformio.ini | 13 +++++-- variants/nano_g2_ultra/target.cpp | 1 + variants/nano_g2_ultra/target.h | 2 + variants/nibble_screen_connect/platformio.ini | 19 +++++++--- variants/nibble_screen_connect/target.cpp | 1 + variants/nibble_screen_connect/target.h | 2 + variants/nibble_zero_connect/platformio.ini | 19 +++++++--- variants/nibble_zero_connect/target.cpp | 1 + variants/nibble_zero_connect/target.h | 2 + variants/promicro/platformio.ini | 17 ++++++--- variants/promicro/target.cpp | 1 + variants/promicro/target.h | 2 + variants/rak3112/platformio.ini | 12 +++--- variants/rak3112/target.cpp | 1 + variants/rak3112/target.h | 2 + variants/rak3401/platformio.ini | 13 +++++-- variants/rak3401/target.cpp | 1 + variants/rak3401/target.h | 2 + variants/rak4631/platformio.ini | 25 ++++++++++--- variants/rak4631/target.cpp | 1 + variants/rak4631/target.h | 2 + variants/rak_wismesh_tag/platformio.ini | 11 +++--- variants/rak_wismesh_tag/target.cpp | 1 + variants/rak_wismesh_tag/target.h | 2 + .../sensecap_indicator-espnow/platformio.ini | 4 +- variants/sensecap_indicator-espnow/target.cpp | 1 + variants/sensecap_indicator-espnow/target.h | 2 + variants/station_g2/platformio.ini | 24 +++++++++--- variants/station_g2/target.cpp | 1 + variants/station_g2/target.h | 2 + variants/station_g3_esp32/platformio.ini | 22 ++++++++--- variants/station_g3_esp32/target.cpp | 1 + variants/station_g3_esp32/target.h | 2 + variants/t1000-e/platformio.ini | 12 +++--- variants/t1000-e/target.cpp | 1 + variants/t1000-e/target.h | 2 + variants/thinknode_m1/platformio.ini | 8 ++-- variants/thinknode_m1/target.cpp | 1 + variants/thinknode_m1/target.h | 2 + variants/thinknode_m2/platformio.ini | 21 ++++++----- variants/thinknode_m2/target.cpp | 1 + variants/thinknode_m2/target.h | 2 + variants/thinknode_m3/platformio.ini | 12 +++--- variants/thinknode_m3/target.cpp | 1 + variants/thinknode_m3/target.h | 2 + variants/thinknode_m4/platformio.ini | 10 ++--- variants/thinknode_m4/target.cpp | 1 + variants/thinknode_m4/target.h | 2 + variants/thinknode_m6/platformio.ini | 4 +- variants/thinknode_m6/target.cpp | 1 + variants/thinknode_m6/target.h | 2 + variants/thinknode_m7/platformio.ini | 16 ++++---- variants/thinknode_m7/target.cpp | 1 + variants/thinknode_m7/target.h | 2 + variants/thinknode_m8/platformio.ini | 8 ++-- variants/thinknode_m8/target.cpp | 1 + variants/thinknode_m8/target.h | 2 + variants/thinknode_m9/platformio.ini | 12 +++--- variants/thinknode_m9/target.cpp | 1 + variants/thinknode_m9/target.h | 2 + variants/wio-e5-mini/platformio.ini | 4 +- variants/wio-e5-mini/target.cpp | 1 + variants/wio-e5-mini/target.h | 2 + variants/wio-tracker-l1-1w/platformio.ini | 13 ++++--- variants/wio-tracker-l1-1w/target.cpp | 1 + variants/wio-tracker-l1-1w/target.h | 2 + variants/wio-tracker-l1-eink/platformio.ini | 4 +- variants/wio-tracker-l1/platformio.ini | 13 +++++-- variants/wio-tracker-l1/target.cpp | 1 + variants/wio-tracker-l1/target.h | 2 + variants/xiao_nrf52/platformio.ini | 11 +++--- variants/xiao_nrf52/target.cpp | 1 + variants/xiao_nrf52/target.h | 3 ++ variants/xiao_s3/platformio.ini | 8 ++-- variants/xiao_s3/target.cpp | 1 + variants/xiao_s3/target.h | 2 + variants/xiao_s3_wio/platformio.ini | 16 ++++---- variants/xiao_s3_wio/target.cpp | 1 + variants/xiao_s3_wio/target.h | 2 + 212 files changed, 693 insertions(+), 365 deletions(-) diff --git a/variants/dfrobot_lorawan_esp32s3/platformio.ini b/variants/dfrobot_lorawan_esp32s3/platformio.ini index 0f69e276..f7861cc3 100644 --- a/variants/dfrobot_lorawan_esp32s3/platformio.ini +++ b/variants/dfrobot_lorawan_esp32s3/platformio.ini @@ -52,7 +52,7 @@ extends = DFRobot_LoRaWAN_ESP32S3 build_flags = ${DFRobot_LoRaWAN_ESP32S3.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_ROTATION=3 -D DISPLAY_CLASS=ST7735Display -D MAX_CONTACTS=350 @@ -67,7 +67,7 @@ build_src_filter = ${DFRobot_LoRaWAN_ESP32S3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${DFRobot_LoRaWAN_ESP32S3.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/dfrobot_lorawan_esp32s3/target.cpp b/variants/dfrobot_lorawan_esp32s3/target.cpp index bf723516..e2f20359 100644 --- a/variants/dfrobot_lorawan_esp32s3/target.cpp +++ b/variants/dfrobot_lorawan_esp32s3/target.cpp @@ -19,6 +19,7 @@ SensorManager sensors; DISPLAY_CLASS display(&board.periph_power); // Active-low button, internal pull-up. MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/dfrobot_lorawan_esp32s3/target.h b/variants/dfrobot_lorawan_esp32s3/target.h index 07cec79b..37737743 100644 --- a/variants/dfrobot_lorawan_esp32s3/target.h +++ b/variants/dfrobot_lorawan_esp32s3/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern DFRobotLoRaBoard board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/ebyte_eora_s3/platformio.ini b/variants/ebyte_eora_s3/platformio.ini index 1ab3d3fb..ad95efb5 100644 --- a/variants/ebyte_eora_s3/platformio.ini +++ b/variants/ebyte_eora_s3/platformio.ini @@ -98,7 +98,7 @@ lib_deps = extends = Ebyte_EoRa-S3 build_flags = ${Ebyte_EoRa-S3.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -109,7 +109,7 @@ build_src_filter = ${Ebyte_EoRa-S3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Ebyte_EoRa-S3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -118,7 +118,7 @@ lib_deps = extends = Ebyte_EoRa-S3 build_flags = ${Ebyte_EoRa-S3.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -132,7 +132,7 @@ build_src_filter = ${Ebyte_EoRa-S3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Ebyte_EoRa-S3.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/ebyte_eora_s3/target.cpp b/variants/ebyte_eora_s3/target.cpp index 91d851ff..f66fc224 100644 --- a/variants/ebyte_eora_s3/target.cpp +++ b/variants/ebyte_eora_s3/target.cpp @@ -19,6 +19,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/ebyte_eora_s3/target.h b/variants/ebyte_eora_s3/target.h index b64694f5..6ee9d3e2 100644 --- a/variants/ebyte_eora_s3/target.h +++ b/variants/ebyte_eora_s3/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ESP32Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/gat562_30s_mesh_kit/platformio.ini b/variants/gat562_30s_mesh_kit/platformio.ini index 326e3f70..6ec90ff4 100644 --- a/variants/gat562_30s_mesh_kit/platformio.ini +++ b/variants/gat562_30s_mesh_kit/platformio.ini @@ -70,7 +70,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${GAT562_30S_Mesh_Kit.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -79,7 +79,7 @@ build_flags = ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + + lib_deps = ${GAT562_30S_Mesh_Kit.lib_deps} @@ -93,7 +93,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${GAT562_30S_Mesh_Kit.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -106,7 +106,7 @@ build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${GAT562_30S_Mesh_Kit.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/gat562_30s_mesh_kit/target.cpp b/variants/gat562_30s_mesh_kit/target.cpp index 96e38a79..3cbdfbb1 100644 --- a/variants/gat562_30s_mesh_kit/target.cpp +++ b/variants/gat562_30s_mesh_kit/target.cpp @@ -15,6 +15,7 @@ GAT56230SMeshKitBoard board; MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false); MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false); MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true); + UITask ui_task(&board, &display); #endif diff --git a/variants/gat562_30s_mesh_kit/target.h b/variants/gat562_30s_mesh_kit/target.h index d526a5d0..6cd99be4 100644 --- a/variants/gat562_30s_mesh_kit/target.h +++ b/variants/gat562_30s_mesh_kit/target.h @@ -10,12 +10,14 @@ #ifdef DISPLAY_CLASS #include + #include extern DISPLAY_CLASS display; #include extern MomentaryButton user_btn; extern MomentaryButton joystick_left; extern MomentaryButton joystick_right; extern MomentaryButton back_btn; + extern UITask ui_task; #endif extern GAT56230SMeshKitBoard board; diff --git a/variants/gat562_mesh_evb_pro/target.cpp b/variants/gat562_mesh_evb_pro/target.cpp index 0aac297a..215bdc79 100644 --- a/variants/gat562_mesh_evb_pro/target.cpp +++ b/variants/gat562_mesh_evb_pro/target.cpp @@ -12,8 +12,8 @@ GAT562EVBProBoard board; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true, false, false); - MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true); + UITask ui_task(&board, &display); #endif diff --git a/variants/gat562_mesh_evb_pro/target.h b/variants/gat562_mesh_evb_pro/target.h index 9111704f..c09d89ab 100644 --- a/variants/gat562_mesh_evb_pro/target.h +++ b/variants/gat562_mesh_evb_pro/target.h @@ -10,11 +10,13 @@ #ifdef DISPLAY_CLASS #include + #include extern DISPLAY_CLASS display; #include extern MomentaryButton user_btn; extern MomentaryButton back_btn; + extern UITask ui_task; #endif extern GAT562EVBProBoard board; diff --git a/variants/gat562_mesh_tracker_pro/platformio.ini b/variants/gat562_mesh_tracker_pro/platformio.ini index 1141cee6..1a8ea3e0 100644 --- a/variants/gat562_mesh_tracker_pro/platformio.ini +++ b/variants/gat562_mesh_tracker_pro/platformio.ini @@ -66,7 +66,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${GAT562_Mesh_Tracker_Pro.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -75,7 +75,7 @@ build_flags = ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${GAT562_Mesh_Tracker_Pro.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -88,7 +88,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${GAT562_Mesh_Tracker_Pro.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -101,7 +101,7 @@ build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${GAT562_Mesh_Tracker_Pro.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/gat562_mesh_tracker_pro/target.cpp b/variants/gat562_mesh_tracker_pro/target.cpp index 225aa161..e2f8fa83 100644 --- a/variants/gat562_mesh_tracker_pro/target.cpp +++ b/variants/gat562_mesh_tracker_pro/target.cpp @@ -15,6 +15,7 @@ GAT562MeshTrackerProBoard board; MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false); MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false); MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true); + UITask ui_task(&board, &display); #endif diff --git a/variants/gat562_mesh_tracker_pro/target.h b/variants/gat562_mesh_tracker_pro/target.h index 0d3b7d76..52b31b35 100644 --- a/variants/gat562_mesh_tracker_pro/target.h +++ b/variants/gat562_mesh_tracker_pro/target.h @@ -10,7 +10,9 @@ #ifdef DISPLAY_CLASS #include + #include extern DISPLAY_CLASS display; + extern UITask ui_task; #include extern MomentaryButton user_btn; extern MomentaryButton joystick_left; diff --git a/variants/gat562_mesh_watch13/platformio.ini b/variants/gat562_mesh_watch13/platformio.ini index d8ca3052..22ea721b 100644 --- a/variants/gat562_mesh_watch13/platformio.ini +++ b/variants/gat562_mesh_watch13/platformio.ini @@ -66,7 +66,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${GAT562_Mesh_Watch13.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -81,7 +81,7 @@ build_src_filter = ${GAT562_Mesh_Watch13.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${GAT562_Mesh_Watch13.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/gat562_mesh_watch13/target.cpp b/variants/gat562_mesh_watch13/target.cpp index 95bcf6dc..679a63f0 100644 --- a/variants/gat562_mesh_watch13/target.cpp +++ b/variants/gat562_mesh_watch13/target.cpp @@ -12,6 +12,7 @@ GAT56MeshWatch13Board board; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true, false, true); + UITask ui_task(&board, &display); #endif diff --git a/variants/gat562_mesh_watch13/target.h b/variants/gat562_mesh_watch13/target.h index 9ed5cda7..412ee211 100644 --- a/variants/gat562_mesh_watch13/target.h +++ b/variants/gat562_mesh_watch13/target.h @@ -10,6 +10,8 @@ #ifdef DISPLAY_CLASS #include + #include + extern UITask ui_task; extern DISPLAY_CLASS display; #include extern MomentaryButton user_btn; diff --git a/variants/heltec_e213/platformio.ini b/variants/heltec_e213/platformio.ini index 02193819..bc9251cb 100644 --- a/variants/heltec_e213/platformio.ini +++ b/variants/heltec_e213/platformio.ini @@ -45,7 +45,7 @@ lib_deps = extends = Heltec_E213_base build_flags = ${Heltec_E213_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=E213Display @@ -57,7 +57,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_E213_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -67,7 +67,7 @@ lib_deps = extends = Heltec_E213_base build_flags = ${Heltec_E213_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=E213Display @@ -78,7 +78,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_E213_base.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_e213/target.cpp b/variants/heltec_e213/target.cpp index 6914769d..6ec3c2b2 100644 --- a/variants/heltec_e213/target.cpp +++ b/variants/heltec_e213/target.cpp @@ -20,6 +20,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display(&board.periph_power); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_e213/target.h b/variants/heltec_e213/target.h index 6f2c291b..71b62813 100644 --- a/variants/heltec_e213/target.h +++ b/variants/heltec_e213/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include +#include #endif extern HeltecE213Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_e290/platformio.ini b/variants/heltec_e290/platformio.ini index c7cd5f21..d12761f7 100644 --- a/variants/heltec_e290/platformio.ini +++ b/variants/heltec_e290/platformio.ini @@ -39,7 +39,7 @@ lib_deps = extends = Heltec_E290_base build_flags = ${Heltec_E290_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=E290Display @@ -51,7 +51,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_E290_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -61,7 +61,7 @@ lib_deps = extends = Heltec_E290_base build_flags = ${Heltec_E290_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=E290Display @@ -72,7 +72,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_E290_base.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_e290/target.cpp b/variants/heltec_e290/target.cpp index f2327954..41457ebd 100644 --- a/variants/heltec_e290/target.cpp +++ b/variants/heltec_e290/target.cpp @@ -20,6 +20,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display(&board.periph_power); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_e290/target.h b/variants/heltec_e290/target.h index d78521fc..b93e03fc 100644 --- a/variants/heltec_e290/target.h +++ b/variants/heltec_e290/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include +#include #endif extern HeltecE290Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_mesh_solar/target.cpp b/variants/heltec_mesh_solar/target.cpp index 9e7fb04d..315ddbd6 100644 --- a/variants/heltec_mesh_solar/target.cpp +++ b/variants/heltec_mesh_solar/target.cpp @@ -18,6 +18,7 @@ SolarExternalWatchdog external_watchdog; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_mesh_solar/target.h b/variants/heltec_mesh_solar/target.h index 97550a00..31ddbee0 100644 --- a/variants/heltec_mesh_solar/target.h +++ b/variants/heltec_mesh_solar/target.h @@ -11,6 +11,7 @@ #include #ifdef DISPLAY_CLASS #include + #include #endif class SolarSensorManager : public SensorManager { @@ -47,6 +48,7 @@ extern SolarExternalWatchdog external_watchdog; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_rc32/platformio.ini b/variants/heltec_rc32/platformio.ini index 2f07c021..70d51df9 100644 --- a/variants/heltec_rc32/platformio.ini +++ b/variants/heltec_rc32/platformio.ini @@ -127,7 +127,7 @@ lib_deps = extends = Heltec_RC32 build_flags = ${Heltec_RC32.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -138,7 +138,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_RC32.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -148,7 +148,7 @@ lib_deps = extends = Heltec_RC32 build_flags = ${Heltec_RC32.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -162,7 +162,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_RC32.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -172,7 +172,7 @@ lib_deps = extends = Heltec_RC32 build_flags = ${Heltec_RC32.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 @@ -188,7 +188,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_RC32.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -274,7 +274,7 @@ lib_deps = extends = Heltec_RC32_with_display build_flags = ${Heltec_RC32_with_display.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D UI_HAS_ROTARY_INPUT -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -283,7 +283,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_RC32_with_display.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -293,7 +293,7 @@ lib_deps = extends = Heltec_RC32_with_display build_flags = ${Heltec_RC32_with_display.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D UI_HAS_ROTARY_INPUT -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -305,7 +305,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_RC32_with_display.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -315,7 +315,7 @@ lib_deps = extends = Heltec_RC32_with_display build_flags = ${Heltec_RC32_with_display.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D UI_HAS_ROTARY_INPUT -D MAX_CONTACTS=350 @@ -329,7 +329,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_RC32_with_display.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_rc32/target.cpp b/variants/heltec_rc32/target.cpp index e095baab..242e1712 100644 --- a/variants/heltec_rc32/target.cpp +++ b/variants/heltec_rc32/target.cpp @@ -35,6 +35,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); static HeltecRC32RotaryInput rotaryInputImpl(&board.periph_power); RotaryInput& rotary_input = rotaryInputImpl; #endif + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_rc32/target.h b/variants/heltec_rc32/target.h index 04cb6d94..02ceca61 100644 --- a/variants/heltec_rc32/target.h +++ b/variants/heltec_rc32/target.h @@ -18,6 +18,7 @@ #else #include #endif +#include #endif extern HeltecRC32Board board; @@ -31,6 +32,7 @@ extern EnvironmentSensorManager sensors; #if defined(UI_HAS_ROTARY_INPUT) extern RotaryInput& rotary_input; #endif + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_rc52/platformio.ini b/variants/heltec_rc52/platformio.ini index d6526494..4d1b132b 100644 --- a/variants/heltec_rc52/platformio.ini +++ b/variants/heltec_rc52/platformio.ini @@ -66,7 +66,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${heltec_rc52.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -76,7 +76,7 @@ build_src_filter = ${heltec_rc52.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_rc52.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -87,7 +87,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${heltec_rc52.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -95,7 +95,7 @@ build_src_filter = ${heltec_rc52.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_rc52.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -146,7 +146,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${heltec_rc52_with_display.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D PIN_BUZZER=5 -D UI_HAS_ROTARY_INPUT -D MAX_CONTACTS=350 @@ -158,7 +158,7 @@ build_src_filter = ${heltec_rc52_with_display.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_rc52_with_display.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -170,7 +170,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${heltec_rc52_with_display.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D PIN_BUZZER=5 -D UI_HAS_ROTARY_INPUT -D MAX_CONTACTS=350 @@ -180,7 +180,7 @@ build_src_filter = ${heltec_rc52_with_display.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_rc52_with_display.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_rc52/target.cpp b/variants/heltec_rc52/target.cpp index dc5652d8..d6437dea 100644 --- a/variants/heltec_rc52/target.cpp +++ b/variants/heltec_rc52/target.cpp @@ -39,6 +39,7 @@ MomentaryButton user_btn(PIN_USER_BTN, 1000, true); static HeltecRC52RotaryInput rotaryInputImpl(&board.periph_power); RotaryInput& rotary_input = rotaryInputImpl; #endif +UITask ui_task(&board, &display); #endif bool radio_init() diff --git a/variants/heltec_rc52/target.h b/variants/heltec_rc52/target.h index efb7fdcb..0d93e929 100644 --- a/variants/heltec_rc52/target.h +++ b/variants/heltec_rc52/target.h @@ -19,6 +19,7 @@ #else #include #endif +#include #endif extern HeltecRC52Board board; @@ -32,6 +33,7 @@ extern MomentaryButton user_btn; #if defined(UI_HAS_ROTARY_INPUT) extern RotaryInput& rotary_input; #endif +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_t096/platformio.ini b/variants/heltec_t096/platformio.ini index 1f572fc9..be344629 100644 --- a/variants/heltec_t096/platformio.ini +++ b/variants/heltec_t096/platformio.ini @@ -125,7 +125,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t096.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -137,7 +137,7 @@ build_flags = build_src_filter = ${Heltec_t096.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t096.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -148,7 +148,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t096.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE @@ -159,7 +159,7 @@ build_flags = build_src_filter = ${Heltec_t096.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t096.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_t096/target.cpp b/variants/heltec_t096/target.cpp index d0c2c07e..91e5e0fc 100644 --- a/variants/heltec_t096/target.cpp +++ b/variants/heltec_t096/target.cpp @@ -33,6 +33,7 @@ EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display(&board.periph_power); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_t096/target.h b/variants/heltec_t096/target.h index 137d8db5..a71aeda1 100644 --- a/variants/heltec_t096/target.h +++ b/variants/heltec_t096/target.h @@ -14,6 +14,7 @@ #include #else #include "helpers/ui/NullDisplayDriver.h" +#include #endif extern T096Board board; @@ -24,6 +25,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_t1/platformio.ini b/variants/heltec_t1/platformio.ini index 28ed67ed..5e9ca188 100644 --- a/variants/heltec_t1/platformio.ini +++ b/variants/heltec_t1/platformio.ini @@ -62,7 +62,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t1.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -75,7 +75,7 @@ build_src_filter = ${Heltec_t1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t1.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -87,7 +87,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t1.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE @@ -97,7 +97,7 @@ build_src_filter = ${Heltec_t1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t1.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_t1/target.cpp b/variants/heltec_t1/target.cpp index 1d9c8baa..05bccae7 100644 --- a/variants/heltec_t1/target.cpp +++ b/variants/heltec_t1/target.cpp @@ -32,6 +32,7 @@ EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display(&board.periph_power); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_t1/target.h b/variants/heltec_t1/target.h index ffd9434f..57ead9c0 100644 --- a/variants/heltec_t1/target.h +++ b/variants/heltec_t1/target.h @@ -14,6 +14,7 @@ #include #else #include "helpers/ui/NullDisplayDriver.h" +#include #endif extern T1Board board; @@ -24,6 +25,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_t114/platformio.ini b/variants/heltec_t114/platformio.ini index e795bc7f..756747cc 100644 --- a/variants/heltec_t114/platformio.ini +++ b/variants/heltec_t114/platformio.ini @@ -98,7 +98,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t114.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -111,7 +111,7 @@ build_src_filter = ${Heltec_t114.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t114.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -122,7 +122,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t114.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -131,7 +131,7 @@ build_src_filter = ${Heltec_t114.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t114.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -212,7 +212,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t114_with_display.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -224,7 +224,7 @@ build_flags = build_src_filter = ${Heltec_t114_with_display.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t114_with_display.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -235,7 +235,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_t114_with_display.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE @@ -246,7 +246,7 @@ build_flags = build_src_filter = ${Heltec_t114_with_display.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_t114_with_display.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_t114/target.cpp b/variants/heltec_t114/target.cpp index dc62f83b..2f12ad42 100644 --- a/variants/heltec_t114/target.cpp +++ b/variants/heltec_t114/target.cpp @@ -32,6 +32,7 @@ EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_t114/target.h b/variants/heltec_t114/target.h index 5aac84db..d5cfd30e 100644 --- a/variants/heltec_t114/target.h +++ b/variants/heltec_t114/target.h @@ -16,6 +16,7 @@ #else #include "helpers/ui/NullDisplayDriver.h" #endif +#include #endif extern T114Board board; @@ -26,6 +27,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_t190/platformio.ini b/variants/heltec_t190/platformio.ini index 28355393..6e1f2893 100644 --- a/variants/heltec_t190/platformio.ini +++ b/variants/heltec_t190/platformio.ini @@ -52,7 +52,7 @@ lib_deps = extends = Heltec_T190_base build_flags = ${Heltec_T190_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 ; dynamic, random PIN @@ -61,7 +61,7 @@ build_flags = build_src_filter = ${Heltec_T190_base.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_T190_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -70,7 +70,7 @@ lib_deps = extends = Heltec_T190_base build_flags = ${Heltec_T190_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -78,7 +78,7 @@ build_flags = build_src_filter = ${Heltec_T190_base.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_T190_base.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_t190/target.cpp b/variants/heltec_t190/target.cpp index 6a2eab7d..24ba3825 100644 --- a/variants/heltec_t190/target.cpp +++ b/variants/heltec_t190/target.cpp @@ -20,6 +20,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_t190/target.h b/variants/heltec_t190/target.h index cde63220..97828dbf 100644 --- a/variants/heltec_t190/target.h +++ b/variants/heltec_t190/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include +#include #endif extern HeltecT190Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_tower_v2/platformio.ini b/variants/heltec_tower_v2/platformio.ini index 207e0a50..45791ae7 100644 --- a/variants/heltec_tower_v2/platformio.ini +++ b/variants/heltec_tower_v2/platformio.ini @@ -59,7 +59,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_tower_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -72,7 +72,7 @@ build_src_filter = ${Heltec_tower_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_tower_v2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -83,7 +83,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Heltec_tower_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -96,7 +96,7 @@ build_src_filter = ${Heltec_tower_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_tower_v2.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_tower_v2/target.cpp b/variants/heltec_tower_v2/target.cpp index ae627a0b..df4dbea1 100644 --- a/variants/heltec_tower_v2/target.cpp +++ b/variants/heltec_tower_v2/target.cpp @@ -20,6 +20,7 @@ TowerV2ExternalWatchdog external_watchdog; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_tower_v2/target.h b/variants/heltec_tower_v2/target.h index 0b9de40c..b0c0acee 100644 --- a/variants/heltec_tower_v2/target.h +++ b/variants/heltec_tower_v2/target.h @@ -13,6 +13,7 @@ #ifdef DISPLAY_CLASS #include #include "helpers/ui/NullDisplayDriver.h" +#include #endif class TowerV2ExternalWatchdog : public ExternalWatchdogManager { @@ -33,6 +34,7 @@ extern TowerV2ExternalWatchdog external_watchdog; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_tracker/platformio.ini b/variants/heltec_tracker/platformio.ini index 3affd8ae..ec5df6c3 100644 --- a/variants/heltec_tracker/platformio.ini +++ b/variants/heltec_tracker/platformio.ini @@ -54,7 +54,7 @@ extends = Heltec_tracker_base build_flags = ${Heltec_tracker_base.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_ROTATION=1 -D DISPLAY_CLASS=ST7735Display -D MAX_CONTACTS=350 @@ -69,7 +69,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + + lib_deps = ${Heltec_tracker_base.lib_deps} @@ -80,7 +80,7 @@ extends = Heltec_tracker_base build_flags = ${Heltec_tracker_base.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_ROTATION=1 -D DISPLAY_CLASS=ST7735Display -D MAX_CONTACTS=350 @@ -94,7 +94,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + + lib_deps = ${Heltec_tracker_base.lib_deps} diff --git a/variants/heltec_tracker/target.cpp b/variants/heltec_tracker/target.cpp index 67f98306..e8208a78 100644 --- a/variants/heltec_tracker/target.cpp +++ b/variants/heltec_tracker/target.cpp @@ -41,6 +41,7 @@ HWTSensorManager sensors = HWTSensorManager(nmea); #ifdef DISPLAY_CLASS DISPLAY_CLASS display(&board.periph_power); // peripheral power pin is shared MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_tracker/target.h b/variants/heltec_tracker/target.h index f6fea637..d369a2ed 100644 --- a/variants/heltec_tracker/target.h +++ b/variants/heltec_tracker/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif class HWTSensorManager : public SensorManager { @@ -38,6 +39,7 @@ extern HWTSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_tracker_v2/platformio.ini b/variants/heltec_tracker_v2/platformio.ini index 5fd9edab..0192a048 100644 --- a/variants/heltec_tracker_v2/platformio.ini +++ b/variants/heltec_tracker_v2/platformio.ini @@ -136,7 +136,7 @@ lib_deps = extends = Heltec_tracker_v2 build_flags = ${Heltec_tracker_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=ST7735Display @@ -147,7 +147,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_tracker_v2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -156,7 +156,7 @@ lib_deps = extends = Heltec_tracker_v2 build_flags = ${Heltec_tracker_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=ST7735Display @@ -172,7 +172,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_tracker_v2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -181,7 +181,7 @@ lib_deps = extends = Heltec_tracker_v2 build_flags = ${Heltec_tracker_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -198,7 +198,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_tracker_v2.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_tracker_v2/target.cpp b/variants/heltec_tracker_v2/target.cpp index 12b01bcc..1472979f 100644 --- a/variants/heltec_tracker_v2/target.cpp +++ b/variants/heltec_tracker_v2/target.cpp @@ -28,6 +28,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display(&board.periph_power); // peripheral power pin is shared MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_tracker_v2/target.h b/variants/heltec_tracker_v2/target.h index 240d9d4c..1e4b0f04 100644 --- a/variants/heltec_tracker_v2/target.h +++ b/variants/heltec_tracker_v2/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern HeltecTrackerV2Board board; @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_v2/platformio.ini b/variants/heltec_v2/platformio.ini index 6435936e..ab38578e 100644 --- a/variants/heltec_v2/platformio.ini +++ b/variants/heltec_v2/platformio.ini @@ -133,7 +133,7 @@ lib_deps = extends = Heltec_lora32_v2 build_flags = ${Heltec_lora32_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 @@ -145,7 +145,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_lora32_v2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -154,7 +154,7 @@ lib_deps = extends = Heltec_lora32_v2 build_flags = ${Heltec_lora32_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 @@ -168,7 +168,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_lora32_v2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -177,7 +177,7 @@ lib_deps = extends = Heltec_lora32_v2 build_flags = ${Heltec_lora32_v2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=160 @@ -194,7 +194,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_lora32_v2.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_v2/target.cpp b/variants/heltec_v2/target.cpp index 585b0a37..30cdb7cf 100644 --- a/variants/heltec_v2/target.cpp +++ b/variants/heltec_v2/target.cpp @@ -19,6 +19,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_v2/target.h b/variants/heltec_v2/target.h index cdffc18a..cf2ca366 100644 --- a/variants/heltec_v2/target.h +++ b/variants/heltec_v2/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern HeltecV2Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index 95629b41..bb106487 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -65,6 +65,7 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"RS232 Bridge"' -D ADVERT_LAT=0.0 diff --git a/variants/heltec_v4/platformio.ini b/variants/heltec_v4/platformio.ini index 69ac9ad8..772293a7 100644 --- a/variants/heltec_v4/platformio.ini +++ b/variants/heltec_v4/platformio.ini @@ -183,7 +183,7 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -194,7 +194,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_oled.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -203,7 +203,7 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -221,7 +221,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_oled.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -230,7 +230,7 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D ENABLE_ESP_MDNS -D MAX_CONTACTS=350 @@ -248,7 +248,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_oled.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -354,7 +354,7 @@ lib_deps = extends = heltec_v4_tft build_flags = ${heltec_v4_tft.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=ST7789LCDDisplay @@ -365,7 +365,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_tft.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -374,7 +374,7 @@ lib_deps = extends = heltec_v4_tft build_flags = ${heltec_v4_tft.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=ST7789LCDDisplay -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -391,7 +391,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_tft.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -400,7 +400,7 @@ lib_deps = extends = heltec_v4_tft build_flags = ${heltec_v4_tft.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -417,7 +417,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_tft.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_v4/target.cpp b/variants/heltec_v4/target.cpp index 0f87c6b3..b562b738 100644 --- a/variants/heltec_v4/target.cpp +++ b/variants/heltec_v4/target.cpp @@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display(NULL); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_v4/target.h b/variants/heltec_v4/target.h index 5d668186..9e3defb6 100644 --- a/variants/heltec_v4/target.h +++ b/variants/heltec_v4/target.h @@ -15,6 +15,7 @@ #include #endif #include + #include #endif extern HeltecV4Board board; @@ -25,6 +26,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_v4_r8/platformio.ini b/variants/heltec_v4_r8/platformio.ini index e22ca8f5..6c39b507 100644 --- a/variants/heltec_v4_r8/platformio.ini +++ b/variants/heltec_v4_r8/platformio.ini @@ -134,7 +134,7 @@ lib_deps = extends = heltec_v4_r8_oled build_flags = ${heltec_v4_r8_oled.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -143,7 +143,7 @@ build_src_filter = ${heltec_v4_r8_oled.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_r8_oled.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -152,7 +152,7 @@ lib_deps = extends = heltec_v4_r8_oled build_flags = ${heltec_v4_r8_oled.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -167,7 +167,7 @@ build_src_filter = ${heltec_v4_r8_oled.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_r8_oled.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -176,7 +176,7 @@ lib_deps = extends = heltec_v4_r8_oled build_flags = ${heltec_v4_r8_oled.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -191,7 +191,7 @@ build_src_filter = ${heltec_v4_r8_oled.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_r8_oled.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -263,7 +263,7 @@ lib_deps = extends = heltec_v4_r8_tft build_flags = ${heltec_v4_r8_tft.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=ST7789LCDDisplay @@ -272,7 +272,7 @@ build_src_filter = ${heltec_v4_r8_tft.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_r8_tft.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -281,7 +281,7 @@ lib_deps = extends = heltec_v4_r8_tft build_flags = ${heltec_v4_r8_tft.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=ST7789LCDDisplay -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -294,7 +294,7 @@ build_src_filter = ${heltec_v4_r8_tft.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_r8_tft.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -303,7 +303,7 @@ lib_deps = extends = heltec_v4_r8_tft build_flags = ${heltec_v4_r8_tft.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -318,7 +318,7 @@ build_src_filter = ${heltec_v4_r8_tft.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${heltec_v4_r8_tft.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_v4_r8/target.cpp b/variants/heltec_v4_r8/target.cpp index 27e9f468..0e045667 100644 --- a/variants/heltec_v4_r8/target.cpp +++ b/variants/heltec_v4_r8/target.cpp @@ -28,6 +28,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display(&board.periph_power); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_v4_r8/target.h b/variants/heltec_v4_r8/target.h index 2d1d7a5b..d7555d93 100644 --- a/variants/heltec_v4_r8/target.h +++ b/variants/heltec_v4_r8/target.h @@ -15,6 +15,7 @@ #include #endif #include + #include #endif extern HeltecV4R8Board board; @@ -25,6 +26,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/heltec_wireless_paper/platformio.ini b/variants/heltec_wireless_paper/platformio.ini index 56f95b2f..fea00c2c 100644 --- a/variants/heltec_wireless_paper/platformio.ini +++ b/variants/heltec_wireless_paper/platformio.ini @@ -47,7 +47,7 @@ lib_deps = extends = Heltec_Wireless_Paper_base build_flags = ${Heltec_Wireless_Paper_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=E213Display @@ -60,7 +60,7 @@ build_src_filter = ${Heltec_Wireless_Paper_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_Wireless_Paper_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -70,7 +70,7 @@ lib_deps = extends = Heltec_Wireless_Paper_base build_flags = ${Heltec_Wireless_Paper_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=E213Display @@ -80,7 +80,7 @@ build_src_filter = ${Heltec_Wireless_Paper_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Heltec_Wireless_Paper_base.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/heltec_wireless_paper/target.cpp b/variants/heltec_wireless_paper/target.cpp index be21695e..41e353ef 100644 --- a/variants/heltec_wireless_paper/target.cpp +++ b/variants/heltec_wireless_paper/target.cpp @@ -20,6 +20,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/heltec_wireless_paper/target.h b/variants/heltec_wireless_paper/target.h index 72066781..c272a2f0 100644 --- a/variants/heltec_wireless_paper/target.h +++ b/variants/heltec_wireless_paper/target.h @@ -16,6 +16,7 @@ public: #ifdef DISPLAY_CLASS #include #include +#include #endif extern HeltecWirelessPaperBoard board; @@ -26,6 +27,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/ikoka_handheld_nrf/platformio.ini b/variants/ikoka_handheld_nrf/platformio.ini index 1c6f17c2..40e20d70 100644 --- a/variants/ikoka_handheld_nrf/platformio.ini +++ b/variants/ikoka_handheld_nrf/platformio.ini @@ -44,7 +44,7 @@ build_flags = ${ikoka_handheld_nrf.build_flags} -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 -D QSPIFLASH=1 - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new build_src_filter = ${ikoka_handheld_nrf.build_src_filter} + +<../examples/companion_radio/ui-new/UITask.cpp> diff --git a/variants/ikoka_handheld_nrf/target.cpp b/variants/ikoka_handheld_nrf/target.cpp index 6c53c5e3..561e19bd 100644 --- a/variants/ikoka_handheld_nrf/target.cpp +++ b/variants/ikoka_handheld_nrf/target.cpp @@ -16,6 +16,7 @@ EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true); + UITask ui_task(&board, &display); #endif diff --git a/variants/ikoka_handheld_nrf/target.h b/variants/ikoka_handheld_nrf/target.h index 18f7c9c5..d071259c 100644 --- a/variants/ikoka_handheld_nrf/target.h +++ b/variants/ikoka_handheld_nrf/target.h @@ -12,8 +12,11 @@ #ifdef DISPLAY_CLASS #include #include + #include + extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif diff --git a/variants/ikoka_nano_nrf/platformio.ini b/variants/ikoka_nano_nrf/platformio.ini index 87c6240e..b65dc035 100644 --- a/variants/ikoka_nano_nrf/platformio.ini +++ b/variants/ikoka_nano_nrf/platformio.ini @@ -82,7 +82,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D OFFLINE_QUEUE_SIZE=256 - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D QSPIFLASH=1 ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 @@ -90,7 +90,7 @@ build_flags = build_src_filter = ${ikoka_nano_nrf.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ikoka_nano_nrf.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -103,7 +103,7 @@ build_flags = ${ikoka_nano_nrf.build_flags} -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D QSPIFLASH=1 -D ENABLE_USB_INTERFACE ; -D MESH_PACKET_LOGGING=1 @@ -111,7 +111,7 @@ build_flags = build_src_filter = ${ikoka_nano_nrf.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ikoka_nano_nrf.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/ikoka_nano_nrf/target.cpp b/variants/ikoka_nano_nrf/target.cpp index baf02c3d..9058cf86 100644 --- a/variants/ikoka_nano_nrf/target.cpp +++ b/variants/ikoka_nano_nrf/target.cpp @@ -7,6 +7,7 @@ IkokaNanoNRFBoard board; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; // MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI); diff --git a/variants/ikoka_nano_nrf/target.h b/variants/ikoka_nano_nrf/target.h index 30ee5cb6..006bd738 100644 --- a/variants/ikoka_nano_nrf/target.h +++ b/variants/ikoka_nano_nrf/target.h @@ -12,8 +12,11 @@ #ifdef DISPLAY_CLASS #include #include + #include + extern DISPLAY_CLASS display; // extern MomentaryButton user_btn; + extern UITask ui_task; #endif extern IkokaNanoNRFBoard board; diff --git a/variants/ikoka_stick_nrf/platformio.ini b/variants/ikoka_stick_nrf/platformio.ini index c8184fc4..b108c066 100644 --- a/variants/ikoka_stick_nrf/platformio.ini +++ b/variants/ikoka_stick_nrf/platformio.ini @@ -88,7 +88,7 @@ build_flags = -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D OFFLINE_QUEUE_SIZE=256 - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D QSPIFLASH=1 ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 @@ -96,7 +96,7 @@ build_flags = build_src_filter = ${ikoka_stick_nrf.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ikoka_stick_nrf.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -109,7 +109,7 @@ build_flags = ${ikoka_stick_nrf.build_flags} -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D QSPIFLASH=1 -D ENABLE_USB_INTERFACE ; -D MESH_PACKET_LOGGING=1 @@ -117,7 +117,7 @@ build_flags = build_src_filter = ${ikoka_stick_nrf.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ikoka_stick_nrf.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/ikoka_stick_nrf/target.cpp b/variants/ikoka_stick_nrf/target.cpp index bb140505..9b3d4718 100644 --- a/variants/ikoka_stick_nrf/target.cpp +++ b/variants/ikoka_stick_nrf/target.cpp @@ -7,6 +7,7 @@ IkokaStickNRFBoard board; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI); diff --git a/variants/ikoka_stick_nrf/target.h b/variants/ikoka_stick_nrf/target.h index 46b05e8b..792f3e3e 100644 --- a/variants/ikoka_stick_nrf/target.h +++ b/variants/ikoka_stick_nrf/target.h @@ -12,8 +12,11 @@ #ifdef DISPLAY_CLASS #include #include + #include + extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif extern IkokaStickNRFBoard board; diff --git a/variants/keepteen_lt1/platformio.ini b/variants/keepteen_lt1/platformio.ini index 11dc214b..cfc71050 100644 --- a/variants/keepteen_lt1/platformio.ini +++ b/variants/keepteen_lt1/platformio.ini @@ -62,7 +62,7 @@ extends = KeepteenLT1 board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${KeepteenLT1.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -73,7 +73,7 @@ build_src_filter = ${KeepteenLT1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${KeepteenLT1.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 @@ -83,7 +83,7 @@ extends = KeepteenLT1 board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${KeepteenLT1.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -97,7 +97,7 @@ build_src_filter = ${KeepteenLT1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${KeepteenLT1.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 diff --git a/variants/keepteen_lt1/target.cpp b/variants/keepteen_lt1/target.cpp index dd7c6741..0436f7e2 100644 --- a/variants/keepteen_lt1/target.cpp +++ b/variants/keepteen_lt1/target.cpp @@ -22,6 +22,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/keepteen_lt1/target.h b/variants/keepteen_lt1/target.h index 5b73bb66..e8f67ebd 100644 --- a/variants/keepteen_lt1/target.h +++ b/variants/keepteen_lt1/target.h @@ -9,6 +9,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif #include @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_t3_stm32/platformio.ini b/variants/lilygo_t3_stm32/platformio.ini index 39e059b7..33ca0b40 100644 --- a/variants/lilygo_t3_stm32/platformio.ini +++ b/variants/lilygo_t3_stm32/platformio.ini @@ -41,13 +41,13 @@ build_src_filter = ${lilygo_t3_stm32.build_src_filter} [env:LilyGo_T3_STM32_companion_radio_usb] extends = lilygo_t3_stm32 build_flags = ${lilygo_t3_stm32.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=100 -D MAX_GROUP_CHANNELS=8 -D ENABLE_USB_INTERFACE build_src_filter = ${lilygo_t3_stm32.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${lilygo_t3_stm32.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_t3s3/platformio.ini b/variants/lilygo_t3s3/platformio.ini index 966235c6..d186c99d 100644 --- a/variants/lilygo_t3s3/platformio.ini +++ b/variants/lilygo_t3s3/platformio.ini @@ -136,7 +136,7 @@ lib_deps = extends = LilyGo_T3S3_sx1262 build_flags = ${LilyGo_T3S3_sx1262.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -147,7 +147,7 @@ build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T3S3_sx1262.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -156,7 +156,7 @@ lib_deps = extends = LilyGo_T3S3_sx1262 build_flags = ${LilyGo_T3S3_sx1262.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -170,7 +170,7 @@ build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T3S3_sx1262.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_t3s3/target.cpp b/variants/lilygo_t3s3/target.cpp index 34df31c3..8c02015e 100644 --- a/variants/lilygo_t3s3/target.cpp +++ b/variants/lilygo_t3s3/target.cpp @@ -14,6 +14,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/lilygo_t3s3/target.h b/variants/lilygo_t3s3/target.h index 965cdd1a..224acd84 100644 --- a/variants/lilygo_t3s3/target.h +++ b/variants/lilygo_t3s3/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ESP32Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_t3s3_sx1276/platformio.ini b/variants/lilygo_t3s3_sx1276/platformio.ini index c6497dcb..b71f02f6 100644 --- a/variants/lilygo_t3s3_sx1276/platformio.ini +++ b/variants/lilygo_t3s3_sx1276/platformio.ini @@ -134,7 +134,7 @@ extends = LilyGo_T3S3_sx1276 upload_speed = 115200 build_flags = ${LilyGo_T3S3_sx1276.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -143,7 +143,7 @@ build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T3S3_sx1276.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -152,7 +152,7 @@ lib_deps = extends = LilyGo_T3S3_sx1276 build_flags = ${LilyGo_T3S3_sx1276.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -166,7 +166,7 @@ build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T3S3_sx1276.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_t3s3_sx1276/target.cpp b/variants/lilygo_t3s3_sx1276/target.cpp index 770db4a7..7a4d3e8f 100644 --- a/variants/lilygo_t3s3_sx1276/target.cpp +++ b/variants/lilygo_t3s3_sx1276/target.cpp @@ -19,6 +19,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_t3s3_sx1276/target.h b/variants/lilygo_t3s3_sx1276/target.h index c5fbff62..e1c400db 100644 --- a/variants/lilygo_t3s3_sx1276/target.h +++ b/variants/lilygo_t3s3_sx1276/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern LilygoT3S3SX1276Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_t_impulse_plus/platformio.ini b/variants/lilygo_t_impulse_plus/platformio.ini index 0ed5b9a4..8fd01b1f 100644 --- a/variants/lilygo_t_impulse_plus/platformio.ini +++ b/variants/lilygo_t_impulse_plus/platformio.ini @@ -49,7 +49,7 @@ extends = LilyGo_T_Impulse_Plus build_flags = ${LilyGo_T_Impulse_Plus.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -62,7 +62,7 @@ build_flags = build_src_filter = ${LilyGo_T_Impulse_Plus.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T_Impulse_Plus.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_t_impulse_plus/target.cpp b/variants/lilygo_t_impulse_plus/target.cpp index b6b0c82c..53474976 100644 --- a/variants/lilygo_t_impulse_plus/target.cpp +++ b/variants/lilygo_t_impulse_plus/target.cpp @@ -23,6 +23,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_t_impulse_plus/target.h b/variants/lilygo_t_impulse_plus/target.h index ff168fbe..89bb7efe 100644 --- a/variants/lilygo_t_impulse_plus/target.h +++ b/variants/lilygo_t_impulse_plus/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern TImpulsePlusBoard board; @@ -20,6 +21,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_tbeam_1w/platformio.ini b/variants/lilygo_tbeam_1w/platformio.ini index ab9c9e67..74d180ba 100644 --- a/variants/lilygo_tbeam_1w/platformio.ini +++ b/variants/lilygo_tbeam_1w/platformio.ini @@ -109,7 +109,7 @@ lib_deps = extends = LilyGo_TBeam_1W build_flags = ${LilyGo_TBeam_1W.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D PERSISTANT_GPS=1 @@ -119,7 +119,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_1W.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TBeam_1W.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -129,7 +129,7 @@ lib_deps = extends = LilyGo_TBeam_1W build_flags = ${LilyGo_TBeam_1W.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -142,7 +142,7 @@ build_flags = build_src_filter = ${LilyGo_TBeam_1W.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TBeam_1W.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -152,7 +152,7 @@ lib_deps = extends = LilyGo_TBeam_1W build_flags = ${LilyGo_TBeam_1W.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -168,7 +168,7 @@ build_src_filter = ${LilyGo_TBeam_1W.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TBeam_1W.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_tbeam_1w/target.cpp b/variants/lilygo_tbeam_1w/target.cpp index db11747f..89f56610 100644 --- a/variants/lilygo_tbeam_1w/target.cpp +++ b/variants/lilygo_tbeam_1w/target.cpp @@ -6,6 +6,7 @@ TBeam1WBoard board; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif static SPIClass spi; diff --git a/variants/lilygo_tbeam_1w/target.h b/variants/lilygo_tbeam_1w/target.h index d6cd61b4..edf8bca0 100644 --- a/variants/lilygo_tbeam_1w/target.h +++ b/variants/lilygo_tbeam_1w/target.h @@ -11,8 +11,11 @@ #ifdef DISPLAY_CLASS #include #include + #include + extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif extern TBeam1WBoard board; diff --git a/variants/lilygo_tbeam_SX1262/platformio.ini b/variants/lilygo_tbeam_SX1262/platformio.ini index 62ac09f8..650b630c 100644 --- a/variants/lilygo_tbeam_SX1262/platformio.ini +++ b/variants/lilygo_tbeam_SX1262/platformio.ini @@ -45,7 +45,7 @@ extends = LilyGo_TBeam_SX1262 board_build.upload.maximum_ram_size=2000000 build_flags = ${LilyGo_TBeam_SX1262.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 -D BLE_PIN_CODE=123456 @@ -60,7 +60,7 @@ build_src_filter = ${LilyGo_TBeam_SX1262.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TBeam_SX1262.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_tbeam_SX1262/target.cpp b/variants/lilygo_tbeam_SX1262/target.cpp index b97dda41..ec9b0e93 100644 --- a/variants/lilygo_tbeam_SX1262/target.cpp +++ b/variants/lilygo_tbeam_SX1262/target.cpp @@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_tbeam_SX1262/target.h b/variants/lilygo_tbeam_SX1262/target.h index c532a73a..109a57bb 100644 --- a/variants/lilygo_tbeam_SX1262/target.h +++ b/variants/lilygo_tbeam_SX1262/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern TBeamBoard board; @@ -20,6 +21,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_tbeam_SX1276/platformio.ini b/variants/lilygo_tbeam_SX1276/platformio.ini index f5f49047..ebfbaa3f 100644 --- a/variants/lilygo_tbeam_SX1276/platformio.ini +++ b/variants/lilygo_tbeam_SX1276/platformio.ini @@ -43,7 +43,7 @@ extends = LilyGo_TBeam_SX1276 board_build.upload.maximum_ram_size=2000000 build_flags = ${LilyGo_TBeam_SX1276.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -56,7 +56,7 @@ build_src_filter = ${LilyGo_TBeam_SX1276.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TBeam_SX1276.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_tbeam_SX1276/target.cpp b/variants/lilygo_tbeam_SX1276/target.cpp index be7c8287..061a9260 100644 --- a/variants/lilygo_tbeam_SX1276/target.cpp +++ b/variants/lilygo_tbeam_SX1276/target.cpp @@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_tbeam_SX1276/target.h b/variants/lilygo_tbeam_SX1276/target.h index 0d56f88f..aa609966 100644 --- a/variants/lilygo_tbeam_SX1276/target.h +++ b/variants/lilygo_tbeam_SX1276/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern LilygoTBeamSX1276Board board; @@ -20,6 +21,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_tbeam_supreme_SX1262/platformio.ini b/variants/lilygo_tbeam_supreme_SX1262/platformio.ini index 18a82802..d57dcaea 100644 --- a/variants/lilygo_tbeam_supreme_SX1262/platformio.ini +++ b/variants/lilygo_tbeam_supreme_SX1262/platformio.ini @@ -126,7 +126,7 @@ lib_deps = extends = T_Beam_S3_Supreme_SX1262 build_flags = ${T_Beam_S3_Supreme_SX1262.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -140,7 +140,7 @@ build_src_filter = ${T_Beam_S3_Supreme_SX1262.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${T_Beam_S3_Supreme_SX1262.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -149,7 +149,7 @@ lib_deps = extends = T_Beam_S3_Supreme_SX1262 build_flags = ${T_Beam_S3_Supreme_SX1262.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -166,7 +166,7 @@ build_src_filter = ${T_Beam_S3_Supreme_SX1262.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${T_Beam_S3_Supreme_SX1262.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_tbeam_supreme_SX1262/target.cpp b/variants/lilygo_tbeam_supreme_SX1262/target.cpp index 86b9116c..02b39b46 100644 --- a/variants/lilygo_tbeam_supreme_SX1262/target.cpp +++ b/variants/lilygo_tbeam_supreme_SX1262/target.cpp @@ -6,6 +6,7 @@ TBeamBoard board; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif static SPIClass spi; diff --git a/variants/lilygo_tbeam_supreme_SX1262/target.h b/variants/lilygo_tbeam_supreme_SX1262/target.h index 25caa711..b2c8b936 100644 --- a/variants/lilygo_tbeam_supreme_SX1262/target.h +++ b/variants/lilygo_tbeam_supreme_SX1262/target.h @@ -13,6 +13,8 @@ extern DISPLAY_CLASS display; #include extern MomentaryButton user_btn; + #include + extern UITask ui_task; #endif extern TBeamBoard board; diff --git a/variants/lilygo_tdeck/platformio.ini b/variants/lilygo_tdeck/platformio.ini index 00571db9..83631c30 100644 --- a/variants/lilygo_tdeck/platformio.ini +++ b/variants/lilygo_tdeck/platformio.ini @@ -67,7 +67,7 @@ lib_deps = extends = LilyGo_TDeck build_flags = ${LilyGo_TDeck.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -76,7 +76,7 @@ build_src_filter = ${LilyGo_TDeck.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TDeck.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -85,7 +85,7 @@ lib_deps = extends = LilyGo_TDeck build_flags = ${LilyGo_TDeck.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -94,7 +94,7 @@ build_src_filter = ${LilyGo_TDeck.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TDeck.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_tdeck/target.cpp b/variants/lilygo_tdeck/target.cpp index 4084a73b..74026a26 100644 --- a/variants/lilygo_tdeck/target.cpp +++ b/variants/lilygo_tdeck/target.cpp @@ -21,6 +21,7 @@ EnvironmentSensorManager sensors(gps); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_tdeck/target.h b/variants/lilygo_tdeck/target.h index 9d35af9b..5e52afdf 100644 --- a/variants/lilygo_tdeck/target.h +++ b/variants/lilygo_tdeck/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif #include "helpers/sensors/EnvironmentSensorManager.h" #include "helpers/sensors/MicroNMEALocationProvider.h" @@ -22,6 +23,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_techo/platformio.ini b/variants/lilygo_techo/platformio.ini index 2c2a3e43..db47ef38 100644 --- a/variants/lilygo_techo/platformio.ini +++ b/variants/lilygo_techo/platformio.ini @@ -92,7 +92,7 @@ board_upload.maximum_size = 712704 build_flags = ${LilyGo_T-Echo.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D EINK_REFRESH_LOOP -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -108,7 +108,7 @@ build_flags = build_src_filter = ${LilyGo_T-Echo.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T-Echo.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -120,7 +120,7 @@ board_upload.maximum_size = 712704 build_flags = ${LilyGo_T-Echo.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D EINK_REFRESH_LOOP -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -131,7 +131,7 @@ build_flags = -D ENABLE_USB_INTERFACE build_src_filter = ${LilyGo_T-Echo.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T-Echo.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_techo/target.cpp b/variants/lilygo_techo/target.cpp index 394d79c5..6cb6a69f 100644 --- a/variants/lilygo_techo/target.cpp +++ b/variants/lilygo_techo/target.cpp @@ -25,6 +25,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_techo/target.h b/variants/lilygo_techo/target.h index a1668f03..dea948fe 100644 --- a/variants/lilygo_techo/target.h +++ b/variants/lilygo_techo/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern TechoBoard board; @@ -23,6 +24,7 @@ extern EnvironmentSensorManager sensors; extern DISPLAY_CLASS display; extern MomentaryButton user_btn; extern MomentaryButton backlight_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_techo_lite/platformio.ini b/variants/lilygo_techo_lite/platformio.ini index 2a92eb9b..37790dec 100644 --- a/variants/lilygo_techo_lite/platformio.ini +++ b/variants/lilygo_techo_lite/platformio.ini @@ -78,7 +78,7 @@ board_upload.maximum_size = 712704 build_flags = ${LilyGo_T-Echo-Lite.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ; -D QSPIFLASH=1 @@ -93,7 +93,7 @@ build_flags = build_src_filter = ${LilyGo_T-Echo-Lite.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T-Echo-Lite.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -109,7 +109,7 @@ board_upload.maximum_size = 712704 build_flags = ${LilyGo_T-Echo-Lite.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -119,7 +119,7 @@ build_flags = ; -D QSPIFLASH=1 build_src_filter = ${LilyGo_T-Echo-Lite.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_T-Echo-Lite.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -136,7 +136,7 @@ build_flags = -I lib/nrf52/s140_nrf52_6.1.1_API/include -I lib/nrf52/s140_nrf52_6.1.1_API/include/nrf52 -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D LILYGO_TECHO -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper @@ -181,7 +181,7 @@ build_flags = -I lib/nrf52/s140_nrf52_6.1.1_API/include -I lib/nrf52/s140_nrf52_6.1.1_API/include/nrf52 -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D LILYGO_TECHO -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper diff --git a/variants/lilygo_techo_lite/target.cpp b/variants/lilygo_techo_lite/target.cpp index 6d199fff..1fd0b622 100644 --- a/variants/lilygo_techo_lite/target.cpp +++ b/variants/lilygo_techo_lite/target.cpp @@ -23,6 +23,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_techo_lite/target.h b/variants/lilygo_techo_lite/target.h index 2b8a1783..b0cdcf4e 100644 --- a/variants/lilygo_techo_lite/target.h +++ b/variants/lilygo_techo_lite/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern TechoBoard board; @@ -22,6 +23,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/lilygo_tlora_v2_1/platformio.ini b/variants/lilygo_tlora_v2_1/platformio.ini index dc60b6f7..2e69c5da 100644 --- a/variants/lilygo_tlora_v2_1/platformio.ini +++ b/variants/lilygo_tlora_v2_1/platformio.ini @@ -74,7 +74,7 @@ lib_deps = extends = LilyGo_TLora_V2_1_1_6 build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 -D ENABLE_USB_INTERFACE @@ -83,7 +83,7 @@ build_flags = build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TLora_V2_1_1_6.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -92,7 +92,7 @@ lib_deps = extends = LilyGo_TLora_V2_1_1_6 build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 -D BLE_PIN_CODE=123456 @@ -104,7 +104,7 @@ build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TLora_V2_1_1_6.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -131,7 +131,7 @@ lib_deps = extends = LilyGo_TLora_V2_1_1_6 build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=160 -D MAX_GROUP_CHANNELS=8 @@ -144,7 +144,7 @@ build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${LilyGo_TLora_V2_1_1_6.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/lilygo_tlora_v2_1/target.cpp b/variants/lilygo_tlora_v2_1/target.cpp index 8c120161..9b02845a 100644 --- a/variants/lilygo_tlora_v2_1/target.cpp +++ b/variants/lilygo_tlora_v2_1/target.cpp @@ -15,6 +15,7 @@ EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/lilygo_tlora_v2_1/target.h b/variants/lilygo_tlora_v2_1/target.h index fa954b32..7d109c45 100644 --- a/variants/lilygo_tlora_v2_1/target.h +++ b/variants/lilygo_tlora_v2_1/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern LilyGoTLoraBoard board; @@ -20,6 +21,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/mesh_pocket/platformio.ini b/variants/mesh_pocket/platformio.ini index a6f823db..78edbab5 100644 --- a/variants/mesh_pocket/platformio.ini +++ b/variants/mesh_pocket/platformio.ini @@ -24,6 +24,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + +<../variants/mesh_pocket> + + + lib_deps = ${nrf52_base.lib_deps} adafruit/Adafruit EPD @ 4.6.1 @@ -38,8 +39,10 @@ upload_protocol = nrfutil extends = Mesh_pocket build_src_filter = ${Mesh_pocket.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${Mesh_pocket.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_Mesh_Pocket Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -52,8 +55,10 @@ build_flags = extends = Mesh_pocket build_src_filter = ${Mesh_pocket.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${Mesh_pocket.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_Mesh_Pocket Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -68,7 +73,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Mesh_pocket.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -77,11 +82,10 @@ build_flags = ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 - build_src_filter = ${Mesh_pocket.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Mesh_pocket.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -92,7 +96,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Mesh_pocket.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D AUTO_OFF_MILLIS=0 @@ -104,12 +108,15 @@ build_flags = build_src_filter = ${Mesh_pocket.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Mesh_pocket.lib_deps} densaugeo/base64 @ ~1.4.0 [env:Mesh_pocket_kiss_modem] extends = Mesh_pocket +build_flags = + ${Mesh_pocket.build_flags} + -U DISPLAY_CLASS build_src_filter = ${Mesh_pocket.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/mesh_pocket/target.cpp b/variants/mesh_pocket/target.cpp index ee8f944d..47ad2de3 100644 --- a/variants/mesh_pocket/target.cpp +++ b/variants/mesh_pocket/target.cpp @@ -17,6 +17,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/mesh_pocket/target.h b/variants/mesh_pocket/target.h index 244fe7d2..466d9a70 100644 --- a/variants/mesh_pocket/target.h +++ b/variants/mesh_pocket/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include +#include #endif extern HeltecMeshPocket board; @@ -21,6 +22,7 @@ extern AutoDiscoverRTCClock rtc_clock; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/meshadventurer/platformio.ini b/variants/meshadventurer/platformio.ini index 5e35251c..b4ec065a 100644 --- a/variants/meshadventurer/platformio.ini +++ b/variants/meshadventurer/platformio.ini @@ -30,6 +30,7 @@ build_src_filter = ${esp32_base.build_src_filter} +<../variants/meshadventurer> + + + + lib_deps = ${esp32_base.lib_deps} stevemarple/MicroNMEA @ ^2.0.6 @@ -39,8 +40,10 @@ lib_deps = extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${Meshadventurer.build_flags} + -I src/helpers/ui/server -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper -D LORA_TX_POWER=22 @@ -85,8 +88,10 @@ extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} + +<../examples/simple_repeater> + + build_flags = ${Meshadventurer.build_flags} + -I src/helpers/ui/server -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper -D LORA_TX_POWER=22 @@ -107,8 +112,10 @@ lib_deps = extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${Meshadventurer.build_flags} + -I src/helpers/ui/server -D RADIO_CLASS=CustomSX1268 -D WRAPPER_CLASS=CustomSX1268Wrapper -D LORA_TX_POWER=22 @@ -154,8 +161,10 @@ extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} + +<../examples/simple_repeater> + + build_flags = ${Meshadventurer.build_flags} + -I src/helpers/ui/server -D RADIO_CLASS=CustomSX1268 -D WRAPPER_CLASS=CustomSX1268Wrapper -D LORA_TX_POWER=22 @@ -176,10 +185,10 @@ lib_deps = extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + build_flags = ${Meshadventurer.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper -D LORA_TX_POWER=22 @@ -198,10 +207,10 @@ extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + build_flags = ${Meshadventurer.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper -D LORA_TX_POWER=22 @@ -237,6 +246,7 @@ lib_deps = extends = Meshadventurer build_flags = ${Meshadventurer.build_flags} + -I src/helpers/ui/server -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper -D LORA_TX_POWER=22 @@ -249,6 +259,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Meshadventurer.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${Meshadventurer.lib_deps} ${esp32_ota.lib_deps} @@ -257,10 +268,10 @@ lib_deps = extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + build_flags = ${Meshadventurer.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D RADIO_CLASS=CustomSX1268 -D WRAPPER_CLASS=CustomSX1268Wrapper -D LORA_TX_POWER=22 @@ -279,10 +290,10 @@ extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + build_flags = ${Meshadventurer.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D RADIO_CLASS=CustomSX1268 -D WRAPPER_CLASS=CustomSX1268Wrapper -D LORA_TX_POWER=22 @@ -318,6 +329,7 @@ lib_deps = extends = Meshadventurer build_flags = ${Meshadventurer.build_flags} + -I src/helpers/ui/server -D RADIO_CLASS=CustomSX1268 -D WRAPPER_CLASS=CustomSX1268Wrapper -D LORA_TX_POWER=22 @@ -330,6 +342,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Meshadventurer.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${Meshadventurer.lib_deps} ${esp32_ota.lib_deps} @@ -342,6 +355,7 @@ build_flags = ${Meshadventurer.build_flags} -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper -D LORA_TX_POWER=22 + -U DISPLAY_CLASS [env:Meshadventurer_sx1268_kiss_modem] extends = Meshadventurer @@ -351,3 +365,4 @@ build_flags = ${Meshadventurer.build_flags} -D RADIO_CLASS=CustomSX1268 -D WRAPPER_CLASS=CustomSX1268Wrapper -D LORA_TX_POWER=22 + -U DISPLAY_CLASS diff --git a/variants/meshadventurer/target.cpp b/variants/meshadventurer/target.cpp index 1ccfe151..24a4b6f1 100644 --- a/variants/meshadventurer/target.cpp +++ b/variants/meshadventurer/target.cpp @@ -18,6 +18,7 @@ MASensorManager sensors = MASensorManager(nmea); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/meshadventurer/target.h b/variants/meshadventurer/target.h index 9581d422..1f7ab872 100644 --- a/variants/meshadventurer/target.h +++ b/variants/meshadventurer/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif class MASensorManager : public SensorManager { @@ -38,6 +39,7 @@ extern MASensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif diff --git a/variants/meshnology_w12/platformio.ini b/variants/meshnology_w12/platformio.ini index ffab9d57..bb5f21c0 100644 --- a/variants/meshnology_w12/platformio.ini +++ b/variants/meshnology_w12/platformio.ini @@ -44,6 +44,7 @@ build_flags = build_src_filter = ${esp32_base.build_src_filter} +<../variants/meshnology_w12> + + + lib_deps = ${esp32_base.lib_deps} ${sensor_base.lib_deps} @@ -52,6 +53,7 @@ lib_deps = extends = meshnology_w12 build_flags = ${meshnology_w12.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Meshnology W12 Repeater"' -D ADVERT_LAT=0.0 @@ -63,6 +65,7 @@ build_flags = build_src_filter = ${meshnology_w12.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${meshnology_w12.lib_deps} ${esp32_ota.lib_deps} @@ -72,6 +75,7 @@ lib_deps = extends = meshnology_w12 build_flags = ${meshnology_w12.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -86,6 +90,7 @@ build_src_filter = ${meshnology_w12.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${meshnology_w12.lib_deps} ${esp32_ota.lib_deps} @@ -94,6 +99,7 @@ lib_deps = extends = meshnology_w12 build_flags = ${meshnology_w12.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Meshnology W12 Room"' -D ADVERT_LAT=0.0 @@ -105,6 +111,7 @@ build_flags = build_src_filter = ${meshnology_w12.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${meshnology_w12.lib_deps} ${esp32_ota.lib_deps} @@ -127,7 +134,7 @@ lib_deps = extends = meshnology_w12 build_flags = ${meshnology_w12.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -137,7 +144,7 @@ build_src_filter = ${meshnology_w12.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${meshnology_w12.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -146,7 +153,7 @@ lib_deps = extends = meshnology_w12 build_flags = ${meshnology_w12.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -161,7 +168,7 @@ build_src_filter = ${meshnology_w12.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${meshnology_w12.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -170,7 +177,7 @@ lib_deps = extends = meshnology_w12 build_flags = ${meshnology_w12.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -187,7 +194,7 @@ build_src_filter = ${meshnology_w12.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${meshnology_w12.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -202,7 +209,7 @@ build_flags = -D ADMIN_PASSWORD='"password"' -D ENV_PIN_SDA=3 -D ENV_PIN_SCL=4 - -D DISPLAY_CLASS=SSD1306Display + ; -D DISPLAY_CLASS=SSD1306Display ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${meshnology_w12.build_src_filter} diff --git a/variants/meshnology_w12/target.cpp b/variants/meshnology_w12/target.cpp index a3d6089f..969c1fc2 100644 --- a/variants/meshnology_w12/target.cpp +++ b/variants/meshnology_w12/target.cpp @@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display(NULL); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif const uint32_t rfswitch_dios[] = { diff --git a/variants/meshnology_w12/target.h b/variants/meshnology_w12/target.h index 1bf8876b..9cfce3d2 100644 --- a/variants/meshnology_w12/target.h +++ b/variants/meshnology_w12/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern MeshnologyW12Board board; @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/meshtiny/platformio.ini b/variants/meshtiny/platformio.ini index c0a3c5f9..a4741de7 100644 --- a/variants/meshtiny/platformio.ini +++ b/variants/meshtiny/platformio.ini @@ -29,7 +29,7 @@ lib_deps = extends = Meshtiny build_flags = ${Meshtiny.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MESHTINY -D PIN_BUZZER=30 -D DISPLAY_CLASS=SSD1306Display @@ -41,7 +41,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Meshtiny.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Meshtiny.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -50,7 +50,7 @@ lib_deps = extends = Meshtiny build_flags = ${Meshtiny.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MESHTINY -D PIN_BUZZER=30 -D DISPLAY_CLASS=SSD1306Display @@ -64,7 +64,7 @@ build_flags = build_src_filter = ${Meshtiny.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Meshtiny.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/meshtiny/target.cpp b/variants/meshtiny/target.cpp index 50d67826..25eded16 100644 --- a/variants/meshtiny/target.cpp +++ b/variants/meshtiny/target.cpp @@ -14,11 +14,12 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS -DISPLAY_CLASS display; + DISPLAY_CLASS display; MomentaryButton user_btn(ENCODER_PRESS, 1000, true, true); MomentaryButton joystick_left(ENCODER_LEFT, 1000, true, true); MomentaryButton joystick_right(ENCODER_RIGHT, 1000, true, true); MomentaryButton back_btn(PIN_SIDE_BUTTON, 1000, true, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/meshtiny/target.h b/variants/meshtiny/target.h index 3987e18c..066eae92 100644 --- a/variants/meshtiny/target.h +++ b/variants/meshtiny/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include +#include #endif #include @@ -24,6 +25,7 @@ extern MomentaryButton user_btn; extern MomentaryButton joystick_left; extern MomentaryButton joystick_right; extern MomentaryButton back_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/minewsemi_me25ls01/platformio.ini b/variants/minewsemi_me25ls01/platformio.ini index 1743e719..3a7bc05e 100644 --- a/variants/minewsemi_me25ls01/platformio.ini +++ b/variants/minewsemi_me25ls01/platformio.ini @@ -42,7 +42,7 @@ extends = me25ls01 board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${me25ls01.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -58,7 +58,7 @@ build_flags = ${me25ls01.build_flags} build_src_filter = ${me25ls01.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + [env:Minewsemi_me25ls01_repeater] extends = me25ls01 @@ -73,10 +73,8 @@ build_flags = ${me25ls01.build_flags} -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=50 - -D DISPLAY_CLASS=NullDisplayDriver build_src_filter = ${me25ls01.build_src_filter} +<../examples/simple_repeater> - + [env:Minewsemi_me25ls01_room_server] extends = me25ls01 @@ -92,7 +90,6 @@ build_flags = ${me25ls01.build_flags} -D ADMIN_PASSWORD='"password"' -D ROOM_PASSWORD='"hello"' -D MAX_NEIGHBOURS=50 - -D DISPLAY_CLASS=NullDisplayDriver build_src_filter = ${me25ls01.build_src_filter} +<../examples/simple_room_server> @@ -110,7 +107,7 @@ build_flags = ${me25ls01.build_flags} -D ADMIN_PASSWORD='"password"' -D ROOM_PASSWORD='"hello"' -D MAX_NEIGHBOURS=50 - -D DISPLAY_CLASS=NullDisplayDriver +; -D DISPLAY_CLASS=NullDisplayDriver build_src_filter = ${me25ls01.build_src_filter} +<../examples/simple_secure_chat/main.cpp> @@ -119,7 +116,7 @@ extends = me25ls01 board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${me25ls01.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ;-D BLE_PIN_CODE=123456 @@ -133,7 +130,7 @@ build_flags = ${me25ls01.build_flags} build_src_filter = ${me25ls01.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + [env:Minewsemi_me25ls01_kiss_modem] extends = me25ls01 diff --git a/variants/minewsemi_me25ls01/target.cpp b/variants/minewsemi_me25ls01/target.cpp index 8d9a6e07..38d78a9d 100644 --- a/variants/minewsemi_me25ls01/target.cpp +++ b/variants/minewsemi_me25ls01/target.cpp @@ -20,6 +20,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/minewsemi_me25ls01/target.h b/variants/minewsemi_me25ls01/target.h index db44058c..a82565e0 100644 --- a/variants/minewsemi_me25ls01/target.h +++ b/variants/minewsemi_me25ls01/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern MinewsemiME25LS01Board board; @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/muzi_base/platformio.ini b/variants/muzi_base/platformio.ini index 72a3ecac..5fea7797 100644 --- a/variants/muzi_base/platformio.ini +++ b/variants/muzi_base/platformio.ini @@ -35,6 +35,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + +<../variants/muzi_base> + + debug_tool = jlink upload_protocol = nrfutil lib_deps = @@ -73,7 +74,7 @@ build_flags = ${muzi_base_common.build_flags} [env:muzi_base_duo_repeater] extends = muzi_base_duo build_flags = ${muzi_base_duo.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/server -D ADVERT_NAME='"Muzi Base Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -83,12 +84,13 @@ build_flags = ${muzi_base_duo.build_flags} ; -D MESH_DEBUG=1 build_src_filter = ${muzi_base_duo.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${muzi_base_duo.lib_deps} [env:muzi_base_duo_room_server] extends = muzi_base_duo build_flags = ${muzi_base_duo.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/server -D ADVERT_NAME='"Muzi Base Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -98,6 +100,7 @@ build_flags = ${muzi_base_duo.build_flags} ; -D MESH_DEBUG=1 build_src_filter = ${muzi_base_duo.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${muzi_base_duo.lib_deps} [env:muzi_base_duo_companion_radio_usb] @@ -105,7 +108,7 @@ extends = muzi_base_duo board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${muzi_base_duo.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ; -D MESH_PACKET_LOGGING=1 @@ -115,7 +118,7 @@ build_flags = ${muzi_base_duo.build_flags} build_src_filter = ${muzi_base_duo.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${muzi_base_duo.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -124,7 +127,7 @@ extends = muzi_base_duo board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${muzi_base_duo.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -140,7 +143,7 @@ build_src_filter = ${muzi_base_duo.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${muzi_base_duo.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -180,7 +183,7 @@ board_upload.maximum_size = 708608 build_flags = ${muzi_base_duo_superIO.build_flags} -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D BLE_PIN_CODE=123456 -D QSPIFLASH=1 ; -D BLE_DEBUG_LOGGING=1 @@ -190,7 +193,7 @@ build_flags = ${muzi_base_duo_superIO.build_flags} build_src_filter = ${muzi_base_duo_superIO.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${muzi_base_duo_superIO.lib_deps} @@ -200,7 +203,7 @@ lib_deps = [env:muzi_base_uno_repeater] extends = muzi_base_uno build_flags = ${muzi_base_uno.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/server -D ADVERT_NAME='"Muzi Base Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -210,12 +213,13 @@ build_flags = ${muzi_base_uno.build_flags} ; -D MESH_DEBUG=1 build_src_filter = ${muzi_base_uno.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${muzi_base_uno.lib_deps} [env:muzi_base_uno_room_server] extends = muzi_base_uno build_flags = ${muzi_base_uno.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/server -D ADVERT_NAME='"Muzi Base Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -225,6 +229,7 @@ build_flags = ${muzi_base_uno.build_flags} ; -D MESH_DEBUG=1 build_src_filter = ${muzi_base_uno.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${muzi_base_uno.lib_deps} [env:muzi_base_uno_companion_radio_usb] @@ -232,7 +237,7 @@ extends = muzi_base_uno board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${muzi_base_uno.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ; -D MESH_PACKET_LOGGING=1 @@ -242,7 +247,7 @@ build_flags = ${muzi_base_uno.build_flags} build_src_filter = ${muzi_base_uno.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${muzi_base_uno.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -251,7 +256,7 @@ extends = muzi_base_uno board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${muzi_base_uno.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -267,7 +272,7 @@ build_src_filter = ${muzi_base_uno.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${muzi_base_uno.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -307,7 +312,7 @@ board_upload.maximum_size = 708608 build_flags = ${muzi_base_uno_superIO.build_flags} -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D BLE_PIN_CODE=123456 -D QSPIFLASH=1 ; -D BLE_DEBUG_LOGGING=1 @@ -317,6 +322,6 @@ build_flags = ${muzi_base_uno_superIO.build_flags} build_src_filter = ${muzi_base_uno_superIO.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${muzi_base_uno_superIO.lib_deps} diff --git a/variants/muzi_base/target.cpp b/variants/muzi_base/target.cpp index 6653ada1..6f9fcdad 100644 --- a/variants/muzi_base/target.cpp +++ b/variants/muzi_base/target.cpp @@ -71,6 +71,7 @@ void MuziBaseSensorManager::loop() { MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false); MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false); MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true); + UITask ui_task(&board, &display); #endif #if defined(USE_LR1121) diff --git a/variants/muzi_base/target.h b/variants/muzi_base/target.h index 0c143e1b..6914b1fb 100644 --- a/variants/muzi_base/target.h +++ b/variants/muzi_base/target.h @@ -30,6 +30,8 @@ #include "helpers/ui/NullDisplayDriver.h" extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + #include + extern UITask ui_task; #endif extern MuziBaseBoard board; diff --git a/variants/muziworks_r1_neo/R1NeoBoard.h b/variants/muziworks_r1_neo/R1NeoBoard.h index c56f1f5c..3dffa301 100644 --- a/variants/muziworks_r1_neo/R1NeoBoard.h +++ b/variants/muziworks_r1_neo/R1NeoBoard.h @@ -6,8 +6,6 @@ #include "NullDisplayDriver.h" #include "MomentaryButton.h" -#define DISPLAY_CLASS NullDisplayDriver - class R1NeoBoard : public NRF52BoardDCDC { protected: #ifdef NRF52_POWER_MANAGEMENT diff --git a/variants/muziworks_r1_neo/platformio.ini b/variants/muziworks_r1_neo/platformio.ini index fb51c04d..834fd5e9 100644 --- a/variants/muziworks_r1_neo/platformio.ini +++ b/variants/muziworks_r1_neo/platformio.ini @@ -9,7 +9,6 @@ build_flags = ${nrf52_base.build_flags} -D R1Neo -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper - -D DISPLAY_CLASS=NullDisplayDriver -D LORA_TX_POWER=22 -D SX126X_CURRENT_LIMIT=140 -D SX126X_RX_BOOSTED_GAIN=1 @@ -63,16 +62,17 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${R1Neo.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE + -D DISPLAY_CLASS=NullDisplayDriver ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${R1Neo.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${R1Neo.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -84,20 +84,21 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${R1Neo.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D ENV_INCLUDE_GPS=1 -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D BLE_DEBUG_LOGGING=1 -D OFFLINE_QUEUE_SIZE=256 + -D DISPLAY_CLASS=NullDisplayDriver ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${R1Neo.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${R1Neo.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -121,7 +122,7 @@ lib_deps = extends = R1Neo build_flags = ${R1Neo.build_flags} - -D DISPLAY_CLASS=SSD1306Display +; -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"R1 Neo Sensor"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 diff --git a/variants/muziworks_r1_neo/target.cpp b/variants/muziworks_r1_neo/target.cpp index 3081de2c..57f21acc 100644 --- a/variants/muziworks_r1_neo/target.cpp +++ b/variants/muziworks_r1_neo/target.cpp @@ -9,6 +9,7 @@ WRAPPER_CLASS radio_driver(radio, board); #ifdef DISPLAY_CLASS NullDisplayDriver display; + UITask ui_task(&board, &display); #endif #ifdef PIN_USER_BTN diff --git a/variants/muziworks_r1_neo/target.h b/variants/muziworks_r1_neo/target.h index 5bf3f268..a16122d5 100644 --- a/variants/muziworks_r1_neo/target.h +++ b/variants/muziworks_r1_neo/target.h @@ -12,8 +12,14 @@ extern R1NeoBoard board; extern WRAPPER_CLASS radio_driver; extern AutoDiscoverRTCClock rtc_clock; extern EnvironmentSensorManager sensors; + +#ifdef DISPLAY_CLASS +#include + extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; +#endif bool radio_init(); mesh::LocalIdentity radio_new_identity(); diff --git a/variants/nano_g2_ultra/platformio.ini b/variants/nano_g2_ultra/platformio.ini index b817b3e9..fbc12ea0 100644 --- a/variants/nano_g2_ultra/platformio.ini +++ b/variants/nano_g2_ultra/platformio.ini @@ -17,6 +17,7 @@ build_flags = ${nrf52_base.build_flags} build_src_filter = ${nrf52_base.build_src_filter} + +<../variants/nano_g2_ultra> + + debug_tool = jlink upload_protocol = nrfutil lib_deps = ${nrf52_base.lib_deps} @@ -28,6 +29,7 @@ lib_deps = ${nrf52_base.lib_deps} extends = Nano_G2_Ultra build_flags = ${Nano_G2_Ultra.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SH1106Display -D ADVERT_NAME='"Nano G2 Repeater"' -D ADVERT_LAT=0.0 @@ -39,11 +41,13 @@ build_flags = build_src_filter = ${Nano_G2_Ultra.build_src_filter} + +<../examples/simple_repeater> + + [env:Nano_G2_Ultra_room_server] extends = Nano_G2_Ultra build_flags = ${Nano_G2_Ultra.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SH1106Display -D ADVERT_NAME='"Nano G2 Room"' -D ADVERT_LAT=0.0 @@ -55,6 +59,7 @@ build_flags = build_src_filter = ${Nano_G2_Ultra.build_src_filter} + +<../examples/simple_room_server> + + [env:Nano_G2_Ultra_companion_radio_ble] extends = Nano_G2_Ultra @@ -63,7 +68,7 @@ board_upload.maximum_size = 712704 build_flags = ${Nano_G2_Ultra.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -80,7 +85,7 @@ build_src_filter = ${Nano_G2_Ultra.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Nano_G2_Ultra.lib_deps} densaugeo/base64 @ ~1.4.0 end2endzone/NonBlockingRTTTL@^1.3.0 @@ -92,7 +97,7 @@ board_upload.maximum_size = 712704 build_flags = ${Nano_G2_Ultra.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D QSPIFLASH=1 @@ -107,7 +112,7 @@ build_src_filter = ${Nano_G2_Ultra.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Nano_G2_Ultra.lib_deps} densaugeo/base64 @ ~1.4.0 end2endzone/NonBlockingRTTTL@^1.3.0 diff --git a/variants/nano_g2_ultra/target.cpp b/variants/nano_g2_ultra/target.cpp index fedc48e7..68230fa2 100644 --- a/variants/nano_g2_ultra/target.cpp +++ b/variants/nano_g2_ultra/target.cpp @@ -21,6 +21,7 @@ NanoG2UltraSensorManager sensors = NanoG2UltraSensorManager(nmea, gps_driver); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); +UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/nano_g2_ultra/target.h b/variants/nano_g2_ultra/target.h index d540b9ec..78c511f3 100644 --- a/variants/nano_g2_ultra/target.h +++ b/variants/nano_g2_ultra/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include +#include #endif #include @@ -43,6 +44,7 @@ extern NanoG2UltraSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/nibble_screen_connect/platformio.ini b/variants/nibble_screen_connect/platformio.ini index 0f8d31de..52e7f78f 100644 --- a/variants/nibble_screen_connect/platformio.ini +++ b/variants/nibble_screen_connect/platformio.ini @@ -29,6 +29,7 @@ build_flags = -D SX126X_RX_BOOSTED_GAIN=1 build_src_filter = ${esp32_base.build_src_filter} +<../variants/nibble_screen_connect> + + lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 @@ -38,6 +39,7 @@ lib_deps = extends = nibble_screen_connect_base build_flags = ${nibble_screen_connect_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Nibble Repeater"' -D ADVERT_LAT=0.0 @@ -47,6 +49,7 @@ build_flags = build_src_filter = ${nibble_screen_connect_base.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${nibble_screen_connect_base.lib_deps} ${esp32_ota.lib_deps} @@ -55,6 +58,7 @@ lib_deps = extends = nibble_screen_connect_base build_flags = ${nibble_screen_connect_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -66,6 +70,7 @@ build_src_filter = ${nibble_screen_connect_base.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${nibble_screen_connect_base.lib_deps} ${esp32_ota.lib_deps} @@ -86,6 +91,7 @@ lib_deps = extends = nibble_screen_connect_base build_flags = ${nibble_screen_connect_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Nibble Room"' -D ADVERT_LAT=0.0 @@ -95,6 +101,7 @@ build_flags = build_src_filter = ${nibble_screen_connect_base.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${nibble_screen_connect_base.lib_deps} ${esp32_ota.lib_deps} @@ -103,7 +110,7 @@ lib_deps = extends = nibble_screen_connect_base build_flags = ${nibble_screen_connect_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=300 -D MAX_GROUP_CHANNELS=8 @@ -112,7 +119,7 @@ build_src_filter = ${nibble_screen_connect_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${nibble_screen_connect_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -121,7 +128,7 @@ lib_deps = extends = nibble_screen_connect_base build_flags = ${nibble_screen_connect_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=300 -D MAX_GROUP_CHANNELS=8 @@ -133,7 +140,7 @@ build_src_filter = ${nibble_screen_connect_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${nibble_screen_connect_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -142,7 +149,7 @@ lib_deps = extends = nibble_screen_connect_base build_flags = ${nibble_screen_connect_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=300 @@ -157,7 +164,7 @@ build_src_filter = ${nibble_screen_connect_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${nibble_screen_connect_base.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/nibble_screen_connect/target.cpp b/variants/nibble_screen_connect/target.cpp index ceb9fe49..79ea6348 100644 --- a/variants/nibble_screen_connect/target.cpp +++ b/variants/nibble_screen_connect/target.cpp @@ -14,6 +14,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/nibble_screen_connect/target.h b/variants/nibble_screen_connect/target.h index dcbcf8e1..c91cfc73 100644 --- a/variants/nibble_screen_connect/target.h +++ b/variants/nibble_screen_connect/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ESP32Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/nibble_zero_connect/platformio.ini b/variants/nibble_zero_connect/platformio.ini index c7e7b076..4fe43d0e 100644 --- a/variants/nibble_zero_connect/platformio.ini +++ b/variants/nibble_zero_connect/platformio.ini @@ -27,6 +27,7 @@ build_flags = -D SX126X_RX_BOOSTED_GAIN=1 build_src_filter = ${esp32_base.build_src_filter} +<../variants/nibble_zero_connect> + + lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 @@ -35,6 +36,7 @@ lib_deps = extends = nibble_zero_connect_base build_flags = ${nibble_zero_connect_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Nibble Repeater"' -D ADVERT_LAT=0.0 @@ -44,6 +46,7 @@ build_flags = build_src_filter = ${nibble_zero_connect_base.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${nibble_zero_connect_base.lib_deps} ${esp32_ota.lib_deps} @@ -52,6 +55,7 @@ lib_deps = extends = nibble_zero_connect_base build_flags = ${nibble_zero_connect_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -63,6 +67,7 @@ build_src_filter = ${nibble_zero_connect_base.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${nibble_zero_connect_base.lib_deps} ${esp32_ota.lib_deps} @@ -83,6 +88,7 @@ lib_deps = extends = nibble_zero_connect_base build_flags = ${nibble_zero_connect_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Nibble Room"' -D ADVERT_LAT=0.0 @@ -92,6 +98,7 @@ build_flags = build_src_filter = ${nibble_zero_connect_base.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${nibble_zero_connect_base.lib_deps} ${esp32_ota.lib_deps} @@ -100,7 +107,7 @@ lib_deps = extends = nibble_zero_connect_base build_flags = ${nibble_zero_connect_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=300 -D MAX_GROUP_CHANNELS=8 @@ -109,7 +116,7 @@ build_src_filter = ${nibble_zero_connect_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${nibble_zero_connect_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -118,7 +125,7 @@ lib_deps = extends = nibble_zero_connect_base build_flags = ${nibble_zero_connect_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=300 -D MAX_GROUP_CHANNELS=8 @@ -130,7 +137,7 @@ build_src_filter = ${nibble_zero_connect_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${nibble_zero_connect_base.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -139,7 +146,7 @@ lib_deps = extends = nibble_zero_connect_base build_flags = ${nibble_zero_connect_base.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=300 @@ -153,7 +160,7 @@ build_src_filter = ${nibble_zero_connect_base.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${nibble_zero_connect_base.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/nibble_zero_connect/target.cpp b/variants/nibble_zero_connect/target.cpp index d53b6a1c..5200ca39 100644 --- a/variants/nibble_zero_connect/target.cpp +++ b/variants/nibble_zero_connect/target.cpp @@ -14,6 +14,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/nibble_zero_connect/target.h b/variants/nibble_zero_connect/target.h index 87c55f0f..2d45bff2 100644 --- a/variants/nibble_zero_connect/target.h +++ b/variants/nibble_zero_connect/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ESP32Board board; @@ -20,6 +21,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/promicro/platformio.ini b/variants/promicro/platformio.ini index da27c2fa..41cd725b 100644 --- a/variants/promicro/platformio.ini +++ b/variants/promicro/platformio.ini @@ -27,6 +27,7 @@ build_flags = ${nrf52_base.build_flags} build_src_filter = ${nrf52_base.build_src_filter} + +<../variants/promicro> + + lib_deps= ${nrf52_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 adafruit/Adafruit INA3221 Library @ ^1.0.1 @@ -43,8 +44,10 @@ build_src_filter = ${Promicro.build_src_filter} +<../examples/simple_repeater> + + + + build_flags = ${Promicro.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ProMicro Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -63,8 +66,10 @@ build_src_filter = ${Promicro.build_src_filter} + + + + + build_flags = ${Promicro.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"RS232 Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -87,7 +92,9 @@ build_src_filter = ${Promicro.build_src_filter} +<../examples/simple_room_server> + + + + build_flags = ${Promicro.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ProMicro Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -117,7 +124,7 @@ extends = Promicro board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Promicro.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -128,7 +135,7 @@ build_src_filter = ${Promicro.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Promicro.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 @@ -138,7 +145,7 @@ extends = Promicro board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${Promicro.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -152,7 +159,7 @@ build_src_filter = ${Promicro.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Promicro.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 @@ -165,7 +172,7 @@ build_flags = -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' - -D DISPLAY_CLASS=SSD1306Display +; -D DISPLAY_CLASS=SSD1306Display ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Promicro.build_src_filter} diff --git a/variants/promicro/target.cpp b/variants/promicro/target.cpp index 5758d9cd..cebfc22b 100644 --- a/variants/promicro/target.cpp +++ b/variants/promicro/target.cpp @@ -22,6 +22,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/promicro/target.h b/variants/promicro/target.h index e577ab4e..8a953a91 100644 --- a/variants/promicro/target.h +++ b/variants/promicro/target.h @@ -9,6 +9,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif #include @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/rak3112/platformio.ini b/variants/rak3112/platformio.ini index d181388b..2146a6b2 100644 --- a/variants/rak3112/platformio.ini +++ b/variants/rak3112/platformio.ini @@ -133,7 +133,7 @@ lib_deps = extends = rak3112 build_flags = ${rak3112.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE @@ -141,7 +141,7 @@ build_flags = ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${rak3112.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${rak3112.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -150,7 +150,7 @@ lib_deps = extends = rak3112 build_flags = ${rak3112.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 ; dynamic, random PIN @@ -164,7 +164,7 @@ build_src_filter = ${rak3112.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${rak3112.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -173,7 +173,7 @@ lib_deps = extends = rak3112 build_flags = ${rak3112.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -187,7 +187,7 @@ build_src_filter = ${rak3112.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${rak3112.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/rak3112/target.cpp b/variants/rak3112/target.cpp index 9b1d11a0..34e9be58 100644 --- a/variants/rak3112/target.cpp +++ b/variants/rak3112/target.cpp @@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/rak3112/target.h b/variants/rak3112/target.h index f93cd539..0ce8e4fb 100644 --- a/variants/rak3112/target.h +++ b/variants/rak3112/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern RAK3112Board board; @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/rak3401/platformio.ini b/variants/rak3401/platformio.ini index d157e4b1..97f1e6da 100644 --- a/variants/rak3401/platformio.ini +++ b/variants/rak3401/platformio.ini @@ -18,6 +18,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + + + + lib_deps = ${nrf52_base.lib_deps} ${sensor_base.lib_deps} @@ -28,6 +29,7 @@ lib_deps = extends = rak3401 build_flags = ${rak3401.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"RAK3401 1W Repeater"' -D ADVERT_LAT=0.0 @@ -39,11 +41,13 @@ build_flags = build_src_filter = ${rak3401.build_src_filter} + +<../examples/simple_repeater> + + [env:RAK_3401_room_server] extends = rak3401 build_flags = ${rak3401.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Test Room"' -D ADVERT_LAT=0.0 @@ -55,6 +59,7 @@ build_flags = build_src_filter = ${rak3401.build_src_filter} + +<../examples/simple_room_server> + + [env:RAK_3401_companion_radio_usb] extends = rak3401 @@ -62,7 +67,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${rak3401.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D PIN_USER_BTN_ANA=31 -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 @@ -72,7 +77,7 @@ build_flags = ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${rak3401.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${rak3401.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -83,7 +88,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${rak3401.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D PIN_USER_BTN_ANA=31 -D DISPLAY_CLASS=SSD1306Display -D MAX_CONTACTS=350 @@ -96,7 +101,7 @@ build_flags = build_src_filter = ${rak3401.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${rak3401.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/rak3401/target.cpp b/variants/rak3401/target.cpp index a9316558..cc71cbcf 100644 --- a/variants/rak3401/target.cpp +++ b/variants/rak3401/target.cpp @@ -17,6 +17,7 @@ RAK3401Board board; #if defined(PIN_USER_BTN_ANA) MomentaryButton analog_btn(PIN_USER_BTN_ANA, 1000, 20); #endif + UITask ui_task(&board, &display); #endif RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI); diff --git a/variants/rak3401/target.h b/variants/rak3401/target.h index 00653e90..e235eca0 100644 --- a/variants/rak3401/target.h +++ b/variants/rak3401/target.h @@ -16,6 +16,8 @@ #if defined(PIN_USER_BTN_ANA) extern MomentaryButton analog_btn; #endif + #include + extern UITask ui_task; #endif extern RAK3401Board board; diff --git a/variants/rak4631/platformio.ini b/variants/rak4631/platformio.ini index c5d94d51..eaf73c7b 100644 --- a/variants/rak4631/platformio.ini +++ b/variants/rak4631/platformio.ini @@ -31,6 +31,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + + + + lib_deps = ${nrf52_base.lib_deps} ${sensor_base.lib_deps} @@ -43,6 +44,7 @@ lib_deps = extends = rak4631 build_flags = ${rak4631.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=AutoDetectDisplay -D ADVERT_NAME='"RAK4631 Repeater"' -D ADVERT_LAT=0.0 @@ -54,6 +56,7 @@ build_flags = build_src_filter = ${rak4631.build_src_filter} + +<../examples/simple_repeater> + + ; Lets `gps off`, periodic mode and shutdown cut the power to a serial GPS (RAK12501). ; WB_IO2 switches the shared 3V3_S slot rail, so this also powers down any other slot module. @@ -67,6 +70,7 @@ build_flags = extends = rak4631 build_flags = ${rak4631.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=AutoDetectDisplay -D ADVERT_NAME='"RAK4631 Repeater"' -D ADVERT_LAT=0.0 @@ -78,6 +82,7 @@ build_flags = build_src_filter = ${rak4631.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${rak4631.lib_deps} https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip @@ -86,6 +91,7 @@ lib_deps = extends = rak4631 build_flags = ${rak4631.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=AutoDetectDisplay -D ADVERT_NAME='"RS232 Bridge"' -D ADVERT_LAT=0.0 @@ -104,11 +110,13 @@ build_src_filter = ${rak4631.build_src_filter} + + +<../examples/simple_repeater> + + [env:RAK_4631_repeater_bridge_rs232_serial2] extends = rak4631 build_flags = ${rak4631.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=AutoDetectDisplay -D ADVERT_NAME='"RS232 Bridge"' -D ADVERT_LAT=0.0 @@ -127,11 +135,13 @@ build_src_filter = ${rak4631.build_src_filter} + + +<../examples/simple_repeater> + + [env:RAK_4631_room_server] extends = rak4631 build_flags = ${rak4631.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=AutoDetectDisplay -D ADVERT_NAME='"Test Room"' -D ADVERT_LAT=0.0 @@ -143,11 +153,13 @@ build_flags = build_src_filter = ${rak4631.build_src_filter} + +<../examples/simple_room_server> + + [env:RAK_4631_room_server_ethernet] extends = rak4631 build_flags = ${rak4631.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=AutoDetectDisplay -D ADVERT_NAME='"RAK4631 Room Server"' -D ADVERT_LAT=0.0 @@ -159,6 +171,7 @@ build_flags = build_src_filter = ${rak4631.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${rak4631.lib_deps} https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip @@ -169,7 +182,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${rak4631.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D PIN_USER_BTN=9 -D PIN_USER_BTN_ANA=31 -D DISPLAY_CLASS=AutoDetectDisplay @@ -180,7 +193,7 @@ build_flags = ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${rak4631.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${rak4631.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -194,7 +207,7 @@ build_unflags = -D EXTRAFS=1 build_flags = ${rak4631.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D PIN_USER_BTN=9 -D PIN_USER_BTN_ANA=31 -D DISPLAY_CLASS=AutoDetectDisplay @@ -208,7 +221,7 @@ build_flags = ; -D ETHERNET_DEBUG_LOGGING=1 build_src_filter = ${rak4631.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + + + lib_deps = @@ -223,7 +236,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${rak4631.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D PIN_USER_BTN=9 -D PIN_USER_BTN_ANA=31 -D DISPLAY_CLASS=AutoDetectDisplay @@ -237,7 +250,7 @@ build_flags = build_src_filter = ${rak4631.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${rak4631.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/rak4631/target.cpp b/variants/rak4631/target.cpp index 813cb807..385dcec2 100644 --- a/variants/rak4631/target.cpp +++ b/variants/rak4631/target.cpp @@ -15,6 +15,7 @@ RAK4631Board board; #if defined(PIN_USER_BTN_ANA) MomentaryButton analog_btn(PIN_USER_BTN_ANA, 1000, 20); #endif + UITask ui_task(&board, &display); #endif RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI); diff --git a/variants/rak4631/target.h b/variants/rak4631/target.h index c04cd4e4..1cc6f30a 100644 --- a/variants/rak4631/target.h +++ b/variants/rak4631/target.h @@ -16,6 +16,8 @@ #if defined(PIN_USER_BTN_ANA) extern MomentaryButton analog_btn; #endif + #include + extern UITask ui_task; #endif extern RAK4631Board board; diff --git a/variants/rak_wismesh_tag/platformio.ini b/variants/rak_wismesh_tag/platformio.ini index d6140187..56395cb0 100644 --- a/variants/rak_wismesh_tag/platformio.ini +++ b/variants/rak_wismesh_tag/platformio.ini @@ -18,7 +18,6 @@ build_flags = ${nrf52_base.build_flags} -D P_LORA_MOSI=PIN_SPI_MOSI -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper - -D DISPLAY_CLASS=NullDisplayDriver -D LORA_TX_POWER=22 -D SX126X_CURRENT_LIMIT=140 -D SX126X_RX_BOOSTED_GAIN=1 @@ -68,7 +67,8 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${rak_wismesh_tag.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig + -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE @@ -77,7 +77,7 @@ build_flags = build_src_filter = ${rak_wismesh_tag.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${rak_wismesh_tag.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -89,7 +89,8 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${rak_wismesh_tag.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig + -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -102,7 +103,7 @@ build_src_filter = ${rak_wismesh_tag.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${rak_wismesh_tag.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/rak_wismesh_tag/target.cpp b/variants/rak_wismesh_tag/target.cpp index 3e80ae63..364e33c3 100644 --- a/variants/rak_wismesh_tag/target.cpp +++ b/variants/rak_wismesh_tag/target.cpp @@ -11,6 +11,7 @@ RAKWismeshTagBoard board; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true); + UITask ui_task(&board, &display); #endif RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI); diff --git a/variants/rak_wismesh_tag/target.h b/variants/rak_wismesh_tag/target.h index fbe18d2d..3d2f9fc1 100644 --- a/variants/rak_wismesh_tag/target.h +++ b/variants/rak_wismesh_tag/target.h @@ -13,6 +13,8 @@ extern DISPLAY_CLASS display; #include extern MomentaryButton user_btn; + #include + extern UITask ui_task; #endif extern RAKWismeshTagBoard board; diff --git a/variants/sensecap_indicator-espnow/platformio.ini b/variants/sensecap_indicator-espnow/platformio.ini index a5952d6e..280e3a53 100644 --- a/variants/sensecap_indicator-espnow/platformio.ini +++ b/variants/sensecap_indicator-espnow/platformio.ini @@ -36,14 +36,14 @@ lib_deps=${esp32_base.lib_deps} extends = SenseCapIndicator-ESPNow build_flags = ${SenseCapIndicator-ESPNow.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 ; NOTE: DO NOT ENABLE --> -D ESPNOW_DEBUG_LOGGING=1 build_src_filter = ${SenseCapIndicator-ESPNow.build_src_filter} - +<../examples/companion_radio/ui-new/*.cpp> + + +<../examples/companion_radio/*.cpp> lib_deps = ${SenseCapIndicator-ESPNow.lib_deps} diff --git a/variants/sensecap_indicator-espnow/target.cpp b/variants/sensecap_indicator-espnow/target.cpp index 4895447c..1bd46dd6 100644 --- a/variants/sensecap_indicator-espnow/target.cpp +++ b/variants/sensecap_indicator-espnow/target.cpp @@ -20,6 +20,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef PIN_USER_BTN MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true); #endif + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/sensecap_indicator-espnow/target.h b/variants/sensecap_indicator-espnow/target.h index dab4575e..206d0e68 100644 --- a/variants/sensecap_indicator-espnow/target.h +++ b/variants/sensecap_indicator-espnow/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include "SCIndicatorDisplay.h" #include + #include #endif extern ESP32Board board; @@ -20,6 +21,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/station_g2/platformio.ini b/variants/station_g2/platformio.ini index c4fd344d..66e58ccb 100644 --- a/variants/station_g2/platformio.ini +++ b/variants/station_g2/platformio.ini @@ -37,6 +37,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + + + lib_deps = ${esp32_base.lib_deps} ${sensor_base.lib_deps} @@ -47,6 +48,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Station G2 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -56,6 +58,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Station_G2.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${Station_G2.lib_deps} ${esp32_ota.lib_deps} @@ -86,6 +89,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -98,6 +102,7 @@ build_flags = build_src_filter = ${Station_G2.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Station_G2.lib_deps} ${esp32_ota.lib_deps} @@ -106,6 +111,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Station G2 Logging Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -117,6 +123,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Station_G2.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${Station_G2.lib_deps} ${esp32_ota.lib_deps} @@ -148,6 +155,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -161,6 +169,7 @@ build_flags = build_src_filter = ${Station_G2.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Station_G2.lib_deps} ${esp32_ota.lib_deps} @@ -169,8 +178,10 @@ lib_deps = extends = Station_G2 build_src_filter = ${Station_G2.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${Station_G2.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Station G2 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -186,7 +197,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE @@ -195,7 +206,7 @@ build_flags = build_src_filter = ${Station_G2.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Station_G2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -204,7 +215,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -215,7 +226,7 @@ build_flags = build_src_filter = ${Station_G2.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Station_G2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -224,7 +235,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -238,7 +249,7 @@ build_src_filter = ${Station_G2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Station_G2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -247,6 +258,7 @@ lib_deps = extends = Station_G2 build_flags = ${Station_G2.build_flags} + -U DISPLAY_CLASS -D ARDUINO_USB_MODE=1 build_src_filter = ${Station_G2.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/station_g2/target.cpp b/variants/station_g2/target.cpp index f5365eb5..2cdee0ff 100644 --- a/variants/station_g2/target.cpp +++ b/variants/station_g2/target.cpp @@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/station_g2/target.h b/variants/station_g2/target.h index b4eadbba..963f4619 100644 --- a/variants/station_g2/target.h +++ b/variants/station_g2/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern StationG2Board board; @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/station_g3_esp32/platformio.ini b/variants/station_g3_esp32/platformio.ini index 2ce8bb39..dab6c911 100644 --- a/variants/station_g3_esp32/platformio.ini +++ b/variants/station_g3_esp32/platformio.ini @@ -40,6 +40,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + + + lib_deps = ${esp32_base.lib_deps} ${sensor_base.lib_deps} @@ -50,6 +51,7 @@ lib_deps = extends = Station_G3_ESP32 build_flags = ${Station_G3_ESP32.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Station G3 ESP32 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -59,6 +61,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Station_G3_ESP32.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${Station_G3_ESP32.lib_deps} ${esp32_ota.lib_deps} @@ -67,6 +70,7 @@ lib_deps = extends = Station_G3_ESP32 build_flags = ${Station_G3_ESP32.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Station G3 ESP32 Logging Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -76,6 +80,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Station_G3_ESP32.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${Station_G3_ESP32.lib_deps} ${esp32_ota.lib_deps} @@ -84,8 +89,10 @@ lib_deps = extends = Station_G3_ESP32 build_src_filter = ${Station_G3_ESP32.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${Station_G3_ESP32.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Station G3 ESP32 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -101,7 +108,7 @@ lib_deps = extends = Station_G3_ESP32 build_flags = ${Station_G3_ESP32.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D ENABLE_USB_INTERFACE @@ -110,7 +117,7 @@ build_flags = build_src_filter = ${Station_G3_ESP32.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Station_G3_ESP32.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -119,7 +126,7 @@ lib_deps = extends = Station_G3_ESP32 build_flags = ${Station_G3_ESP32.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -130,7 +137,7 @@ build_flags = build_src_filter = ${Station_G3_ESP32.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Station_G3_ESP32.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -139,7 +146,7 @@ lib_deps = extends = Station_G3_ESP32 build_flags = ${Station_G3_ESP32.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -153,12 +160,15 @@ build_src_filter = ${Station_G3_ESP32.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Station_G3_ESP32.lib_deps} densaugeo/base64 @ ~1.4.0 [env:Station_G3_ESP32_kiss_modem] extends = Station_G3_ESP32 +build_flags = + ${Station_G3_ESP32.build_flags} + -U DISPLAY_CLASS build_src_filter = ${Station_G3_ESP32.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/station_g3_esp32/target.cpp b/variants/station_g3_esp32/target.cpp index 189169d2..da652368 100644 --- a/variants/station_g3_esp32/target.cpp +++ b/variants/station_g3_esp32/target.cpp @@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/station_g3_esp32/target.h b/variants/station_g3_esp32/target.h index b67349dc..4bc3fc1c 100644 --- a/variants/station_g3_esp32/target.h +++ b/variants/station_g3_esp32/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern StationG3Board board; @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/t1000-e/platformio.ini b/variants/t1000-e/platformio.ini index ab8b0de0..766229d4 100644 --- a/variants/t1000-e/platformio.ini +++ b/variants/t1000-e/platformio.ini @@ -38,7 +38,7 @@ upload_protocol = nrfutil [env:t1000e_repeater] extends = t1000-e build_flags = ${t1000-e.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D ADVERT_NAME='"t1000-e Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -54,7 +54,7 @@ lib_deps = ${t1000-e.lib_deps} [env:t1000e_room_server] extends = t1000-e build_flags = ${t1000-e.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D ADVERT_NAME='"t1000-e Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -73,7 +73,7 @@ extends = t1000-e board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${t1000-e.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ; -D MESH_PACKET_LOGGING=1 @@ -87,7 +87,7 @@ build_src_filter = ${t1000-e.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${t1000-e.lib_deps} densaugeo/base64 @ ~1.4.0 stevemarple/MicroNMEA @ ^2.0.6 @@ -98,7 +98,7 @@ extends = t1000-e board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${t1000-e.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -117,7 +117,7 @@ build_src_filter = ${t1000-e.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${t1000-e.lib_deps} densaugeo/base64 @ ~1.4.0 stevemarple/MicroNMEA @ ^2.0.6 diff --git a/variants/t1000-e/target.cpp b/variants/t1000-e/target.cpp index 609c32bc..a9db46ad 100644 --- a/variants/t1000-e/target.cpp +++ b/variants/t1000-e/target.cpp @@ -17,6 +17,7 @@ T1000SensorManager sensors(nmea, gps_driver); #ifdef DISPLAY_CLASS NullDisplayDriver display; + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/t1000-e/target.h b/variants/t1000-e/target.h index 68508bcb..e6eea918 100644 --- a/variants/t1000-e/target.h +++ b/variants/t1000-e/target.h @@ -10,6 +10,7 @@ #include #ifdef DISPLAY_CLASS #include "NullDisplayDriver.h" + #include #endif class AirohaGpsDriver; @@ -36,6 +37,7 @@ public: #ifdef DISPLAY_CLASS extern NullDisplayDriver display; + extern UITask ui_task; #endif extern T1000eBoard board; diff --git a/variants/thinknode_m1/platformio.ini b/variants/thinknode_m1/platformio.ini index ae00d28e..8be7e19c 100644 --- a/variants/thinknode_m1/platformio.ini +++ b/variants/thinknode_m1/platformio.ini @@ -85,7 +85,7 @@ board_upload.maximum_size = 712704 build_flags = ${ThinkNode_M1.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -105,7 +105,7 @@ build_src_filter = ${ThinkNode_M1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M1.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -120,7 +120,7 @@ board_upload.maximum_size = 712704 build_flags = ${ThinkNode_M1.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_ROTATION=4 @@ -135,7 +135,7 @@ build_src_filter = ${ThinkNode_M1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M1.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/thinknode_m1/target.cpp b/variants/thinknode_m1/target.cpp index 4183c514..d29d13b4 100644 --- a/variants/thinknode_m1/target.cpp +++ b/variants/thinknode_m1/target.cpp @@ -20,6 +20,7 @@ ThinkNodeM1SensorManager sensors = ThinkNodeM1SensorManager(nmea); DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/thinknode_m1/target.h b/variants/thinknode_m1/target.h index 9c8a6e80..08cb9a56 100644 --- a/variants/thinknode_m1/target.h +++ b/variants/thinknode_m1/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif class ThinkNodeM1SensorManager : public SensorManager { @@ -39,6 +40,7 @@ extern ThinkNodeM1SensorManager sensors; extern DISPLAY_CLASS display; extern MomentaryButton user_btn; extern MomentaryButton backlight_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/thinknode_m2/platformio.ini b/variants/thinknode_m2/platformio.ini index 862c7154..089c1f0a 100644 --- a/variants/thinknode_m2/platformio.ini +++ b/variants/thinknode_m2/platformio.ini @@ -24,7 +24,6 @@ build_flags = ${esp32_base.build_flags} -D SX126X_DIO2_AS_RF_SWITCH=true -D SX126X_DIO3_TCXO_VOLTAGE=3.3 -D SX126X_CURRENT_LIMIT=140 - -D DISPLAY_CLASS=SH1106Display -D USE_SX1262 -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper @@ -132,7 +131,8 @@ lib_deps = extends = ThinkNode_M2 build_flags = ${ThinkNode_M2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new + -D DISPLAY_CLASS=SH1106Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -145,7 +145,7 @@ build_src_filter = ${ThinkNode_M2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -155,7 +155,8 @@ lib_deps = extends = ThinkNode_M2 build_flags = ${ThinkNode_M2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new + -D DISPLAY_CLASS=SH1106Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -165,7 +166,7 @@ build_src_filter = ${ThinkNode_M2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -175,8 +176,9 @@ lib_deps = extends = ThinkNode_M2 build_flags = ${ThinkNode_M2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE + -D DISPLAY_CLASS=SH1106Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -189,7 +191,7 @@ build_src_filter = ${ThinkNode_M2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M2.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -199,7 +201,8 @@ lib_deps = extends = ThinkNode_M2 build_flags = ${ThinkNode_M2.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new + -D DISPLAY_CLASS=SH1106Display -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D SERIAL_TX=43 @@ -211,7 +214,7 @@ build_src_filter = ${ThinkNode_M2.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M2.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/thinknode_m2/target.cpp b/variants/thinknode_m2/target.cpp index ff0dd6cf..9ea042ba 100644 --- a/variants/thinknode_m2/target.cpp +++ b/variants/thinknode_m2/target.cpp @@ -19,6 +19,7 @@ SensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/thinknode_m2/target.h b/variants/thinknode_m2/target.h index 37ede89e..6928036d 100644 --- a/variants/thinknode_m2/target.h +++ b/variants/thinknode_m2/target.h @@ -11,6 +11,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ThinknodeM2Board board; @@ -21,6 +22,7 @@ extern SensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/thinknode_m3/platformio.ini b/variants/thinknode_m3/platformio.ini index ce1e7e59..791f4573 100644 --- a/variants/thinknode_m3/platformio.ini +++ b/variants/thinknode_m3/platformio.ini @@ -39,7 +39,7 @@ lib_deps= ${nrf52_base.lib_deps} [env:ThinkNode_M3_repeater] extends = ThinkNode_M3 build_flags = ${ThinkNode_M3.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D ADVERT_NAME='"ThinkNode_M3 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -55,7 +55,7 @@ lib_deps = ${ThinkNode_M3.lib_deps} [env:ThinkNode_M3_room_server] extends = ThinkNode_M3 build_flags = ${ThinkNode_M3.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D ADVERT_NAME='"ThinkNode_M3 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -74,7 +74,7 @@ extends = ThinkNode_M3 board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${ThinkNode_M3.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ; -D MESH_PACKET_LOGGING=1 @@ -88,7 +88,7 @@ build_src_filter = ${ThinkNode_M3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M3.lib_deps} densaugeo/base64 @ ~1.4.0 stevemarple/MicroNMEA @ ^2.0.6 @@ -99,7 +99,7 @@ extends = ThinkNode_M3 board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${ThinkNode_M3.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -115,7 +115,7 @@ build_src_filter = ${ThinkNode_M3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M3.lib_deps} densaugeo/base64 @ ~1.4.0 stevemarple/MicroNMEA @ ^2.0.6 diff --git a/variants/thinknode_m3/target.cpp b/variants/thinknode_m3/target.cpp index bb5746ca..f9f5ed71 100644 --- a/variants/thinknode_m3/target.cpp +++ b/variants/thinknode_m3/target.cpp @@ -20,6 +20,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS NullDisplayDriver display; + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/thinknode_m3/target.h b/variants/thinknode_m3/target.h index f2d34328..8026f53b 100644 --- a/variants/thinknode_m3/target.h +++ b/variants/thinknode_m3/target.h @@ -11,10 +11,12 @@ #include #ifdef DISPLAY_CLASS #include "NullDisplayDriver.h" + #include #endif #ifdef DISPLAY_CLASS extern NullDisplayDriver display; + extern UITask ui_task; #endif extern ThinkNodeM3Board board; diff --git a/variants/thinknode_m4/platformio.ini b/variants/thinknode_m4/platformio.ini index 06762f88..a69d9303 100644 --- a/variants/thinknode_m4/platformio.ini +++ b/variants/thinknode_m4/platformio.ini @@ -40,7 +40,6 @@ lib_deps= ${nrf52_base.lib_deps} [env:ThinkNode_M4_repeater] extends = ThinkNode_M4 build_flags = ${ThinkNode_M4.build_flags} - -I examples/companion_radio/ui-orig -D ADVERT_NAME='"ThinkNode_M4 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -56,7 +55,6 @@ lib_deps = ${ThinkNode_M4.lib_deps} [env:ThinkNode_M4_room_server] extends = ThinkNode_M4 build_flags = ${ThinkNode_M4.build_flags} - -I examples/companion_radio/ui-orig -D ADVERT_NAME='"ThinkNode_M4 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -75,7 +73,7 @@ extends = ThinkNode_M4 board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${ThinkNode_M4.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 ; -D MESH_PACKET_LOGGING=1 @@ -89,7 +87,7 @@ build_src_filter = ${ThinkNode_M4.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M4.lib_deps} densaugeo/base64 @ ~1.4.0 stevemarple/MicroNMEA @ ^2.0.6 @@ -100,7 +98,7 @@ extends = ThinkNode_M4 board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${ThinkNode_M4.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -116,7 +114,7 @@ build_src_filter = ${ThinkNode_M4.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M4.lib_deps} densaugeo/base64 @ ~1.4.0 stevemarple/MicroNMEA @ ^2.0.6 diff --git a/variants/thinknode_m4/target.cpp b/variants/thinknode_m4/target.cpp index 59a898f5..fc343169 100644 --- a/variants/thinknode_m4/target.cpp +++ b/variants/thinknode_m4/target.cpp @@ -20,6 +20,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS NullDisplayDriver display; + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/thinknode_m4/target.h b/variants/thinknode_m4/target.h index 1135f5e8..922cc18e 100644 --- a/variants/thinknode_m4/target.h +++ b/variants/thinknode_m4/target.h @@ -11,10 +11,12 @@ #include #ifdef DISPLAY_CLASS #include "NullDisplayDriver.h" + #include #endif #ifdef DISPLAY_CLASS extern NullDisplayDriver display; + extern UITask ui_task; #endif extern ThinkNodeM4Board board; diff --git a/variants/thinknode_m6/platformio.ini b/variants/thinknode_m6/platformio.ini index ad7e6902..f689a8e0 100644 --- a/variants/thinknode_m6/platformio.ini +++ b/variants/thinknode_m6/platformio.ini @@ -78,7 +78,7 @@ board_upload.maximum_size = 712704 build_flags = ${ThinkNode_M6.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -103,7 +103,7 @@ board_upload.maximum_size = 712704 build_flags = ${ThinkNode_M6.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 diff --git a/variants/thinknode_m6/target.cpp b/variants/thinknode_m6/target.cpp index 061f7ad4..2d936d07 100644 --- a/variants/thinknode_m6/target.cpp +++ b/variants/thinknode_m6/target.cpp @@ -22,6 +22,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/thinknode_m6/target.h b/variants/thinknode_m6/target.h index 76188e58..6b9a751c 100644 --- a/variants/thinknode_m6/target.h +++ b/variants/thinknode_m6/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ThinkNodeM6Board board; @@ -22,6 +23,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/thinknode_m7/platformio.ini b/variants/thinknode_m7/platformio.ini index 128b1244..7a6906b3 100644 --- a/variants/thinknode_m7/platformio.ini +++ b/variants/thinknode_m7/platformio.ini @@ -92,7 +92,7 @@ extends = ThinkNode_M7 build_flags = ${ThinkNode_M7.build_flags} ${ThinkNode_M7_ethernet.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -108,7 +108,7 @@ build_src_filter = ${ThinkNode_M7.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M7.lib_deps} ${ThinkNode_M7_ethernet.lib_deps} @@ -118,7 +118,7 @@ lib_deps = extends = ThinkNode_M7 build_flags = ${ThinkNode_M7.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -127,7 +127,7 @@ build_src_filter = ${ThinkNode_M7.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M7.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -136,7 +136,7 @@ lib_deps = extends = ThinkNode_M7 build_flags = ${ThinkNode_M7.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -152,7 +152,7 @@ build_src_filter = ${ThinkNode_M7.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M7.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -162,7 +162,7 @@ extends = ThinkNode_M7 build_flags = ${ThinkNode_M7.build_flags} ${ThinkNode_M7_ethernet.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=NullDisplayDriver @@ -173,7 +173,7 @@ build_src_filter = ${ThinkNode_M7.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${ThinkNode_M7.lib_deps} ${ThinkNode_M7_ethernet.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/thinknode_m7/target.cpp b/variants/thinknode_m7/target.cpp index 8e7e8a05..80825abc 100644 --- a/variants/thinknode_m7/target.cpp +++ b/variants/thinknode_m7/target.cpp @@ -21,6 +21,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; + UITask ui_task(&board, &display); #endif #ifdef RF_SWITCH_TABLE diff --git a/variants/thinknode_m7/target.h b/variants/thinknode_m7/target.h index 34213f57..7aa95421 100644 --- a/variants/thinknode_m7/target.h +++ b/variants/thinknode_m7/target.h @@ -11,6 +11,7 @@ #include #ifdef DISPLAY_CLASS #include "NullDisplayDriver.h" + #include #endif extern ThinkNodeM7Board board; @@ -20,6 +21,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern NullDisplayDriver display; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/thinknode_m8/platformio.ini b/variants/thinknode_m8/platformio.ini index 2f8fb9e5..becd34dd 100644 --- a/variants/thinknode_m8/platformio.ini +++ b/variants/thinknode_m8/platformio.ini @@ -91,7 +91,7 @@ board_upload.maximum_size = 712704 build_flags = ${ThinkNode_M8.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -112,7 +112,7 @@ build_src_filter = ${ThinkNode_M8.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M8.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -127,7 +127,7 @@ board_upload.maximum_size = 712704 build_flags = ${ThinkNode_M8.build_flags} -I src/helpers/ui - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_ROTATION=4 @@ -143,7 +143,7 @@ build_src_filter = ${ThinkNode_M8.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M8.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/thinknode_m8/target.cpp b/variants/thinknode_m8/target.cpp index 04496d3f..e4497ffe 100644 --- a/variants/thinknode_m8/target.cpp +++ b/variants/thinknode_m8/target.cpp @@ -25,6 +25,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); MomentaryButton user_btn(PIN_USER_BTN, 1000, true); RotaryInputGPIO rotary_input(PIN_BUTTON1_A, PIN_BUTTON1_B); MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/thinknode_m8/target.h b/variants/thinknode_m8/target.h index 39928506..39ad6bec 100644 --- a/variants/thinknode_m8/target.h +++ b/variants/thinknode_m8/target.h @@ -13,6 +13,7 @@ #include #include #include + #include #endif extern ThinkNodeM8Board board; @@ -25,6 +26,7 @@ extern EnvironmentSensorManager sensors; extern MomentaryButton user_btn; extern MomentaryButton backlight_btn; extern RotaryInputGPIO rotary_input; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/thinknode_m9/platformio.ini b/variants/thinknode_m9/platformio.ini index d4983491..c718fe94 100755 --- a/variants/thinknode_m9/platformio.ini +++ b/variants/thinknode_m9/platformio.ini @@ -94,7 +94,7 @@ lib_deps = extends = ThinkNode_M9 build_flags = ${ThinkNode_M9.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -106,7 +106,7 @@ build_src_filter = ${ThinkNode_M9.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M9.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -116,7 +116,7 @@ lib_deps = extends = ThinkNode_M9 build_flags = ${ThinkNode_M9.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -126,7 +126,7 @@ build_src_filter = ${ThinkNode_M9.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M9.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -136,7 +136,7 @@ lib_deps = extends = ThinkNode_M9 build_flags = ${ThinkNode_M9.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -151,7 +151,7 @@ build_src_filter = ${ThinkNode_M9.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${ThinkNode_M9.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/thinknode_m9/target.cpp b/variants/thinknode_m9/target.cpp index 990f0388..aa1cc5b9 100644 --- a/variants/thinknode_m9/target.cpp +++ b/variants/thinknode_m9/target.cpp @@ -20,6 +20,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); #ifdef DISPLAY_CLASS DISPLAY_CLASS display; + UITask ui_task(&board, &display); #endif #ifdef RF_SWITCH_TABLE diff --git a/variants/thinknode_m9/target.h b/variants/thinknode_m9/target.h index f083a9f1..d249d16b 100644 --- a/variants/thinknode_m9/target.h +++ b/variants/thinknode_m9/target.h @@ -12,6 +12,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif extern ThinkNodeM9Board board; @@ -22,6 +23,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/wio-e5-mini/platformio.ini b/variants/wio-e5-mini/platformio.ini index 021c7db2..8149b8e0 100644 --- a/variants/wio-e5-mini/platformio.ini +++ b/variants/wio-e5-mini/platformio.ini @@ -39,7 +39,7 @@ build_src_filter = ${lora_e5_mini.build_src_filter} [env:wio-e5-mini_companion_radio_usb] extends = lora_e5_mini build_flags = ${lora_e5_mini.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig -D LORA_TX_POWER=22 -D MAX_CONTACTS=100 -D MAX_GROUP_CHANNELS=8 @@ -48,7 +48,7 @@ build_flags = ${lora_e5_mini.build_flags} build_src_filter = ${lora_e5_mini.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${lora_e5_mini.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/wio-e5-mini/target.cpp b/variants/wio-e5-mini/target.cpp index 92775d55..9366cf81 100644 --- a/variants/wio-e5-mini/target.cpp +++ b/variants/wio-e5-mini/target.cpp @@ -22,6 +22,7 @@ WIOE5SensorManager sensors; #ifdef DISPLAY_CLASS NullDisplayDriver display; + UITask ui_task(&board, &display); #endif #ifndef LORA_CR diff --git a/variants/wio-e5-mini/target.h b/variants/wio-e5-mini/target.h index f4d6a088..fdb0ab54 100644 --- a/variants/wio-e5-mini/target.h +++ b/variants/wio-e5-mini/target.h @@ -9,6 +9,7 @@ #include #ifdef DISPLAY_CLASS #include + #include #endif #include @@ -16,6 +17,7 @@ #ifdef DISPLAY_CLASS extern NullDisplayDriver display; + extern UITask ui_task; #endif class WIOE5Board : public STM32Board { diff --git a/variants/wio-tracker-l1-1w/platformio.ini b/variants/wio-tracker-l1-1w/platformio.ini index 7d3c2dc3..db58c803 100644 --- a/variants/wio-tracker-l1-1w/platformio.ini +++ b/variants/wio-tracker-l1-1w/platformio.ini @@ -30,8 +30,10 @@ lib_deps= ${nrf52_base.lib_deps} extends = WioTrackerL1-1W build_src_filter = ${WioTrackerL1-1W.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${WioTrackerL1-1W.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"WioTrackerL1 Repeater"' -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=50 @@ -45,7 +47,9 @@ lib_deps = ${WioTrackerL1-1W.lib_deps} extends = WioTrackerL1-1W build_src_filter = ${WioTrackerL1-1W.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${WioTrackerL1-1W.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"WioTrackerL1 Room"' -D ADMIN_PASSWORD='"password"' -D ROOM_PASSWORD='"hello"' @@ -60,7 +64,7 @@ extends = WioTrackerL1-1W board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${WioTrackerL1-1W.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SH1106Display @@ -76,8 +80,7 @@ build_flags = ${WioTrackerL1-1W.build_flags} build_src_filter = ${WioTrackerL1-1W.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> - + + + + lib_deps = ${WioTrackerL1-1W.lib_deps} adafruit/RTClib @ ^2.1.3 @@ -89,7 +92,7 @@ extends = WioTrackerL1-1W board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${WioTrackerL1-1W.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -111,7 +114,7 @@ build_src_filter = ${WioTrackerL1-1W.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${WioTrackerL1-1W.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 diff --git a/variants/wio-tracker-l1-1w/target.cpp b/variants/wio-tracker-l1-1w/target.cpp index cd4b8dac..667add43 100644 --- a/variants/wio-tracker-l1-1w/target.cpp +++ b/variants/wio-tracker-l1-1w/target.cpp @@ -26,6 +26,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false); MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false); MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/wio-tracker-l1-1w/target.h b/variants/wio-tracker-l1-1w/target.h index 05bc7ff1..5bc9ad43 100644 --- a/variants/wio-tracker-l1-1w/target.h +++ b/variants/wio-tracker-l1-1w/target.h @@ -15,6 +15,7 @@ #include #endif #include + #include #endif #include @@ -28,6 +29,7 @@ extern EnvironmentSensorManager sensors; extern MomentaryButton joystick_left; extern MomentaryButton joystick_right; extern MomentaryButton back_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/wio-tracker-l1-eink/platformio.ini b/variants/wio-tracker-l1-eink/platformio.ini index 0b448a24..a6cbf1f2 100644 --- a/variants/wio-tracker-l1-eink/platformio.ini +++ b/variants/wio-tracker-l1-eink/platformio.ini @@ -44,7 +44,7 @@ extends = WioTrackerL1Eink board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${WioTrackerL1Eink.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -63,7 +63,7 @@ build_src_filter = ${WioTrackerL1Eink.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${WioTrackerL1Eink.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 diff --git a/variants/wio-tracker-l1/platformio.ini b/variants/wio-tracker-l1/platformio.ini index 19139c28..75d02e1f 100644 --- a/variants/wio-tracker-l1/platformio.ini +++ b/variants/wio-tracker-l1/platformio.ini @@ -20,6 +20,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + +<../variants/wio-tracker-l1> + + + + lib_deps= ${nrf52_base.lib_deps} ${sensor_base.lib_deps} @@ -30,8 +31,10 @@ lib_deps= ${nrf52_base.lib_deps} extends = WioTrackerL1 build_src_filter = ${WioTrackerL1.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${WioTrackerL1.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"WioTrackerL1 Repeater"' -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=50 @@ -45,7 +48,9 @@ lib_deps = ${WioTrackerL1.lib_deps} extends = WioTrackerL1 build_src_filter = ${WioTrackerL1.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${WioTrackerL1.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"WioTrackerL1 Room"' -D ADMIN_PASSWORD='"password"' -D ROOM_PASSWORD='"hello"' @@ -60,7 +65,7 @@ extends = WioTrackerL1 board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${WioTrackerL1.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SH1106Display @@ -75,7 +80,7 @@ build_flags = ${WioTrackerL1.build_flags} build_src_filter = ${WioTrackerL1.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + + + lib_deps = ${WioTrackerL1.lib_deps} @@ -88,7 +93,7 @@ extends = WioTrackerL1 board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${WioTrackerL1.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -109,7 +114,7 @@ build_src_filter = ${WioTrackerL1.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${WioTrackerL1.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 diff --git a/variants/wio-tracker-l1/target.cpp b/variants/wio-tracker-l1/target.cpp index cd4b8dac..667add43 100644 --- a/variants/wio-tracker-l1/target.cpp +++ b/variants/wio-tracker-l1/target.cpp @@ -26,6 +26,7 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(); MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false); MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false); MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/wio-tracker-l1/target.h b/variants/wio-tracker-l1/target.h index 05bc7ff1..5bc9ad43 100644 --- a/variants/wio-tracker-l1/target.h +++ b/variants/wio-tracker-l1/target.h @@ -15,6 +15,7 @@ #include #endif #include + #include #endif #include @@ -28,6 +29,7 @@ extern EnvironmentSensorManager sensors; extern MomentaryButton joystick_left; extern MomentaryButton joystick_right; extern MomentaryButton back_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/xiao_nrf52/platformio.ini b/variants/xiao_nrf52/platformio.ini index b40ebbc3..b9bdb508 100644 --- a/variants/xiao_nrf52/platformio.ini +++ b/variants/xiao_nrf52/platformio.ini @@ -28,7 +28,6 @@ build_flags = ${nrf52_base.build_flags} -D PIN_WIRE_SCL=D6 -D PIN_WIRE_SDA=D7 -D PIN_USER_BTN=PIN_BUTTON1 - -D DISPLAY_CLASS=NullDisplayDriver build_src_filter = ${nrf52_base.build_src_filter} + + @@ -45,7 +44,8 @@ board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${Xiao_nrf52.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig + -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -57,7 +57,7 @@ build_flags = build_src_filter = ${Xiao_nrf52.build_src_filter} + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${Xiao_nrf52.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -68,7 +68,8 @@ board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld board_upload.maximum_size = 708608 build_flags = ${Xiao_nrf52.build_flags} - -I examples/companion_radio/ui-orig + -I src/helpers/ui/companion-orig + -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -78,7 +79,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${Xiao_nrf52.build_src_filter} +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-orig/*.cpp> + + lib_deps = ${Xiao_nrf52.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/xiao_nrf52/target.cpp b/variants/xiao_nrf52/target.cpp index def1dbbe..3c9b8395 100644 --- a/variants/xiao_nrf52/target.cpp +++ b/variants/xiao_nrf52/target.cpp @@ -5,6 +5,7 @@ #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true); + UITask ui_task(&board, &display); #endif XiaoNrf52Board board; diff --git a/variants/xiao_nrf52/target.h b/variants/xiao_nrf52/target.h index 20093904..f28dbc93 100644 --- a/variants/xiao_nrf52/target.h +++ b/variants/xiao_nrf52/target.h @@ -12,8 +12,11 @@ #ifdef DISPLAY_CLASS #include #include + #include + extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif extern XiaoNrf52Board board; diff --git a/variants/xiao_s3/platformio.ini b/variants/xiao_s3/platformio.ini index b8ae7973..d55de0a4 100644 --- a/variants/xiao_s3/platformio.ini +++ b/variants/xiao_s3/platformio.ini @@ -94,7 +94,7 @@ lib_deps = extends = Xiao_S3 build_flags = ${Xiao_S3.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -110,7 +110,7 @@ build_src_filter = ${Xiao_S3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Xiao_S3.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -120,7 +120,7 @@ lib_deps = extends = Xiao_S3 build_flags = ${Xiao_S3.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -134,7 +134,7 @@ build_src_filter = ${Xiao_S3.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Xiao_S3.lib_deps} densaugeo/base64 @ ~1.4.0 diff --git a/variants/xiao_s3/target.cpp b/variants/xiao_s3/target.cpp index a7ae7dd8..7d4bc9e8 100644 --- a/variants/xiao_s3/target.cpp +++ b/variants/xiao_s3/target.cpp @@ -19,6 +19,7 @@ EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/xiao_s3/target.h b/variants/xiao_s3/target.h index 27eddd84..e351bcc1 100644 --- a/variants/xiao_s3/target.h +++ b/variants/xiao_s3/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif #include "XiaoS3Board.h" @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); diff --git a/variants/xiao_s3_wio/platformio.ini b/variants/xiao_s3_wio/platformio.ini index 5a2ef106..e2df413a 100644 --- a/variants/xiao_s3_wio/platformio.ini +++ b/variants/xiao_s3_wio/platformio.ini @@ -131,7 +131,7 @@ lib_deps = extends = Xiao_S3_WIO build_flags = ${Xiao_S3_WIO.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -144,7 +144,7 @@ build_src_filter = ${Xiao_S3_WIO.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Xiao_S3_WIO.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -154,7 +154,7 @@ lib_deps = extends = Xiao_S3_WIO build_flags = ${Xiao_S3_WIO.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -170,7 +170,7 @@ build_src_filter = ${Xiao_S3_WIO.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Xiao_S3_WIO.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -180,7 +180,7 @@ lib_deps = extends = Xiao_S3_WIO build_flags = ${Xiao_S3_WIO.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display @@ -193,7 +193,7 @@ build_src_filter = ${Xiao_S3_WIO.build_src_filter} + + +<../examples/companion_radio/*.cpp> - +<../examples/companion_radio/ui-new/*.cpp> + + lib_deps = ${Xiao_S3_WIO.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -207,14 +207,16 @@ build_src_filter = ${Xiao_S3_WIO.build_src_filter} + + +<../examples/companion_radio/*.cpp> + + build_flags = ${Xiao_S3_WIO.build_flags} - -I examples/companion_radio/ui-new + -I src/helpers/ui/companion-orig -D ENABLE_WIFI_INTERFACE -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 -D WIFI_DEBUG_LOGGING=1 + -D DISPLAY_CLASS=NullDisplayDriver -D WIFI_SSID='"myssid"' -D WIFI_PWD='"password"' ; -D BLE_DEBUG_LOGGING=1 diff --git a/variants/xiao_s3_wio/target.cpp b/variants/xiao_s3_wio/target.cpp index 8a975959..79781dd5 100644 --- a/variants/xiao_s3_wio/target.cpp +++ b/variants/xiao_s3_wio/target.cpp @@ -19,6 +19,7 @@ EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS DISPLAY_CLASS display; MomentaryButton user_btn(PIN_USER_BTN, 1000, true); + UITask ui_task(&board, &display); #endif bool radio_init() { diff --git a/variants/xiao_s3_wio/target.h b/variants/xiao_s3_wio/target.h index 29c5f281..a5839534 100644 --- a/variants/xiao_s3_wio/target.h +++ b/variants/xiao_s3_wio/target.h @@ -10,6 +10,7 @@ #ifdef DISPLAY_CLASS #include #include + #include #endif #include "XiaoS3WIOBoard.h" @@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors; #ifdef DISPLAY_CLASS extern DISPLAY_CLASS display; extern MomentaryButton user_btn; + extern UITask ui_task; #endif bool radio_init(); From 6c45b94783547d35bfaf9006c2b4aee8f1cadf19 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 17:18:54 +1100 Subject: [PATCH 08/12] * 2nd round of .ini refactors --- variants/ebyte_eora_s3/platformio.ini | 5 +++++ variants/gat562_30s_mesh_kit/platformio.ini | 6 +++++- .../gat562_mesh_tracker_pro/platformio.ini | 5 +++++ variants/gat562_mesh_watch13/platformio.ini | 1 + variants/heltec_e213/platformio.ini | 7 +++++++ variants/heltec_e290/platformio.ini | 7 +++++++ variants/heltec_rc32/platformio.ini | 13 ++++++++++--- variants/heltec_rc52/platformio.ini | 13 +++++++++---- variants/heltec_t096/platformio.ini | 11 ++++++++++- variants/heltec_t1/platformio.ini | 9 ++++++++- variants/heltec_t114/platformio.ini | 11 ++++++++++- variants/heltec_t190/platformio.ini | 10 ++++++++++ variants/heltec_tracker/platformio.ini | 7 +++++++ variants/heltec_tracker_v2/platformio.ini | 9 ++++++++- variants/heltec_v2/platformio.ini | 7 +++++++ variants/heltec_v4/platformio.ini | 19 +++++++++++++++++-- variants/heltec_v4_r8/platformio.ini | 13 +++++++++++-- variants/heltec_wireless_paper/platformio.ini | 7 +++++++ variants/ikoka_handheld_nrf/platformio.ini | 3 ++- variants/ikoka_nano_nrf/platformio.ini | 3 ++- variants/ikoka_stick_nrf/platformio.ini | 16 ++++++++++++++++ variants/keepteen_lt1/platformio.ini | 4 ++++ variants/lilygo_t3s3/platformio.ini | 7 +++++++ variants/lilygo_t3s3_sx1276/platformio.ini | 7 +++++++ variants/lilygo_tbeam_1w/platformio.ini | 10 ++++++++++ variants/lilygo_tbeam_SX1262/platformio.ini | 10 ++++++++++ variants/lilygo_tbeam_SX1276/platformio.ini | 9 +++++++++ .../platformio.ini | 10 ++++++++++ variants/lilygo_tdeck/platformio.ini | 4 ++++ variants/lilygo_techo/platformio.ini | 8 ++++++++ variants/lilygo_techo_lite/platformio.ini | 9 +++++++++ variants/lilygo_tlora_v2_1/platformio.ini | 11 +++++++++++ 32 files changed, 253 insertions(+), 18 deletions(-) diff --git a/variants/ebyte_eora_s3/platformio.ini b/variants/ebyte_eora_s3/platformio.ini index ad95efb5..ae839c45 100644 --- a/variants/ebyte_eora_s3/platformio.ini +++ b/variants/ebyte_eora_s3/platformio.ini @@ -37,6 +37,7 @@ build_flags = -D SX126X_RX_BOOSTED_GAIN=1 build_src_filter = ${esp32_base.build_src_filter} +<../variants/ebyte_eora_s3> + + lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 @@ -46,6 +47,7 @@ lib_deps = extends = Ebyte_EoRa-S3 build_flags = ${Ebyte_EoRa-S3.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"EORA_S3-1262 Repeater"' -D ADVERT_LAT=0.0 @@ -57,6 +59,7 @@ build_flags = build_src_filter = ${Ebyte_EoRa-S3.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Ebyte_EoRa-S3.lib_deps} ${esp32_ota.lib_deps} @@ -79,6 +82,7 @@ lib_deps = extends = Ebyte_EoRa-S3 build_flags = ${Ebyte_EoRa-S3.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"EORA_S3-1262 Room"' -D ADVERT_LAT=0.0 @@ -90,6 +94,7 @@ build_flags = build_src_filter = ${Ebyte_EoRa-S3.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${Ebyte_EoRa-S3.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/gat562_30s_mesh_kit/platformio.ini b/variants/gat562_30s_mesh_kit/platformio.ini index 6ec90ff4..8196c36f 100644 --- a/variants/gat562_30s_mesh_kit/platformio.ini +++ b/variants/gat562_30s_mesh_kit/platformio.ini @@ -23,6 +23,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + + + + lib_deps = ${nrf52_base.lib_deps} ${sensor_base.lib_deps} @@ -34,7 +35,7 @@ lib_deps = extends = GAT562_30S_Mesh_Kit build_flags = ${GAT562_30S_Mesh_Kit.build_flags} - -D DISPLAY_CLASS=SSD1306Display + -I src/helpers/ui/server -D ADVERT_NAME='"GAT562 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -45,12 +46,14 @@ build_flags = build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter} + +<../examples/simple_repeater> + + [env:GAT562_30S_Mesh_Kit_room_server] extends = GAT562_30S_Mesh_Kit build_flags = ${GAT562_30S_Mesh_Kit.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"GAT562 Room"' -D ADVERT_LAT=0.0 @@ -62,6 +65,7 @@ build_flags = build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter} + +<../examples/simple_room_server> + + [env:GAT562_30S_Mesh_Kit_companion_radio_usb] diff --git a/variants/gat562_mesh_tracker_pro/platformio.ini b/variants/gat562_mesh_tracker_pro/platformio.ini index 1a8ea3e0..622e3cca 100644 --- a/variants/gat562_mesh_tracker_pro/platformio.ini +++ b/variants/gat562_mesh_tracker_pro/platformio.ini @@ -19,6 +19,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + + + + lib_deps = ${nrf52_base.lib_deps} ${sensor_base.lib_deps} @@ -30,6 +31,7 @@ lib_deps = extends = GAT562_Mesh_Tracker_Pro build_flags = ${GAT562_Mesh_Tracker_Pro.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"GAT562 Repeater"' -D ADVERT_LAT=0.0 @@ -41,12 +43,14 @@ build_flags = build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter} + +<../examples/simple_repeater> + + [env:GAT562_Mesh_Tracker_Pro_room_server] extends = GAT562_Mesh_Tracker_Pro build_flags = ${GAT562_Mesh_Tracker_Pro.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"GAT562 Room"' -D ADVERT_LAT=0.0 @@ -58,6 +62,7 @@ build_flags = build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter} + +<../examples/simple_room_server> + + [env:GAT562_Mesh_Tracker_Pro_companion_radio_usb] diff --git a/variants/gat562_mesh_watch13/platformio.ini b/variants/gat562_mesh_watch13/platformio.ini index 22ea721b..469a761b 100644 --- a/variants/gat562_mesh_watch13/platformio.ini +++ b/variants/gat562_mesh_watch13/platformio.ini @@ -22,6 +22,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + + + + lib_deps = ${nrf52_base.lib_deps} ${sensor_base.lib_deps} diff --git a/variants/heltec_e213/platformio.ini b/variants/heltec_e213/platformio.ini index bc9251cb..15e20a08 100644 --- a/variants/heltec_e213/platformio.ini +++ b/variants/heltec_e213/platformio.ini @@ -37,6 +37,7 @@ build_flags = -D DISP_MOSI=6 build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_e213> + + lib_deps = ${esp32_base.lib_deps} https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip @@ -88,6 +89,7 @@ lib_deps = extends = Heltec_E213_base build_flags = ${Heltec_E213_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E213Display -D ADVERT_NAME='"Heltec E213 Repeater"' -D ADVERT_LAT=0.0 @@ -97,6 +99,7 @@ build_flags = build_src_filter = ${Heltec_E213_base.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Heltec_E213_base.lib_deps} ${esp32_ota.lib_deps} @@ -131,6 +134,7 @@ lib_deps = extends = Heltec_E213_base build_flags = ${Heltec_E213_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E213Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -145,6 +149,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${Heltec_E213_base.lib_deps} ${esp32_ota.lib_deps} @@ -154,6 +159,7 @@ lib_deps = extends = Heltec_E213_base build_flags = ${Heltec_E213_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E213Display -D ADVERT_NAME='"Heltec E213 Room"' -D ADVERT_LAT=0.0 @@ -163,6 +169,7 @@ build_flags = build_src_filter = ${Heltec_E213_base.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${Heltec_E213_base.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/heltec_e290/platformio.ini b/variants/heltec_e290/platformio.ini index d12761f7..854d9eb6 100644 --- a/variants/heltec_e290/platformio.ini +++ b/variants/heltec_e290/platformio.ini @@ -31,6 +31,7 @@ build_flags = -D PIN_BOARD_SCL=38 build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_e290> + + lib_deps = ${esp32_base.lib_deps} https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip @@ -82,6 +83,7 @@ lib_deps = extends = Heltec_E290_base build_flags = ${Heltec_E290_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E290Display -D ADVERT_NAME='"Heltec E290 Repeater"' -D ADVERT_LAT=0.0 @@ -91,6 +93,7 @@ build_flags = build_src_filter = ${Heltec_E290_base.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Heltec_E290_base.lib_deps} ${esp32_ota.lib_deps} @@ -125,6 +128,7 @@ lib_deps = extends = Heltec_E290_base build_flags = ${Heltec_E290_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E290Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -139,6 +143,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${Heltec_E290_base.lib_deps} ${esp32_ota.lib_deps} @@ -148,6 +153,7 @@ lib_deps = extends = Heltec_E290_base build_flags = ${Heltec_E290_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E290Display -D ADVERT_NAME='"Heltec E290 Room"' -D ADVERT_LAT=0.0 @@ -157,6 +163,7 @@ build_flags = build_src_filter = ${Heltec_E290_base.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${Heltec_E290_base.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/heltec_rc32/platformio.ini b/variants/heltec_rc32/platformio.ini index 70d51df9..91d9ea5f 100644 --- a/variants/heltec_rc32/platformio.ini +++ b/variants/heltec_rc32/platformio.ini @@ -72,6 +72,7 @@ build_flags = build_src_filter = ${Heltec_RC32.build_src_filter} + + + + lib_deps = ${Heltec_RC32.lib_deps} @@ -214,6 +215,7 @@ lib_deps = extends = Heltec_RC32_with_display build_flags = ${Heltec_RC32_with_display.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec RC32 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -221,6 +223,7 @@ build_flags = -D MAX_NEIGHBOURS=50 build_src_filter = ${Heltec_RC32_with_display.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${Heltec_RC32_with_display.lib_deps} ${esp32_ota.lib_deps} @@ -230,6 +233,7 @@ lib_deps = extends = Heltec_RC32_with_display build_flags = ${Heltec_RC32_with_display.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -239,6 +243,7 @@ build_flags = build_src_filter = ${Heltec_RC32_with_display.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Heltec_RC32_with_display.lib_deps} ${esp32_ota.lib_deps} @@ -247,6 +252,7 @@ lib_deps = extends = Heltec_RC32_with_display build_flags = ${Heltec_RC32_with_display.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec RC32 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -254,6 +260,7 @@ build_flags = -D ROOM_PASSWORD='"hello"' build_src_filter = ${Heltec_RC32_with_display.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${Heltec_RC32_with_display.lib_deps} ${esp32_ota.lib_deps} @@ -338,17 +345,17 @@ lib_deps = [env:heltec_rc32_sensor] extends = Heltec_RC32_with_display build_flags = - ${Heltec_RC32_with_display.build_flags} + ${Heltec_RC32.build_flags} -D ADVERT_NAME='"Heltec RC32 Sensor"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' -D ENV_PIN_SDA=21 -D ENV_PIN_SCL=18 -build_src_filter = ${Heltec_RC32_with_display.build_src_filter} +build_src_filter = ${Heltec_RC32.build_src_filter} +<../examples/simple_sensor> lib_deps = - ${Heltec_RC32_with_display.lib_deps} + ${Heltec_RC32.lib_deps} ${esp32_ota.lib_deps} [env:heltec_rc32_kiss_modem] diff --git a/variants/heltec_rc52/platformio.ini b/variants/heltec_rc52/platformio.ini index 4d1b132b..4dec0afd 100644 --- a/variants/heltec_rc52/platformio.ini +++ b/variants/heltec_rc52/platformio.ini @@ -66,7 +66,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${heltec_rc52.build_flags} - -I src/helpers/ui/companion-new + -I src/helpers/ui/companion-orig -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -76,7 +76,7 @@ build_src_filter = ${heltec_rc52.build_src_filter} + + +<../examples/companion_radio/*.cpp> - + + + lib_deps = ${heltec_rc52.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -87,7 +87,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 build_flags = ${heltec_rc52.build_flags} - -I src/helpers/ui/companion-new + -I src/helpers/ui/companion-orig -D DISPLAY_CLASS=NullDisplayDriver -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -95,7 +95,7 @@ build_src_filter = ${heltec_rc52.build_src_filter} + + +<../examples/companion_radio/*.cpp> - + + + lib_deps = ${heltec_rc52.lib_deps} densaugeo/base64 @ ~1.4.0 @@ -113,6 +113,7 @@ build_flags = build_src_filter = ${heltec_rc52.build_src_filter} + + + + lib_deps = ${heltec_rc52.lib_deps} @@ -120,8 +121,10 @@ lib_deps = extends = heltec_rc52_with_display build_src_filter = ${heltec_rc52_with_display.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${heltec_rc52_with_display.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec RC52 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -132,8 +135,10 @@ build_flags = extends = heltec_rc52_with_display build_src_filter = ${heltec_rc52_with_display.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${heltec_rc52_with_display.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec RC52 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 diff --git a/variants/heltec_t096/platformio.ini b/variants/heltec_t096/platformio.ini index be344629..0bd9066e 100644 --- a/variants/heltec_t096/platformio.ini +++ b/variants/heltec_t096/platformio.ini @@ -47,6 +47,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_t096> + + + + lib_deps = ${nrf52_base.lib_deps} ${sensor_base.lib_deps} @@ -58,9 +59,10 @@ upload_protocol = nrfutil extends = Heltec_t096 build_src_filter = ${Heltec_t096.build_src_filter} +<../examples/simple_repeater> - + + build_flags = ${Heltec_t096.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_t096 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -73,6 +75,7 @@ build_flags = extends = Heltec_t096 build_flags = ${Heltec_t096.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"RS232 Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -87,13 +90,16 @@ build_flags = build_src_filter = ${Heltec_t096.build_src_filter} + +<../examples/simple_repeater> + + [env:Heltec_t096_room_server] extends = Heltec_t096 build_src_filter = ${Heltec_t096.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${Heltec_t096.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_t096 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -166,5 +172,8 @@ lib_deps = [env:Heltec_t096_kiss_modem] extends = Heltec_t096 +build_flags = + ${Heltec_t096.build_flags} + -U DISPLAY_CLASS build_src_filter = ${Heltec_t096.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/heltec_t1/platformio.ini b/variants/heltec_t1/platformio.ini index 5e9ca188..7c890076 100644 --- a/variants/heltec_t1/platformio.ini +++ b/variants/heltec_t1/platformio.ini @@ -20,6 +20,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_t1> + + + + lib_deps = ${nrf52_base.lib_deps} ${sensor_base.lib_deps} @@ -31,9 +32,10 @@ upload_protocol = nrfutil extends = Heltec_t1 build_src_filter = ${Heltec_t1.build_src_filter} +<../examples/simple_repeater> - + + build_flags = ${Heltec_t1.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_t1 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -46,8 +48,10 @@ build_flags = extends = Heltec_t1 build_src_filter = ${Heltec_t1.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${Heltec_t1.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_t1 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -105,5 +109,8 @@ lib_deps = [env:Heltec_t1_kiss_modem] extends = Heltec_t1 +build_flags = + ${Heltec_t1.build_flags} + -U DISPLAY_CLASS build_src_filter = ${Heltec_t1.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/heltec_t114/platformio.ini b/variants/heltec_t114/platformio.ini index 756747cc..a91febe9 100644 --- a/variants/heltec_t114/platformio.ini +++ b/variants/heltec_t114/platformio.ini @@ -152,6 +152,7 @@ build_src_filter = ${Heltec_t114.build_src_filter} + + + + + lib_deps = ${Heltec_t114.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 @@ -162,9 +163,10 @@ upload_protocol = nrfutil extends = Heltec_t114_with_display build_src_filter = ${Heltec_t114_with_display.build_src_filter} +<../examples/simple_repeater> - + + build_flags = ${Heltec_t114_with_display.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_T114 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -177,6 +179,7 @@ build_flags = extends = Heltec_t114 build_flags = ${Heltec_t114.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"RS232 Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -191,13 +194,16 @@ build_flags = build_src_filter = ${Heltec_t114_with_display.build_src_filter} + +<../examples/simple_repeater> + + [env:Heltec_t114_room_server] extends = Heltec_t114_with_display build_src_filter = ${Heltec_t114_with_display.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${Heltec_t114_with_display.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec_T114 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -253,5 +259,8 @@ lib_deps = [env:Heltec_t114_kiss_modem] extends = Heltec_t114 +build_flags = + ${Heltec_t114.build_flags} + -U DISPLAY_CLASS build_src_filter = ${Heltec_t114.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/heltec_t190/platformio.ini b/variants/heltec_t190/platformio.ini index 6e1f2893..35ca7827 100644 --- a/variants/heltec_t190/platformio.ini +++ b/variants/heltec_t190/platformio.ini @@ -44,6 +44,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + + + lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit GFX Library @ ^1.12.1 @@ -87,6 +88,7 @@ lib_deps = extends = Heltec_T190_base build_flags = ${Heltec_T190_base.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec T190 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -94,6 +96,7 @@ build_flags = -D MAX_NEIGHBOURS=50 build_src_filter = ${Heltec_T190_base.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${Heltec_T190_base.lib_deps} ${esp32_ota.lib_deps} @@ -124,6 +127,7 @@ lib_deps = extends = Heltec_T190_base build_flags = ${Heltec_T190_base.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -136,6 +140,7 @@ build_flags = build_src_filter = ${Heltec_T190_base.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Heltec_T190_base.lib_deps} ${esp32_ota.lib_deps} @@ -144,6 +149,7 @@ lib_deps = extends = Heltec_T190_base build_flags = ${Heltec_T190_base.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Heltec T190 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -151,11 +157,15 @@ build_flags = -D ROOM_PASSWORD='"hello"' build_src_filter = ${Heltec_T190_base.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${Heltec_T190_base.lib_deps} ${esp32_ota.lib_deps} [env:Heltec_T190_kiss_modem] extends = Heltec_T190_base +build_flags = + ${Heltec_T190_base.build_flags} + -U DISPLAY_CLASS build_src_filter = ${Heltec_T190_base.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/heltec_tracker/platformio.ini b/variants/heltec_tracker/platformio.ini index ec5df6c3..2dfd7480 100644 --- a/variants/heltec_tracker/platformio.ini +++ b/variants/heltec_tracker/platformio.ini @@ -44,6 +44,7 @@ build_flags = -D SX126X_RX_BOOSTED_GAIN=1 build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_tracker> + + lib_deps = ${esp32_base.lib_deps} stevemarple/MicroNMEA @ ^2.0.6 @@ -104,6 +105,7 @@ lib_deps = extends = Heltec_tracker_base build_flags = ${Heltec_tracker_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_ROTATION=1 -D DISPLAY_CLASS=ST7735Display -D ADVERT_NAME='"Heltec Repeater"' @@ -116,6 +118,7 @@ build_flags = build_src_filter = ${Heltec_tracker_base.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Heltec_tracker_base.lib_deps} ${esp32_ota.lib_deps} @@ -149,6 +152,7 @@ lib_deps = extends = Heltec_tracker_base build_flags = ${Heltec_tracker_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_ROTATION=1 -D DISPLAY_CLASS=ST7735Display -D ADVERT_NAME='"ESPNow Bridge"' @@ -164,6 +168,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${Heltec_tracker_base.lib_deps} ${esp32_ota.lib_deps} @@ -172,6 +177,7 @@ lib_deps = extends = Heltec_tracker_base build_flags = ${Heltec_tracker_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_ROTATION=1 -D DISPLAY_CLASS=ST7735Display -D ADVERT_NAME='"Heltec Room"' @@ -184,6 +190,7 @@ build_flags = build_src_filter = ${Heltec_tracker_base.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${Heltec_tracker_base.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/heltec_tracker_v2/platformio.ini b/variants/heltec_tracker_v2/platformio.ini index 0192a048..8034ace6 100644 --- a/variants/heltec_tracker_v2/platformio.ini +++ b/variants/heltec_tracker_v2/platformio.ini @@ -52,6 +52,7 @@ build_flags = build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_tracker_v2> + + + lib_deps = ${esp32_base.lib_deps} ${sensor_base.lib_deps} @@ -61,6 +62,7 @@ lib_deps = extends = Heltec_tracker_v2 build_flags = ${Heltec_tracker_v2.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7735Display -D ADVERT_NAME='"Heltec Repeater"' -D ADVERT_LAT=0.0 @@ -72,6 +74,7 @@ build_flags = build_src_filter = ${Heltec_tracker_v2.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Heltec_tracker_v2.lib_deps} ${esp32_ota.lib_deps} @@ -81,6 +84,7 @@ lib_deps = extends = Heltec_tracker_v2 build_flags = ${Heltec_tracker_v2.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7735Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -95,6 +99,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${Heltec_tracker_v2.lib_deps} ${esp32_ota.lib_deps} @@ -103,6 +108,7 @@ lib_deps = extends = Heltec_tracker_v2 build_flags = ${Heltec_tracker_v2.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7735Display -D ADVERT_NAME='"Heltec Room"' -D ADVERT_LAT=0.0 @@ -114,6 +120,7 @@ build_flags = build_src_filter = ${Heltec_tracker_v2.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${Heltec_tracker_v2.lib_deps} ${esp32_ota.lib_deps} @@ -211,7 +218,7 @@ build_flags = -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' - -D DISPLAY_CLASS=ST7735Display + ; -D DISPLAY_CLASS=ST7735Display ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Heltec_tracker_v2.build_src_filter} diff --git a/variants/heltec_v2/platformio.ini b/variants/heltec_v2/platformio.ini index ab38578e..80df13d7 100644 --- a/variants/heltec_v2/platformio.ini +++ b/variants/heltec_v2/platformio.ini @@ -23,6 +23,7 @@ build_flags = -D PIN_OLED_RESET=16 build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_v2> + + lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 @@ -31,6 +32,7 @@ lib_deps = extends = Heltec_lora32_v2 build_flags = ${Heltec_lora32_v2.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec Repeater"' -D ADVERT_LAT=0.0 @@ -43,6 +45,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter} +<../examples/simple_repeater> + + + + lib_deps = ${Heltec_lora32_v2.lib_deps} ${esp32_ota.lib_deps} @@ -76,6 +79,7 @@ lib_deps = extends = Heltec_lora32_v2 build_flags = ${Heltec_lora32_v2.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -91,6 +95,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${Heltec_lora32_v2.lib_deps} ${esp32_ota.lib_deps} @@ -99,6 +104,7 @@ lib_deps = extends = Heltec_lora32_v2 build_flags = ${Heltec_lora32_v2.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec Room"' -D ADVERT_LAT=0.0 @@ -111,6 +117,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter} + + +<../examples/simple_room_server> + + lib_deps = ${Heltec_lora32_v2.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/heltec_v4/platformio.ini b/variants/heltec_v4/platformio.ini index 772293a7..9690bc61 100644 --- a/variants/heltec_v4/platformio.ini +++ b/variants/heltec_v4/platformio.ini @@ -45,6 +45,7 @@ build_flags = build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_v4> + + + lib_deps = ${esp32_base.lib_deps} ${sensor_base.lib_deps} @@ -86,6 +87,7 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec Repeater"' -D ADVERT_LAT=0.0 @@ -97,6 +99,7 @@ build_flags = build_src_filter = ${heltec_v4_oled.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${heltec_v4_oled.lib_deps} ${esp32_ota.lib_deps} @@ -106,6 +109,7 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec Repeater"' -D ADVERT_LAT=0.0 @@ -119,6 +123,7 @@ build_flags = build_src_filter = ${heltec_v4_oled.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${heltec_v4_oled.lib_deps} ${esp32_ota.lib_deps} @@ -128,6 +133,7 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -142,6 +148,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${heltec_v4_oled.lib_deps} ${esp32_ota.lib_deps} @@ -150,6 +157,7 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec Room"' -D ADVERT_LAT=0.0 @@ -161,6 +169,7 @@ build_flags = build_src_filter = ${heltec_v4_oled.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${heltec_v4_oled.lib_deps} ${esp32_ota.lib_deps} @@ -263,7 +272,7 @@ build_flags = -D ADMIN_PASSWORD='"password"' -D ENV_PIN_SDA=3 -D ENV_PIN_SCL=4 - -D DISPLAY_CLASS=SSD1306Display + ;-D DISPLAY_CLASS=SSD1306Display ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${heltec_v4_oled.build_src_filter} @@ -278,6 +287,7 @@ lib_deps = extends = heltec_v4_tft build_flags = ${heltec_v4_tft.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7789LCDDisplay -D ADVERT_NAME='"Heltec Repeater"' -D ADVERT_LAT=0.0 @@ -289,6 +299,7 @@ build_flags = build_src_filter = ${heltec_v4_tft.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${heltec_v4_tft.lib_deps} ${esp32_ota.lib_deps} @@ -299,6 +310,7 @@ lib_deps = extends = heltec_v4_tft build_flags = ${heltec_v4_tft.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7789LCDDisplay -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -313,6 +325,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${heltec_v4_tft.lib_deps} ${esp32_ota.lib_deps} @@ -321,6 +334,7 @@ lib_deps = extends = heltec_v4_tft build_flags = ${heltec_v4_tft.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7789LCDDisplay -D ADVERT_NAME='"Heltec Room"' -D ADVERT_LAT=0.0 @@ -332,6 +346,7 @@ build_flags = build_src_filter = ${heltec_v4_tft.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${heltec_v4_tft.lib_deps} ${esp32_ota.lib_deps} @@ -432,7 +447,7 @@ build_flags = -D ADMIN_PASSWORD='"password"' -D ENV_PIN_SDA=3 -D ENV_PIN_SCL=4 - -D DISPLAY_CLASS=ST7789LCDDisplay + ; -D DISPLAY_CLASS=ST7789LCDDisplay ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${heltec_v4_tft.build_src_filter} diff --git a/variants/heltec_v4_r8/platformio.ini b/variants/heltec_v4_r8/platformio.ini index 6c39b507..536f9d3b 100644 --- a/variants/heltec_v4_r8/platformio.ini +++ b/variants/heltec_v4_r8/platformio.ini @@ -41,6 +41,7 @@ build_flags = build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_v4_r8> + + + lib_deps = ${esp32_base.lib_deps} ${sensor_base.lib_deps} @@ -87,6 +88,7 @@ lib_deps = extends = heltec_v4_r8_oled build_flags = ${heltec_v4_r8_oled.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec R8 Repeater"' -D ADVERT_LAT=0.0 @@ -96,6 +98,7 @@ build_flags = build_src_filter = ${heltec_v4_r8_oled.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${heltec_v4_r8_oled.lib_deps} ${esp32_ota.lib_deps} @@ -105,6 +108,7 @@ lib_deps = extends = heltec_v4_r8_oled build_flags = ${heltec_v4_r8_oled.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"Heltec R8 Room"' -D ADVERT_LAT=0.0 @@ -114,6 +118,7 @@ build_flags = build_src_filter = ${heltec_v4_r8_oled.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${heltec_v4_r8_oled.lib_deps} ${esp32_ota.lib_deps} @@ -204,7 +209,7 @@ build_flags = -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' - -D DISPLAY_CLASS=SSD1306Display + ; -D DISPLAY_CLASS=SSD1306Display build_src_filter = ${heltec_v4_r8_oled.build_src_filter} + +<../examples/simple_sensor> @@ -216,6 +221,7 @@ lib_deps = extends = heltec_v4_r8_tft build_flags = ${heltec_v4_r8_tft.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7789LCDDisplay -D ADVERT_NAME='"Heltec R8 Repeater"' -D ADVERT_LAT=0.0 @@ -225,6 +231,7 @@ build_flags = build_src_filter = ${heltec_v4_r8_tft.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${heltec_v4_r8_tft.lib_deps} ${esp32_ota.lib_deps} @@ -234,6 +241,7 @@ lib_deps = extends = heltec_v4_r8_tft build_flags = ${heltec_v4_r8_tft.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=ST7789LCDDisplay -D ADVERT_NAME='"Heltec R8 Room"' -D ADVERT_LAT=0.0 @@ -243,6 +251,7 @@ build_flags = build_src_filter = ${heltec_v4_r8_tft.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${heltec_v4_r8_tft.lib_deps} ${esp32_ota.lib_deps} @@ -331,7 +340,7 @@ build_flags = -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' - -D DISPLAY_CLASS=ST7789LCDDisplay + ;-D DISPLAY_CLASS=ST7789LCDDisplay build_src_filter = ${heltec_v4_r8_tft.build_src_filter} + +<../examples/simple_sensor> diff --git a/variants/heltec_wireless_paper/platformio.ini b/variants/heltec_wireless_paper/platformio.ini index fea00c2c..059473a1 100644 --- a/variants/heltec_wireless_paper/platformio.ini +++ b/variants/heltec_wireless_paper/platformio.ini @@ -39,6 +39,7 @@ build_flags = -D WIRELESS_PAPER build_src_filter = ${esp32_base.build_src_filter} +<../variants/heltec_wireless_paper> + + lib_deps = ${esp32_base.lib_deps} https://github.com/todd-herbert/heltec-eink-modules/archive/9207eb6ab2b96f66298e0488740218c17b006af7.zip @@ -90,6 +91,7 @@ lib_deps = extends = Heltec_Wireless_Paper_base build_flags = ${Heltec_Wireless_Paper_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E213Display -D ADVERT_NAME='"Heltec WP Repeater"' -D ADVERT_LAT=0.0 @@ -99,6 +101,7 @@ build_flags = build_src_filter = ${Heltec_Wireless_Paper_base.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${Heltec_Wireless_Paper_base.lib_deps} ${esp32_ota.lib_deps} @@ -132,6 +135,7 @@ lib_deps = extends = Heltec_Wireless_Paper_base build_flags = ${Heltec_Wireless_Paper_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E213Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -146,6 +150,7 @@ build_src_filter = ${Heltec_Wireless_Paper_base.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${Heltec_Wireless_Paper_base.lib_deps} ${esp32_ota.lib_deps} @@ -155,6 +160,7 @@ lib_deps = extends = Heltec_Wireless_Paper_base build_flags = ${Heltec_Wireless_Paper_base.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=E213Display -D ADVERT_NAME='"Heltec WP Room"' -D ADVERT_LAT=0.0 @@ -164,6 +170,7 @@ build_flags = build_src_filter = ${Heltec_Wireless_Paper_base.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${Heltec_Wireless_Paper_base.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/ikoka_handheld_nrf/platformio.ini b/variants/ikoka_handheld_nrf/platformio.ini index 40e20d70..c06193f2 100644 --- a/variants/ikoka_handheld_nrf/platformio.ini +++ b/variants/ikoka_handheld_nrf/platformio.ini @@ -35,6 +35,7 @@ lib_deps = ${nrf52_base.lib_deps} lib_deps = ${ikoka_handheld_nrf.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 build_flags = ${ikoka_handheld_nrf.build_flags} + -I src/helpers/ui/companion-new -D DISPLAY_CLASS=SSD1306Display -D DISPLAY_ROTATION=0 -D PIN_WIRE_SCL=D6 @@ -47,7 +48,7 @@ build_flags = ${ikoka_handheld_nrf.build_flags} -I src/helpers/ui/companion-new build_src_filter = ${ikoka_handheld_nrf.build_src_filter} + - +<../examples/companion_radio/ui-new/UITask.cpp> + + +<../examples/companion_radio/*.cpp> [env:ikoka_handheld_nrf_e22_30dbm_096_companion_radio_ble] diff --git a/variants/ikoka_nano_nrf/platformio.ini b/variants/ikoka_nano_nrf/platformio.ini index b65dc035..bff7c62f 100644 --- a/variants/ikoka_nano_nrf/platformio.ini +++ b/variants/ikoka_nano_nrf/platformio.ini @@ -10,7 +10,6 @@ build_flags = ${nrf52_base.build_flags} -I variants/ikoka_nano_nrf -I src/helpers/nrf52 -D P_LORA_TX_LED=11 - -D DISPLAY_CLASS=NullDisplayDriver -D USE_SX1262 -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper @@ -84,6 +83,7 @@ build_flags = -D OFFLINE_QUEUE_SIZE=256 -I src/helpers/ui/companion-new -D QSPIFLASH=1 + -D DISPLAY_CLASS=NullDisplayDriver ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 @@ -106,6 +106,7 @@ build_flags = -I src/helpers/ui/companion-new -D QSPIFLASH=1 -D ENABLE_USB_INTERFACE + -D DISPLAY_CLASS=NullDisplayDriver ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${ikoka_nano_nrf.build_src_filter} diff --git a/variants/ikoka_stick_nrf/platformio.ini b/variants/ikoka_stick_nrf/platformio.ini index b108c066..529ca2d0 100644 --- a/variants/ikoka_stick_nrf/platformio.ini +++ b/variants/ikoka_stick_nrf/platformio.ini @@ -45,6 +45,7 @@ build_src_filter = ${ikoka_stick_nrf.build_src_filter} + + +<../variants/ikoka_stick_nrf> + + [ikoka_stick_nrf_e22_30dbm] extends = ikoka_stick_nrf @@ -60,6 +61,7 @@ build_src_filter = ${ikoka_stick_nrf.build_src_filter} + + +<../variants/ikoka_stick_nrf> + + [ikoka_stick_nrf_e22_33dbm] extends = ikoka_stick_nrf @@ -75,6 +77,7 @@ build_src_filter = ${ikoka_stick_nrf.build_src_filter} + + +<../variants/ikoka_stick_nrf> + + ;;; abstracted firmware roles @@ -126,6 +129,7 @@ lib_deps = extends = ikoka_stick_nrf build_flags = ${ikoka_stick_nrf.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Ikoka Stick Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -136,11 +140,13 @@ build_flags = build_src_filter = ${ikoka_stick_nrf.build_src_filter} + +<../examples/simple_repeater/*.cpp> + + [ikoka_stick_nrf_room_server] extends = ikoka_stick_nrf build_flags = ${ikoka_stick_nrf.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Ikoka Stick Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -149,6 +155,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${ikoka_stick_nrf.build_src_filter} +<../examples/simple_room_server/*.cpp> + + ;;; hardware + firmware variants @@ -294,15 +301,24 @@ build_src_filter = [env:ikoka_stick_nrf_22dbm_kiss_modem] extends = ikoka_stick_nrf_e22_22dbm +build_flags = + ${ikoka_stick_nrf_e22_22dbm.build_flags} + -U DISPLAY_CLASS build_src_filter = ${ikoka_stick_nrf_e22_22dbm.build_src_filter} +<../examples/kiss_modem/> [env:ikoka_stick_nrf_30dbm_kiss_modem] extends = ikoka_stick_nrf_e22_30dbm +build_flags = + ${ikoka_stick_nrf_e22_30dbm.build_flags} + -U DISPLAY_CLASS build_src_filter = ${ikoka_stick_nrf_e22_30dbm.build_src_filter} +<../examples/kiss_modem/> [env:ikoka_stick_nrf_33dbm_kiss_modem] extends = ikoka_stick_nrf_e22_33dbm +build_flags = + ${ikoka_stick_nrf_e22_33dbm.build_flags} + -U DISPLAY_CLASS build_src_filter = ${ikoka_stick_nrf_e22_33dbm.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/keepteen_lt1/platformio.ini b/variants/keepteen_lt1/platformio.ini index cfc71050..2a494615 100644 --- a/variants/keepteen_lt1/platformio.ini +++ b/variants/keepteen_lt1/platformio.ini @@ -26,8 +26,10 @@ build_src_filter = ${KeepteenLT1.build_src_filter} +<../examples/simple_repeater> + + + + build_flags = ${KeepteenLT1.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"KeepteenLT1 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -45,7 +47,9 @@ build_src_filter = ${KeepteenLT1.build_src_filter} +<../examples/simple_room_server> + + + + build_flags = ${KeepteenLT1.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"KeepteenLT1 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 diff --git a/variants/lilygo_t3s3/platformio.ini b/variants/lilygo_t3s3/platformio.ini index d186c99d..552fc8aa 100644 --- a/variants/lilygo_t3s3/platformio.ini +++ b/variants/lilygo_t3s3/platformio.ini @@ -29,6 +29,7 @@ build_flags = -D SX126X_RX_BOOSTED_GAIN=1 build_src_filter = ${esp32_base.build_src_filter} +<../variants/lilygo_t3s3> + + lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 @@ -38,6 +39,7 @@ lib_deps = extends = LilyGo_T3S3_sx1262 build_flags = ${LilyGo_T3S3_sx1262.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"T3S3-1262 Repeater"' -D ADVERT_LAT=0.0 @@ -49,6 +51,7 @@ build_flags = build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${LilyGo_T3S3_sx1262.lib_deps} ${esp32_ota.lib_deps} @@ -81,6 +84,7 @@ lib_deps = extends = LilyGo_T3S3_sx1262 build_flags = ${LilyGo_T3S3_sx1262.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -95,6 +99,7 @@ build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${LilyGo_T3S3_sx1262.lib_deps} ${esp32_ota.lib_deps} @@ -117,6 +122,7 @@ lib_deps = extends = LilyGo_T3S3_sx1262 build_flags = ${LilyGo_T3S3_sx1262.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"T3S3-1262 Room"' -D ADVERT_LAT=0.0 @@ -128,6 +134,7 @@ build_flags = build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${LilyGo_T3S3_sx1262.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/lilygo_t3s3_sx1276/platformio.ini b/variants/lilygo_t3s3_sx1276/platformio.ini index b71f02f6..920916b9 100644 --- a/variants/lilygo_t3s3_sx1276/platformio.ini +++ b/variants/lilygo_t3s3_sx1276/platformio.ini @@ -26,6 +26,7 @@ build_flags = -D LORA_TX_POWER=20 build_src_filter = ${esp32_base.build_src_filter} +<../variants/lilygo_t3s3_sx1276> + + lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 @@ -35,6 +36,7 @@ lib_deps = extends = LilyGo_T3S3_sx1276 build_flags = ${LilyGo_T3S3_sx1276.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"T3S3-1276 Repeater"' -D ADVERT_LAT=0.0 @@ -46,6 +48,7 @@ build_flags = build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${LilyGo_T3S3_sx1276.lib_deps} ${esp32_ota.lib_deps} @@ -78,6 +81,7 @@ lib_deps = extends = LilyGo_T3S3_sx1276 build_flags = ${LilyGo_T3S3_sx1276.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 @@ -92,6 +96,7 @@ build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} + + +<../examples/simple_repeater> + + lib_deps = ${LilyGo_T3S3_sx1276.lib_deps} ${esp32_ota.lib_deps} @@ -114,6 +119,7 @@ lib_deps = extends = LilyGo_T3S3_sx1276 build_flags = ${LilyGo_T3S3_sx1276.build_flags} + -I src/helpers/ui/server -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"T3S3-1276 Room"' -D ADVERT_LAT=0.0 @@ -125,6 +131,7 @@ build_flags = build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} + +<../examples/simple_room_server> + + lib_deps = ${LilyGo_T3S3_sx1276.lib_deps} ${esp32_ota.lib_deps} diff --git a/variants/lilygo_tbeam_1w/platformio.ini b/variants/lilygo_tbeam_1w/platformio.ini index 74d180ba..4d20fc6c 100644 --- a/variants/lilygo_tbeam_1w/platformio.ini +++ b/variants/lilygo_tbeam_1w/platformio.ini @@ -58,6 +58,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + + + lib_deps = ${esp32_base.lib_deps} @@ -69,6 +70,7 @@ lib_deps = extends = LilyGo_TBeam_1W build_flags = ${LilyGo_TBeam_1W.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Beam 1W Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -80,6 +82,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_1W.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${LilyGo_TBeam_1W.lib_deps} ${esp32_ota.lib_deps} @@ -89,6 +92,7 @@ lib_deps = extends = LilyGo_TBeam_1W build_flags = ${LilyGo_TBeam_1W.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Beam 1W Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -100,6 +104,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_1W.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${LilyGo_TBeam_1W.lib_deps} ${esp32_ota.lib_deps} @@ -178,6 +183,7 @@ lib_deps = extends = LilyGo_TBeam_1W build_flags = ${LilyGo_TBeam_1W.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Beam 1W ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -192,11 +198,15 @@ build_flags = build_src_filter = ${LilyGo_TBeam_1W.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${LilyGo_TBeam_1W.lib_deps} ${esp32_ota.lib_deps} [env:LilyGo_TBeam_1W_kiss_modem] extends = LilyGo_TBeam_1W +build_flags = + ${LilyGo_TBeam_1W.build_flags} + -U DISPLAY_CLASS build_src_filter = ${LilyGo_TBeam_1W.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/lilygo_tbeam_SX1262/platformio.ini b/variants/lilygo_tbeam_SX1262/platformio.ini index 650b630c..cadfb14b 100644 --- a/variants/lilygo_tbeam_SX1262/platformio.ini +++ b/variants/lilygo_tbeam_SX1262/platformio.ini @@ -33,6 +33,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + + + board_build.partitions = min_spiffs.csv ; get around 4mb flash limit lib_deps = ${esp32_base.lib_deps} @@ -69,6 +70,7 @@ lib_deps = extends = LilyGo_TBeam_SX1262 build_flags = ${LilyGo_TBeam_SX1262.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Tbeam SX1262 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -78,6 +80,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_SX1262.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${LilyGo_TBeam_SX1262.lib_deps} ${esp32_ota.lib_deps} @@ -108,6 +111,7 @@ lib_deps = extends = LilyGo_TBeam_SX1262 build_flags = ${LilyGo_TBeam_SX1262.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -120,6 +124,7 @@ build_flags = build_src_filter = ${LilyGo_TBeam_SX1262.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${LilyGo_TBeam_SX1262.lib_deps} ${esp32_ota.lib_deps} @@ -128,6 +133,7 @@ lib_deps = extends = LilyGo_TBeam_SX1262 build_flags = ${LilyGo_TBeam_SX1262.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Tbeam SX1262 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -137,11 +143,15 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_SX1262.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${LilyGo_TBeam_SX1262.lib_deps} ${esp32_ota.lib_deps} [env:Tbeam_SX1262_kiss_modem] extends = LilyGo_TBeam_SX1262 +build_flags = + ${LilyGo_TBeam_SX1262.build_flags} + -U DISPLAY_CLASS build_src_filter = ${LilyGo_TBeam_SX1262.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/lilygo_tbeam_SX1276/platformio.ini b/variants/lilygo_tbeam_SX1276/platformio.ini index ebfbaa3f..7f1dcaa4 100644 --- a/variants/lilygo_tbeam_SX1276/platformio.ini +++ b/variants/lilygo_tbeam_SX1276/platformio.ini @@ -65,6 +65,7 @@ lib_deps = extends = LilyGo_TBeam_SX1276 build_flags = ${LilyGo_TBeam_SX1276.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Tbeam Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -75,6 +76,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_SX1276.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${LilyGo_TBeam_SX1276.lib_deps} ${esp32_ota.lib_deps} @@ -106,6 +108,7 @@ lib_deps = extends = LilyGo_TBeam_SX1276 build_flags = ${LilyGo_TBeam_SX1276.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -119,6 +122,7 @@ build_flags = build_src_filter = ${LilyGo_TBeam_SX1276.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${LilyGo_TBeam_SX1276.lib_deps} ${esp32_ota.lib_deps} @@ -127,6 +131,7 @@ lib_deps = extends = LilyGo_TBeam_SX1276 build_flags = ${LilyGo_TBeam_SX1276.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"Tbeam Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -135,11 +140,15 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_SX1276.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${LilyGo_TBeam_SX1276.lib_deps} ${esp32_ota.lib_deps} [env:Tbeam_SX1276_kiss_modem] extends = LilyGo_TBeam_SX1276 +build_flags = + ${LilyGo_TBeam_SX1276.build_flags} + -U DISPLAY_CLASS build_src_filter = ${LilyGo_TBeam_SX1276.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/lilygo_tbeam_supreme_SX1262/platformio.ini b/variants/lilygo_tbeam_supreme_SX1262/platformio.ini index d57dcaea..ae4eb4a9 100644 --- a/variants/lilygo_tbeam_supreme_SX1262/platformio.ini +++ b/variants/lilygo_tbeam_supreme_SX1262/platformio.ini @@ -35,6 +35,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + + + board_build.partitions = default_8MB.csv board_upload.flash_size = 8MB board_upload.maximum_size = 8388608 @@ -50,6 +51,7 @@ lib_deps = extends = T_Beam_S3_Supreme_SX1262 build_flags = ${T_Beam_S3_Supreme_SX1262.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Beam S3 Supreme SX1262 Repeater"' -D ADVERT_LAT=0 -D ADVERT_LON=0 @@ -59,6 +61,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${T_Beam_S3_Supreme_SX1262.build_src_filter} +<../examples/simple_repeater> + + lib_deps = ${T_Beam_S3_Supreme_SX1262.lib_deps} ${esp32_ota.lib_deps} @@ -89,6 +92,7 @@ lib_deps = extends = T_Beam_S3_Supreme_SX1262 build_flags = ${T_Beam_S3_Supreme_SX1262.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0 -D ADVERT_LON=0 @@ -101,6 +105,7 @@ build_flags = build_src_filter = ${T_Beam_S3_Supreme_SX1262.build_src_filter} + +<../examples/simple_repeater> + + lib_deps = ${T_Beam_S3_Supreme_SX1262.lib_deps} ${esp32_ota.lib_deps} @@ -109,6 +114,7 @@ lib_deps = extends = T_Beam_S3_Supreme_SX1262 build_flags = ${T_Beam_S3_Supreme_SX1262.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T_Beam_S3_Supreme_SX1262 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -118,6 +124,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${T_Beam_S3_Supreme_SX1262.build_src_filter} +<../examples/simple_room_server> + + lib_deps = ${T_Beam_S3_Supreme_SX1262.lib_deps} ${esp32_ota.lib_deps} @@ -173,5 +180,8 @@ lib_deps = [env:T_Beam_S3_Supreme_SX1262_kiss_modem] extends = T_Beam_S3_Supreme_SX1262 +build_flags = + ${T_Beam_S3_Supreme_SX1262.build_flags} + -U DISPLAY_CLASS build_src_filter = ${T_Beam_S3_Supreme_SX1262.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/lilygo_tdeck/platformio.ini b/variants/lilygo_tdeck/platformio.ini index 83631c30..65564cad 100644 --- a/variants/lilygo_tdeck/platformio.ini +++ b/variants/lilygo_tdeck/platformio.ini @@ -103,6 +103,7 @@ lib_deps = extends = LilyGo_TDeck build_flags = ${LilyGo_TDeck.build_flags} + -U DISPLAY_CLASS -D ADVERT_NAME='"TDeck Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -117,5 +118,8 @@ lib_deps = [env:LilyGo_TDeck_kiss_modem] extends = LilyGo_TDeck +build_flags = + ${LilyGo_TDeck.build_flags} + -U DISPLAY_CLASS build_src_filter = ${LilyGo_TDeck.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/lilygo_techo/platformio.ini b/variants/lilygo_techo/platformio.ini index db47ef38..15d96b0f 100644 --- a/variants/lilygo_techo/platformio.ini +++ b/variants/lilygo_techo/platformio.ini @@ -49,6 +49,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + +<../variants/lilygo_techo> + + lib_deps = ${nrf52_base.lib_deps} stevemarple/MicroNMEA @ ^2.0.6 @@ -62,8 +63,10 @@ upload_protocol = nrfutil extends = LilyGo_T-Echo build_src_filter = ${LilyGo_T-Echo.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${LilyGo_T-Echo.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Echo Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -76,8 +79,10 @@ build_flags = extends = LilyGo_T-Echo build_src_filter = ${LilyGo_T-Echo.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${LilyGo_T-Echo.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Echo Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -138,5 +143,8 @@ lib_deps = [env:LilyGo_T-Echo_kiss_modem] extends = LilyGo_T-Echo +build_flags = + ${LilyGo_T-Echo.build_flags} + -U DISPLAY_CLASS build_src_filter = ${LilyGo_T-Echo.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/lilygo_techo_lite/platformio.ini b/variants/lilygo_techo_lite/platformio.ini index 37790dec..f1cad6ef 100644 --- a/variants/lilygo_techo_lite/platformio.ini +++ b/variants/lilygo_techo_lite/platformio.ini @@ -35,6 +35,7 @@ build_src_filter = ${nrf52_base.build_src_filter} + + +<../variants/lilygo_techo_lite> + + lib_deps = ${nrf52_base.lib_deps} stevemarple/MicroNMEA @ ^2.0.6 @@ -48,8 +49,10 @@ upload_protocol = nrfutil extends = LilyGo_T-Echo-Lite build_src_filter = ${LilyGo_T-Echo-Lite.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${LilyGo_T-Echo-Lite.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Echo-Lite Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -62,8 +65,10 @@ build_flags = extends = LilyGo_T-Echo-Lite build_src_filter = ${LilyGo_T-Echo-Lite.build_src_filter} +<../examples/simple_room_server> + + build_flags = ${LilyGo_T-Echo-Lite.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T-Echo-Lite Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -100,8 +105,12 @@ lib_deps = [env:LilyGo_T-Echo-Lite_kiss_modem] extends = LilyGo_T-Echo-Lite +build_flags = + ${LilyGo_T-Echo-Lite.build_flags} + -U DISPLAY_CLASS build_src_filter = ${LilyGo_T-Echo-Lite.build_src_filter} +<../examples/kiss_modem/> + [env:LilyGo_T-Echo-Lite_companion_radio_usb] extends = LilyGo_T-Echo-Lite board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld diff --git a/variants/lilygo_tlora_v2_1/platformio.ini b/variants/lilygo_tlora_v2_1/platformio.ini index 2e69c5da..8ddf5ae3 100644 --- a/variants/lilygo_tlora_v2_1/platformio.ini +++ b/variants/lilygo_tlora_v2_1/platformio.ini @@ -33,6 +33,7 @@ build_src_filter = ${esp32_base.build_src_filter} + +<../variants/lilygo_tlora_v2_1> + + + lib_deps = ${esp32_base.lib_deps} ${sensor_base.lib_deps} @@ -42,8 +43,10 @@ lib_deps = extends = LilyGo_TLora_V2_1_1_6 build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"TLora-V2.1-1.6 Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -114,6 +117,7 @@ extends = LilyGo_TLora_V2_1_1_6 build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} + +<../examples/simple_room_server> + + build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} -D ADVERT_NAME='"TLora-V2.1-1.6 Room"' @@ -157,8 +161,10 @@ extends = LilyGo_TLora_V2_1_1_6 build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} + +<../examples/simple_repeater> + + build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"RS232 Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -180,8 +186,10 @@ extends = LilyGo_TLora_V2_1_1_6 build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} + +<../examples/simple_repeater> + + build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"ESPNow Bridge"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -198,5 +206,8 @@ lib_deps = [env:LilyGo_TLora_V2_1_1_6_kiss_modem] extends = LilyGo_TLora_V2_1_1_6 +build_flags = + ${LilyGo_TLora_V2_1_1_6.build_flags} + -U DISPLAY_CLASS build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} +<../examples/kiss_modem/> From 54a88a307ad76328b2c30becf7fae518d3b59d29 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 17:56:59 +1100 Subject: [PATCH 09/12] * misc fixes --- variants/heltec_t096/target.h | 2 +- variants/heltec_t1/target.h | 2 +- variants/lilygo_t3_stm32/platformio.ini | 3 +++ variants/lilygo_t3_stm32/target.cpp | 1 + variants/lilygo_t3_stm32/target.h | 2 ++ variants/muzi_base/target.h | 2 ++ 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/variants/heltec_t096/target.h b/variants/heltec_t096/target.h index a71aeda1..c9936159 100644 --- a/variants/heltec_t096/target.h +++ b/variants/heltec_t096/target.h @@ -12,9 +12,9 @@ #ifdef DISPLAY_CLASS #include #include +#include #else #include "helpers/ui/NullDisplayDriver.h" -#include #endif extern T096Board board; diff --git a/variants/heltec_t1/target.h b/variants/heltec_t1/target.h index 57ead9c0..6cf78c37 100644 --- a/variants/heltec_t1/target.h +++ b/variants/heltec_t1/target.h @@ -12,9 +12,9 @@ #ifdef DISPLAY_CLASS #include #include +#include #else #include "helpers/ui/NullDisplayDriver.h" -#include #endif extern T1Board board; diff --git a/variants/lilygo_t3_stm32/platformio.ini b/variants/lilygo_t3_stm32/platformio.ini index 33ca0b40..e17fb96d 100644 --- a/variants/lilygo_t3_stm32/platformio.ini +++ b/variants/lilygo_t3_stm32/platformio.ini @@ -26,17 +26,20 @@ build_flags = ${stm32_base.build_flags} build_src_filter = ${stm32_base.build_src_filter} +<../variants/lilygo_t3_stm32> + + + lib_deps = ${stm32_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 [env:LilyGo_T3_STM32_repeater] extends = lilygo_t3_stm32 build_flags = ${lilygo_t3_stm32.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"T3 STM32 Repeater"' -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=50 build_src_filter = ${lilygo_t3_stm32.build_src_filter} +<../examples/simple_repeater/*.cpp> + + [env:LilyGo_T3_STM32_companion_radio_usb] extends = lilygo_t3_stm32 diff --git a/variants/lilygo_t3_stm32/target.cpp b/variants/lilygo_t3_stm32/target.cpp index b7a14c48..5b6b822a 100644 --- a/variants/lilygo_t3_stm32/target.cpp +++ b/variants/lilygo_t3_stm32/target.cpp @@ -17,6 +17,7 @@ SensorManager sensors; DISPLAY_CLASS display; // PH3 is also BOOT0: the board's button is active high with an external pull-down. MomentaryButton user_btn(PIN_USER_BTN, 1000, false); +UITask ui_task(&board, &display); static const uint32_t rfswitch_pins[] = { PB2, PB6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC diff --git a/variants/lilygo_t3_stm32/target.h b/variants/lilygo_t3_stm32/target.h index 2db3173b..597ea800 100644 --- a/variants/lilygo_t3_stm32/target.h +++ b/variants/lilygo_t3_stm32/target.h @@ -11,6 +11,7 @@ #endif #include #include +#include class LilyGoT3STM32Board : public STM32Board { public: @@ -31,6 +32,7 @@ extern SensorManager sensors; #endif extern DISPLAY_CLASS display; extern MomentaryButton user_btn; +extern UITask ui_task; bool radio_init(); mesh::LocalIdentity radio_new_identity(); diff --git a/variants/muzi_base/target.h b/variants/muzi_base/target.h index 6914b1fb..ca644ae6 100644 --- a/variants/muzi_base/target.h +++ b/variants/muzi_base/target.h @@ -26,6 +26,8 @@ extern MomentaryButton joystick_left; extern MomentaryButton joystick_right; extern MomentaryButton back_btn; + #include + extern UITask ui_task; #elif defined(DISPLAY_CLASS) #include "helpers/ui/NullDisplayDriver.h" extern DISPLAY_CLASS display; From dad7186c5b9872a7f62e2ddf54b2502fcf7e7b2f Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 18:19:26 +1100 Subject: [PATCH 10/12] * more fixes --- variants/keepteen_lt1/platformio.ini | 1 + variants/lilygo_tbeam_SX1276/platformio.ini | 1 + variants/lilygo_tdeck/platformio.ini | 7 ++----- variants/wio-tracker-l1-1w/platformio.ini | 1 + variants/wio-tracker-l1-eink/platformio.ini | 3 +++ 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/variants/keepteen_lt1/platformio.ini b/variants/keepteen_lt1/platformio.ini index 2a494615..305a8807 100644 --- a/variants/keepteen_lt1/platformio.ini +++ b/variants/keepteen_lt1/platformio.ini @@ -16,6 +16,7 @@ build_flags = ${nrf52_base.build_flags} build_src_filter = ${nrf52_base.build_src_filter} + +<../variants/keepteen_lt1> + + lib_deps= ${nrf52_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 stevemarple/MicroNMEA @ ^2.0.6 diff --git a/variants/lilygo_tbeam_SX1276/platformio.ini b/variants/lilygo_tbeam_SX1276/platformio.ini index 7f1dcaa4..80ffcd8d 100644 --- a/variants/lilygo_tbeam_SX1276/platformio.ini +++ b/variants/lilygo_tbeam_SX1276/platformio.ini @@ -30,6 +30,7 @@ build_src_filter = ${esp32_base.build_src_filter} + + + + + board_build.partitions = min_spiffs.csv ; get around 4mb flash limit lib_deps = ${esp32_base.lib_deps} diff --git a/variants/lilygo_tdeck/platformio.ini b/variants/lilygo_tdeck/platformio.ini index 65564cad..48ffb3b1 100644 --- a/variants/lilygo_tdeck/platformio.ini +++ b/variants/lilygo_tdeck/platformio.ini @@ -41,7 +41,6 @@ build_flags = -D P_LORA_SCLK=40 ; LORA SCLK pin -D P_LORA_MISO=38 ; LORA MISO pin -D P_LORA_MOSI=41 ; LORA MOSI pin - -D DISPLAY_CLASS=ST7789LCDDisplay -D DISPLAY_SCALE_X=2.5 -D DISPLAY_SCALE_Y=3.75 -D PIN_TFT_RST=-1 @@ -68,6 +67,7 @@ extends = LilyGo_TDeck build_flags = ${LilyGo_TDeck.build_flags} -I src/helpers/ui/companion-new + -D DISPLAY_CLASS=ST7789LCDDisplay -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D OFFLINE_QUEUE_SIZE=256 @@ -86,6 +86,7 @@ extends = LilyGo_TDeck build_flags = ${LilyGo_TDeck.build_flags} -I src/helpers/ui/companion-new + -D DISPLAY_CLASS=ST7789LCDDisplay -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 @@ -103,7 +104,6 @@ lib_deps = extends = LilyGo_TDeck build_flags = ${LilyGo_TDeck.build_flags} - -U DISPLAY_CLASS -D ADVERT_NAME='"TDeck Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -118,8 +118,5 @@ lib_deps = [env:LilyGo_TDeck_kiss_modem] extends = LilyGo_TDeck -build_flags = - ${LilyGo_TDeck.build_flags} - -U DISPLAY_CLASS build_src_filter = ${LilyGo_TDeck.build_src_filter} +<../examples/kiss_modem/> diff --git a/variants/wio-tracker-l1-1w/platformio.ini b/variants/wio-tracker-l1-1w/platformio.ini index db58c803..ce54fbef 100644 --- a/variants/wio-tracker-l1-1w/platformio.ini +++ b/variants/wio-tracker-l1-1w/platformio.ini @@ -21,6 +21,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/wio-tracker-l1-1w> + + + + lib_deps= ${nrf52_base.lib_deps} ${sensor_base.lib_deps} adafruit/Adafruit SH110X @ ^2.1.13 diff --git a/variants/wio-tracker-l1-eink/platformio.ini b/variants/wio-tracker-l1-eink/platformio.ini index a6cbf1f2..2652bb92 100644 --- a/variants/wio-tracker-l1-eink/platformio.ini +++ b/variants/wio-tracker-l1-eink/platformio.ini @@ -33,6 +33,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/wio-tracker-l1> + + + + lib_deps= ${nrf52_base.lib_deps} ${sensor_base.lib_deps} adafruit/Adafruit GFX Library @ ^1.12.1 @@ -74,8 +75,10 @@ debug_tool=stlink extends = WioTrackerL1Eink build_src_filter = ${WioTrackerL1Eink.build_src_filter} +<../examples/simple_repeater> + + build_flags = ${WioTrackerL1Eink.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"WioTrackerL1 Eink Repeater"' -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=50 From ad701588d70da03645e2a13ebecd3fa5e4118c02 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 18:32:36 +1100 Subject: [PATCH 11/12] * final fix --- variants/lilygo_tlora_v2_1/platformio.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/variants/lilygo_tlora_v2_1/platformio.ini b/variants/lilygo_tlora_v2_1/platformio.ini index 8ddf5ae3..9f6ea582 100644 --- a/variants/lilygo_tlora_v2_1/platformio.ini +++ b/variants/lilygo_tlora_v2_1/platformio.ini @@ -120,6 +120,7 @@ build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter} + build_flags = ${LilyGo_TLora_V2_1_1_6.build_flags} + -I src/helpers/ui/server -D ADVERT_NAME='"TLora-V2.1-1.6 Room"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 From 6ec03df241ac2012da3ddd8fcd3686577158ab62 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Fri, 20 Nov 2026 11:02:45 +1100 Subject: [PATCH 12/12] * unit test fix --- test/test_companion_node_prefs/test_companion_node_prefs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_companion_node_prefs/test_companion_node_prefs.cpp b/test/test_companion_node_prefs/test_companion_node_prefs.cpp index 433c9710..fa1390af 100644 --- a/test/test_companion_node_prefs/test_companion_node_prefs.cpp +++ b/test/test_companion_node_prefs/test_companion_node_prefs.cpp @@ -4,7 +4,7 @@ #include #include -#include "../../examples/companion_radio/NodePrefs.h" +#include "../../src/helpers/CompanionNodePrefs.h" class ReplayStream : public Stream { const char* _text;