From f053e12786b3975019db99925cb859ecceb43049 Mon Sep 17 00:00:00 2001 From: Kenneth Privitt Date: Fri, 28 Aug 2026 14:14:29 -0700 Subject: [PATCH 01/21] Additional clarity on country legal requirements --- docs/cli_commands.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 8772b929fe6..4ccdd8d1a81 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -215,6 +215,9 @@ This document provides an overview of CLI commands that can be sent to MeshCore **Note:** Requires reboot to apply +**Notes:** These settings control the setup of the radio parameters.Refer to the node's manual for the correct settings to use. +**Setting a value too high or too low may violate the laws in your country.** + --- #### View or change this node's transmit power @@ -244,6 +247,9 @@ This document provides an overview of CLI commands that can be sent to MeshCore - `cr`: Coding rate (5-8) - `timeout_mins`: Duration in minutes (must be > 0) +**Notes:** These settings control the setup of the radio parameters.Refer to the node's manual for the correct settings to use. +**Setting a value too high or too low may violate the laws in your country.** + **Note:** This is not saved to preferences and will clear on reboot --- @@ -575,6 +581,9 @@ This document provides an overview of CLI commands that can be sent to MeshCore > **Note:** Added in firmware v1.15.0 +**Notes:** Refer to the node's manual for the correct settings to use. +**Setting a value too high may violate the laws in your country.** + --- #### View or change the airtime factor (duty cycle limit) From ef84dabaeccae4cf327e22edd985427bf3822164 Mon Sep 17 00:00:00 2001 From: Kenneth Privitt Date: Wed, 2 Sep 2026 15:24:55 -0700 Subject: [PATCH 02/21] Doc change to clarify radio setting country reqs. --- docs/cli_commands.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 4ccdd8d1a81..0977347f409 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -215,7 +215,8 @@ This document provides an overview of CLI commands that can be sent to MeshCore **Note:** Requires reboot to apply -**Notes:** These settings control the setup of the radio parameters.Refer to the node's manual for the correct settings to use. +**Notes:** These settings control the setup of the radio parameters. +Refer to the node's manual for the correct settings to use. **Setting a value too high or too low may violate the laws in your country.** --- @@ -232,7 +233,9 @@ This document provides an overview of CLI commands that can be sent to MeshCore **Default:** Varies by board -**Notes:** This setting only controls the power level of the LoRa chip. Some nodes have an additional power amplifier stage which increases the total output. Refer to the node's manual for the correct setting to use. **Setting a value too high may violate the laws in your country.** +**Notes:** This setting only controls the power level of the LoRa chip. Some nodes have an additional power amplifier stage which increases the total output. +Refer to the node's manual for the correct setting to use. +**Setting a value too high may violate the laws in your country.** --- @@ -247,7 +250,8 @@ This document provides an overview of CLI commands that can be sent to MeshCore - `cr`: Coding rate (5-8) - `timeout_mins`: Duration in minutes (must be > 0) -**Notes:** These settings control the setup of the radio parameters.Refer to the node's manual for the correct settings to use. +**Notes:** These settings control the setup of the radio parameters. +Refer to the node's manual for the correct settings to use. **Setting a value too high or too low may violate the laws in your country.** **Note:** This is not saved to preferences and will clear on reboot From cc885674a7810aa446d59c1630dcaf2747843433 Mon Sep 17 00:00:00 2001 From: Blake Latchford Date: Fri, 6 Nov 2026 20:46:07 -0500 Subject: [PATCH 03/21] docs: describe stats-core output and its error flags Document the stats-core output fields and decode the `errors` bitmask (shown as "Debug flags" in the app), from the ERR_EVENT_* flags in Dispatcher.h, and note that the flags stay set until reboot or `clear stats`. Fixes #3039 Co-Authored-By: Claude Opus 5.5 --- docs/cli_commands.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 9fde4d436e5..f41a304a3d9 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -142,6 +142,18 @@ This document provides an overview of CLI commands that can be sent to MeshCore **Serial Only:** Yes +**Note:** Output format: `{"battery_mv":,"uptime_secs":,"errors":,"queue_len":}` + +**Note:** `errors` is a bitmask shown as "Debug flags" in the app's repeater status. + +| Value | Flag | Meaning | +|-------|------|---------| +| 1 | `ERR_EVENT_FULL` | A packet failed to send because the memory pool was full. | +| 2 | `ERR_EVENT_CAD_TIMEOUT` | After waiting 4 seconds for a gap, a packet was transmitted into a busy network. | +| 4 | `ERR_EVENT_STARTRX_TIMEOUT` | The radio was out of receive mode for more than 8 seconds. | + +Flags stay set until the node reboots or `clear stats` is run. + --- ### Radio Stats - Noise floor, Last RSSI/SNR, Airtime, Receive errors From 1e2c5557f7dc0f7ab79263b799a2ee1b219e5d07 Mon Sep 17 00:00:00 2001 From: Florent Date: Sat, 14 Nov 2026 15:03:01 -0400 Subject: [PATCH 04/21] gps: support time sync on rak i2c gps --- src/helpers/sensors/RakLocationProvider.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/helpers/sensors/RakLocationProvider.h b/src/helpers/sensors/RakLocationProvider.h index 2dda12a512d..9938dc9cfab 100644 --- a/src/helpers/sensors/RakLocationProvider.h +++ b/src/helpers/sensors/RakLocationProvider.h @@ -8,6 +8,7 @@ class RakLocationProvider : public LocationProvider { RakI2cGpsDriver& _driver; // RAK12500 (I2C) NmeaGpsDriver _nmeaDriver; // serial NMEA module MicroNMEALocationProvider _nmea; + mesh::RTCClock* _clock; bool _detected = false; bool _useI2c = false; uint32_t _gpsPeriodSeconds = 0; @@ -31,7 +32,7 @@ class RakLocationProvider : public LocationProvider { // serialPower, if given, switches the serial module's supply (WB_IO2 on WisBlock bases). RakLocationProvider(RakI2cGpsDriver& driver, mesh::RTCClock* clock = nullptr, UART_TYPE& serial = Serial1, RefCountedDigitalPin* serialPower = nullptr) - : _driver(driver), _nmeaDriver(serial, PIN_GPS_TX, PIN_GPS_RX, GPS_RESET, GPS_EN, serialPower), + : _driver(driver), _clock(clock), _nmeaDriver(serial, PIN_GPS_TX, PIN_GPS_RX, GPS_RESET, GPS_EN, serialPower), _nmea(_nmeaDriver, clock) {} void syncTime() override { @@ -177,6 +178,10 @@ class RakLocationProvider : public LocationProvider { fixStatsFix((uint32_t)(millis() - _acquisitionStarted)); } saveRak12500Fix(); + if (_time_sync_needed && _clock != nullptr && _lastFix.timestamp > 0) { + _clock->setCurrentTime(_lastFix.timestamp); + _time_sync_needed = false; + } } if (_gpsPeriodSeconds > 0 && _acquiringPeriodically && hasCurrentFix) { From 0e164ae46c637fc69822397d8eae57e24b217cbd Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Wed, 18 Nov 2026 18:18:06 +1100 Subject: [PATCH 05/21] * 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 7e4cfd4f22e..dcaa71db5bc 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 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks { 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 d8e3ce1d2f4..00000000000 --- 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 d475b13d842..cb1a7d693d0 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 507b42b1aad..1a81340aff5 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 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks { 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 8e4c2fcf64e..00000000000 --- 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 a27259f1177..00000000000 --- 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 4bfad4e54d7..dad05bba2c6 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 e6746d470c7..2dc610cc0f2 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 @@ class SensorMesh : public mesh::Mesh, public CommonCLICallbacks { // 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 75a0b465098..00000000000 --- 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 a27259f1177..00000000000 --- 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 66991daada5..5a99dcbf5f0 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 00000000000..4df2d37bbbb --- /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 00000000000..433e8ba509d --- /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 e0b6a41df5f..b6a08270e88 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 00000000000..57e649ac8a8 --- /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 06c028569e1..a5978c3ee40 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 00000000000..571abbb9f34 --- /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 00000000000..bccc29b000b --- /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 f2f712eb027..e2cca868917 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 2944b384356..242a51e5b80 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 7b8ac815279cab538ccdc878c7dda5e40763d59e Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Wed, 18 Nov 2026 22:00:04 +1100 Subject: [PATCH 06/21] * 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 e0a145caf1e..b2100fed5e9 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 cd6966e8a6b..9dcb9d050f7 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 846708b5326..228f049eb5a 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 @@ class MyMesh : public BaseChatMesh, public DataStoreHost { 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 @@ class MyMesh : public BaseChatMesh, public DataStoreHost { } 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 @@ class MyMesh : public BaseChatMesh, public DataStoreHost { 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 3e7ec6dcf53..1093efc1f0d 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 835384b7415..b6aa79a8e51 100644 --- a/src/helpers/BaseChatMesh.h +++ b/src/helpers/BaseChatMesh.h @@ -182,5 +182,8 @@ class BaseChatMesh : public mesh::Mesh { 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 00000000000..86c4e03f0e3 --- /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 d927c1a3faf..fa2449a804f 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 ee225341572..714daa2829a 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 @@ class SplashScreen : public UIScreen { memcpy(_version_info, ver, len); _version_info[len] = 0; + _build_date = build_date; + dismiss_after = millis() + BOOT_SCREEN_MILLIS; } @@ -74,7 +80,7 @@ class SplashScreen : public UIScreen { 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 @@ class HomeScreen : public UIScreen { 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 @@ class HomeScreen : public UIScreen { 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 @@ class HomeScreen : public UIScreen { } } } 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 @@ class HomeScreen : public UIScreen { #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 @@ class MsgPreviewScreen : public UIScreen { } }; -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 045b1060cfd..288a8245c2a 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 @@ class UITask : public AbstractUITask { 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 @@ class UITask : public AbstractUITask { 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 @@ class UITask : public AbstractUITask { 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 c2fd80fb2a1..144e4d60fad 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 d5f798986fd..21070528fdb 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 @@ class UITask : public AbstractUITask { _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 1b48cca84f9..f9f06aea1db 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 @@ class SplashScreen : public UIScreen { 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 @@ class SplashScreen : public UIScreen { 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 @@ class SplashScreen : public UIScreen { } }; +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 @@ class HomeScreen : public UIScreen { 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 @@ class HomeScreen : public UIScreen { } 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 @@ class HomeScreen : public UIScreen { }; -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 084919aa6c3..ea581edb2b1 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 @@ class UITask : public AbstractUITask { 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 @@ class UITask : public AbstractUITask { 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 @@ class UITask : public AbstractUITask { 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 a5978c3ee40..ef9ba10b3b6 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 571abbb9f34..3e31880c194 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 17ba8d1b2b6..b76eed9a049 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 00000000000..481a1a4f308 --- /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 00000000000..0522b18e9e7 --- /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 ea74bd0ca24..6d1e1510b78 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 f394f7dafb0..bd76e0b7ffd 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 80286460bb6..51a52778865 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 00000000000..ed46ebcccef --- /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 84e0870e2ba..2c1703bc0fa 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 e678e29ca68..27110343f0b 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 @@ class MeshTrackerX1SensorManager: public SensorManager { #ifdef DISPLAY_CLASS extern NullDisplayDriver display; + extern UITask ui_task; #endif extern MeshTrackerX1Board board; From 363b391866abd3b3cceb387d7a475b8e3d51aa08 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Wed, 18 Nov 2026 23:31:08 +1100 Subject: [PATCH 07/21] * 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 1093efc1f0d..57a33c17569 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 fa2449a804f..98343aa762f 100644 --- a/src/helpers/ui/AbstractUITask.h +++ b/src/helpers/ui/AbstractUITask.h @@ -27,7 +27,7 @@ class AbstractUITask : public MeshEventListener { 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 714daa2829a..652fef94a4f 100644 --- a/src/helpers/ui/companion-new/UITask.cpp +++ b/src/helpers/ui/companion-new/UITask.cpp @@ -787,9 +787,12 @@ class MsgPreviewScreen : public UIScreen { } }; -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 288a8245c2a..f6ee999b8b5 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 144e4d60fad..2c5abff7ba0 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 21070528fdb..d5b59a54953 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 f9f06aea1db..a26c50e0e7b 100644 --- a/src/helpers/ui/companion-tiny/UITask.cpp +++ b/src/helpers/ui/companion-tiny/UITask.cpp @@ -453,10 +453,12 @@ class HomeScreen : public UIScreen { } }; - -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 ea581edb2b1..7dce2a1a976 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 ef9ba10b3b6..412b386e628 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 3e31880c194..c8b9f0c7955 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 481a1a4f308..af01d850282 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 ed46ebcccef..aaa710e6256 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 e5ca7a0e49c3ffe9b25464d2845fc85492c36509 Mon Sep 17 00:00:00 2001 From: fdlamotte Date: Wed, 18 Nov 2026 11:40:11 -0400 Subject: [PATCH 08/21] 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 b2c7201efb8..8e0a602e5e0 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 00000000000..5d64b0c4ad4 --- /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 00000000000..734263ef810 --- /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 0ed9a0d0c5a..5c1d001bed8 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 7cce1edbf88..d5b8d61db30 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 08206735801f7829a2f65d94942442d5be8fb1b6 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 11:54:24 +1100 Subject: [PATCH 09/21] * 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 f6ee999b8b5..a0f2398e85a 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 d5b59a54953..1dc6ccb72b9 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 7dce2a1a976..c45b83b6e15 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 57e649ac8a8..6e3b4b49211 100644 --- a/src/helpers/ui/server/UITask.h +++ b/src/helpers/ui/server/UITask.h @@ -16,7 +16,7 @@ class UITask : public BaseUITask { 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 412b386e628..95629b41c81 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 bccc29b000b..77de97881e9 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 af01d850282..00000000000 --- 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 0522b18e9e7..00000000000 --- 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 6d1e1510b78..b3375dbbe14 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 51a52778865..fa8cc4babc8 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 aaa710e6256..00000000000 --- 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 2c1703bc0fa..daba06196bd 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 8fae584dfa322f5ed54fa9ef7dcc83e0d1b65ce1 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 12:05:14 +1100 Subject: [PATCH 10/21] * 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 8e0a602e5e0..e4dfdc6163a 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 5d64b0c4ad4..00000000000 --- 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 734263ef810..00000000000 --- 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 5c1d001bed8..493ce84458b 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 adac387b0fc86a97c6ca306304bce027ac628b7b Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 15:22:23 +1100 Subject: [PATCH 11/21] * 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 0f69e2761de..f7861cc34bb 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 bf723516657..e2f20359fbc 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 07cec79ba79..377377434b5 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 1ab3d3fb1bf..ad95efb5829 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 91d851ff3e2..f66fc224a4c 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 b64694f5d36..6ee9d3e2ca2 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 326e3f705cb..6ec90ff4fbd 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 96e38a79ee6..3cbdfbb1af0 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 d526a5d0379..6cd99be49a7 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 0aac297a027..215bdc79301 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 9111704fca2..c09d89ab7f1 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 1141cee622f..1a8ea3e06ee 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 225aa161964..e2f8fa83acb 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 0d3b7d76ea9..52b31b35fca 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 d8ca3052786..22ea721bc80 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 95bcf6dc280..679a63f0e95 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 9ed5cda7172..412ee2118cd 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 02193819050..bc9251cba66 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 6914769d9c8..6ec3c2b2778 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 6f2c291bb8d..71b62813eaa 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 c7cd5f21ea1..d12761f76a8 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 f23279548f9..41457ebdc02 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 d78521fcfb8..b93e03fc61b 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 9e7fb04d189..315ddbd64b6 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 97550a00530..31ddbee05c0 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 2f07c021b18..70d51df957e 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 e095baab814..242e171294b 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 04cb6d94a49..02ceca6166d 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 d652649450e..4d1b132bcf0 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 dc5652d8062..d6437dea84f 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 efb7fdcb319..0d93e929e5e 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 1f572fc9baa..be344629dcf 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 d0c2c07e143..91e5e0fccbd 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 137d8db5ec4..a71aeda16ec 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 28ed67edba8..5e9ca188879 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 1d9c8baafc8..05bccae7471 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 ffd9434fac4..57ead9c0471 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 e795bc7fa5c..756747cc500 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 dc62f83bbb3..2f12ad42b30 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 5aac84dbe22..d5cfd30e5d1 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 2835539379d..6e1f28933ff 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 6a2eab7d847..24ba3825a05 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 cde63220a84..97828dbf0f8 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 207e0a508da..45791ae73e0 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 ae627a0b52d..df4dbea1b7e 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 0b9de40ca44..b0c0acee260 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 3affd8ae0fb..ec5df6c3786 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 67f98306c9d..e8208a78cbd 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 f6fea637103..d369a2ed5c1 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 5fd9edabe7a..0192a0485ce 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 12b01bcc6c6..1472979ff2b 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 240d9d4c58e..1e4b0f04176 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 6435936ebdd..ab38578e512 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 585b0a37749..30cdb7cf22f 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 cdffc18a172..cf2ca366ece 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 95629b41c81..bb106487448 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 69ac9ad89c4..772293a7da3 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 0f87c6b3b36..b562b7387a4 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 5d668186b2b..9e3defb667d 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 e22ca8f5418..6c39b5077f5 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 27e9f468640..0e0456674d1 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 2d1d7a5bb45..d7555d9328f 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 56f95b2f980..fea00c2c769 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 be21695ec4e..41e353efcd5 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 7206678181b..c272a2f0895 100644 --- a/variants/heltec_wireless_paper/target.h +++ b/variants/heltec_wireless_paper/target.h @@ -16,6 +16,7 @@ class HeltecWirelessPaperBoard : public HeltecV3Board { #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 1c6f17c24c2..40e20d7050e 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 6c53c5e324a..561e19bd7b7 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 18f7c9c5ee0..d071259c731 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 87c6240eec6..b65dc035cba 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 baf02c3d122..9058cf8617d 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 30ee5cb69ee..006bd738dd1 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 c8184fc4052..b108c066e60 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 bb140505a86..9b3d47183c2 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 46b05e8b2e0..792f3e3e9c5 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 11dc214b09f..cfc71050af6 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 dd7c6741b5e..0436f7e2b6d 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 5b73bb66847..e8f67ebd750 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 39e059b701f..33ca0b405f5 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 966235c6613..d186c99d862 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 34df31c3b17..8c02015e52c 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 965cdd1a2e5..224acd84a98 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 c6497dcb13d..b71f02f6bc9 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 770db4a7746..7a4d3e8fd29 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 c5fbff6289d..e1c400dbfd3 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 0ed5b9a42fb..8fd01b1f27a 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 b6b0c82cf92..53474976e7d 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 ff168fbedf4..89bb7efe8e4 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 ab9c9e67cdc..74d180baaf2 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 db11747f8b8..89f566100be 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 d6cd61b4ccd..edf8bca0e52 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 62ac09f875e..650b630cfa8 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 b97dda41e85..ec9b0e93357 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 c532a73af9a..109a57bbb0f 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 f5f490479cb..ebfbaa3f335 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 be7c8287f8a..061a9260f38 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 0d56f88f8b9..aa60996640a 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 18a82802563..d57dcaea852 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 86b9116c3a3..02b39b46afd 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 25caa711698..b2c8b9362e3 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 00571db93bc..83631c302a3 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 4084a73bc06..74026a260b2 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 9d35af9b13a..5e52afdf1ef 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 2c2a3e4304a..db47ef38662 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 394d79c5c43..6cb6a69f2d1 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 a1668f03187..dea948fe676 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 2a92eb9be2d..37790deccf5 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 6d199fff834..1fd0b622355 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 2b8a1783f06..b0cdcf4eb6b 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 dc60b6f75e4..2e69c5da7a1 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 8c120161505..9b02845a3c3 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 fa954b329b1..7d109c456c0 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 a6f823dbf71..78edbab5625 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 ee8f944de41..47ad2de3b1b 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 244fe7d2d5b..466d9a7005d 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 5e35251cc6c..b4ec065ad00 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 1ccfe151017..24a4b6f1205 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 9581d422cef..1f7ab872152 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 ffab9d57c62..bb5f21c09df 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 a3d6089ffde..969c1fc2062 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 1bf8876b282..9cfce3d2d9a 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 c0a3c5f94e8..a4741de797d 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 50d678266e8..25eded16019 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 3987e18c29b..066eae9217c 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 1743e719921..3a7bc05ea2c 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 8d9a6e0721f..38d78a9d5b2 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 db44058c81c..a82565e0196 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 72a3ecac239..5fea7797862 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 6653ada1912..6f9fcdad437 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 0c143e1bcbc..6914b1fb7e9 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 c56f1f5c2e9..3dffa301560 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 fb51c04d94c..834fd5e9763 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 3081de2c19b..57f21accac8 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 5bf3f268503..a16122d53ce 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 b817b3e9918..fbc12ea041f 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 fedc48e7fa3..68230fa2a6e 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 d540b9ecc6f..78c511f3bf2 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 0f8d31de84e..52e7f78fc05 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 ceb9fe49cf0..79ea6348665 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 dcbcf8e1dff..c91cfc73cf2 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 c7e7b07659f..4fe43d0e1bb 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 d53b6a1c3d8..5200ca39f25 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 87c55f0f2e1..2d45bff2054 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 da27c2fab20..41cd725b732 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 5758d9cda7e..cebfc22b8d4 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 e577ab4e979..8a953a919a8 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 d181388b011..2146a6b2e65 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 9b1d11a0198..34e9be5881f 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 f93cd53996b..0ce8e4fb367 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 d157e4b1d3f..97f1e6da955 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 a9316558dad..cc71cbcfa40 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 00653e90e5e..e235eca0484 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 c5d94d51f52..eaf73c7b02b 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 813cb807ffb..385dcec22f2 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 c04cd4e4822..1cc6f30a328 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 d6140187170..56395cb0477 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 3e80ae639be..364e33c35bc 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 fbe18d2d11a..3d2f9fc1125 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 a5952d6e32a..280e3a53476 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 4895447c043..1bd46dd666d 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 dab4575e5c7..206d0e688d9 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 c4fd344ddea..66e58ccb813 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 f5365eb58c8..2cdee0ff633 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 b4eadbba319..963f4619d4a 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 2ce8bb39244..dab6c911f6e 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 189169d216e..da65236865c 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 b67349dcb9a..4bc3fc1ca44 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 ab8b0de0b85..766229d4633 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 609c32bc7f2..a9db46ade15 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 68508bcb5ad..e6eea918064 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 @@ class T1000SensorManager: public SensorManager { #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 ae00d28eac4..8be7e19c5cf 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 4183c514fb4..d29d13b4caf 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 9c8a6e80f4a..08cb9a569c7 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 862c7154331..089c1f0a339 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 ff0dd6cf4db..9ea042ba743 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 37ede89e555..6928036d13d 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 ce1e7e59e48..791f4573502 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 bb5746cac02..f9f5ed71d97 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 f2d34328dad..8026f53b450 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 06762f88d82..a69d9303e7d 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 59a898f5499..fc3431695c2 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 1135f5e8900..922cc18e19c 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 ad7e6902cf0..f689a8e0e42 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 061f7ad4ca0..2d936d07c2e 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 76188e584e0..6b9a751ccac 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 128b124417d..7a6906b38b7 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 8e7e8a05a7c..80825abc166 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 34213f57cab..7aa95421110 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 2f8fb9e557b..becd34dd7ae 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 04496d3fc9d..e4497ffe8c2 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 39928506585..39ad6bec901 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 d4983491db5..c718fe94f23 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 990f0388a71..aa1cc5b9bfa 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 f083a9f1b3d..d249d16bb25 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 021c7db20a4..8149b8e0a1a 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 92775d5511f..9366cf81da9 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 f4d6a088466..fdb0ab5425b 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 7d3c2dc39ac..db58c803989 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 cd4b8dac9c5..667add43e82 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 05bc7ff1cae..5bc9ad43487 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 0b448a24b3f..a6cbf1f2afa 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 19139c289eb..75d02e1f85c 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 cd4b8dac9c5..667add43e82 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 05bc7ff1cae..5bc9ad43487 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 b40ebbc3600..b9bdb5083f1 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 def1dbbeaaa..3c9b839575b 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 20093904aad..f28dbc930d7 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 b8ae79733ca..d55de0a4771 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 a7ae7dd8e00..7d4bc9e8439 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 27eddd844e9..e351bcc157e 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 5a2ef106173..e2df413a020 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 8a975959fa4..79781dd5c0c 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 29c5f281447..a5839534e4b 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 89d805a02fc0e5a75fb40643f1aeeca6a4fafc1e Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 17:18:54 +1100 Subject: [PATCH 12/21] * 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 ad95efb5829..ae839c459f6 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 6ec90ff4fbd..8196c36f820 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 1a8ea3e06ee..622e3ccadb5 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 22ea721bc80..469a761bff7 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 bc9251cba66..15e20a08ea3 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 d12761f76a8..854d9eb60d9 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 70d51df957e..91d9ea5fff1 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 4d1b132bcf0..4dec0afd8c3 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 be344629dcf..0bd9066ebff 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 5e9ca188879..7c890076e5b 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 756747cc500..a91febe966c 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 6e1f28933ff..35ca7827abd 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 ec5df6c3786..2dfd7480eab 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 0192a0485ce..8034ace615c 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 ab38578e512..80df13d7752 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 772293a7da3..9690bc6137e 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 6c39b5077f5..536f9d3b576 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 fea00c2c769..059473a14ef 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 40e20d7050e..c06193f257b 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 b65dc035cba..bff7c62ff0f 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 b108c066e60..529ca2d0065 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 cfc71050af6..2a494615c93 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 d186c99d862..552fc8aacce 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 b71f02f6bc9..920916b9eef 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 74d180baaf2..4d20fc6c57c 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 650b630cfa8..cadfb14b6f3 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 ebfbaa3f335..7f1dcaa49a4 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 d57dcaea852..ae4eb4a982c 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 83631c302a3..65564cad2f8 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 db47ef38662..15d96b0f22c 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 37790deccf5..f1cad6ef692 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 2e69c5da7a1..8ddf5ae3ad0 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 baed10539c582e70caf2d923dc0473d13a164f50 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 17:56:59 +1100 Subject: [PATCH 13/21] * 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 a71aeda16ec..c993615969b 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 57ead9c0471..6cf78c37bc0 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 33ca0b405f5..e17fb96d702 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 b7a14c482fd..5b6b822a922 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 2db3173bbb3..597ea800b3a 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 6914b1fb7e9..ca644ae6f9c 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 79121ea40e302e5f962aed4f10d0d0eab949a6fa Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 18:19:26 +1100 Subject: [PATCH 14/21] * 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 2a494615c93..305a8807220 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 7f1dcaa49a4..80ffcd8d636 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 65564cad2f8..48ffb3b1cff 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 db58c803989..ce54fbef00a 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 a6cbf1f2afa..2652bb9287e 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 2ab6f411fbda54e76075779f1f0a77e013d8f572 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 19 Nov 2026 18:32:36 +1100 Subject: [PATCH 15/21] * 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 8ddf5ae3ad0..9f6ea582f4a 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 1c1a73df18335c0edd55302db130c2398af441ce Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Fri, 20 Nov 2026 11:02:45 +1100 Subject: [PATCH 16/21] * 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 433c9710601..fa1390af5e7 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; From 34811a4ce538901648b14c185b4f7e28be7152b9 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Fri, 20 Nov 2026 11:07:37 +1100 Subject: [PATCH 17/21] * removed various copied 'dirty' members --- src/helpers/CommonGpsPrefs.h | 6 ------ src/helpers/CommonRadioPrefs.h | 5 ----- 2 files changed, 11 deletions(-) diff --git a/src/helpers/CommonGpsPrefs.h b/src/helpers/CommonGpsPrefs.h index 5502cba8022..11adc678524 100644 --- a/src/helpers/CommonGpsPrefs.h +++ b/src/helpers/CommonGpsPrefs.h @@ -4,16 +4,10 @@ #include "SensorManager.h" class CommonGpsPrefs : public ConfigSerializer { - bool _is_dirty = false; - protected: CommonGpsPrefs() = default; public: - void markDirty() { _is_dirty = true; } - void clearDirty() { _is_dirty = false; } - bool isDirty() const { return _is_dirty; } - virtual bool isGpsEnabled() const = 0; virtual void setGpsEnabled(bool enabled) = 0; virtual uint32_t getGpsPeriod() const = 0; diff --git a/src/helpers/CommonRadioPrefs.h b/src/helpers/CommonRadioPrefs.h index d0083b8c73b..a479e698ee2 100644 --- a/src/helpers/CommonRadioPrefs.h +++ b/src/helpers/CommonRadioPrefs.h @@ -3,14 +3,9 @@ #include "KeyValueStore.h" class CommonRadioPrefs : public ConfigSerializer, public KeyValueStore { - bool _is_dirty = false; protected: CommonRadioPrefs() { } public: - void markDirty() { _is_dirty = true; } - void clearDirty() { _is_dirty = false; } - bool isDirty() const { return _is_dirty; } - virtual float getFreq() const = 0; virtual void setFreq(float f) = 0; From 7df63ae26e8cbf7654a7bc3499238eee104a6556 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Sat, 21 Nov 2026 20:59:42 +1100 Subject: [PATCH 18/21] * copied sensor telemetry push --- examples/simple_repeater/MyMesh.cpp | 164 ++++++++++++++++++++++++++++ examples/simple_repeater/MyMesh.h | 3 + 2 files changed, 167 insertions(+) diff --git a/examples/simple_repeater/MyMesh.cpp b/examples/simple_repeater/MyMesh.cpp index 21f833a588d..9501ba92e63 100644 --- a/examples/simple_repeater/MyMesh.cpp +++ b/examples/simple_repeater/MyMesh.cpp @@ -1,5 +1,6 @@ #include "MyMesh.h" #include +#include /* ------------------------------ Config -------------------------------- */ @@ -41,6 +42,14 @@ #define TXT_ACK_DELAY 200 #endif +#ifndef SENSOR_READ_INTERVAL_SECS + #define SENSOR_READ_INTERVAL_SECS 60 +#endif + +#ifndef TELEM_SUBSCRIBE_MAX_SECS + #define TELEM_SUBSCRIBE_MAX_SECS 3600 +#endif + #define FIRMWARE_VER_LEVEL 2 #define REQ_TYPE_GET_STATUS 0x01 // same as _GET_STATS @@ -50,6 +59,9 @@ #define REQ_TYPE_GET_NEIGHBOURS 0x06 #define REQ_TYPE_GET_OWNER_INFO 0x07 // FIRMWARE_VER_LEVEL >= 2 +#define REQ_TYPE_SUBSCRIBE 0x08 +#define REQ_TYPE_UNSUBSCRIBE 0x09 + #define RESP_SERVER_LOGIN_OK 0 // response to ANON_REQ #define ANON_REQ_TYPE_REGIONS 0x01 @@ -208,6 +220,67 @@ uint8_t MyMesh::handleAnonClockReq(const mesh::Identity& sender, uint32_t sender return 0; } +/* --------------------- Cayenne LPP helpers ----------------------------*/ + +static float findTelemValue(const uint8_t* buf, uint8_t size, uint8_t channel, uint8_t type, float def_value) { + uint8_t i = 0; + + while (i + 2 < size) { + // Get channel # + uint8_t ch = buf[i++]; + // Get data type + uint8_t t = buf[i++]; + uint8_t sz = LPPData::getDataSize(t); + + if (ch == channel && t == type) { + return LPPData::getFloat(&buf[i], sz, LPPData::getMultiplier(t), LPPData::isSigned(t)); + } + i += sz; // skip + } + return def_value; // not found +} + +/* ------------------ end Cayenne LPP helpers ----------------------*/ + +bool MyMesh::telemHasChanged(ClientInfo* c) { + auto buf = telemetry.getBuffer(); + uint8_t size = telemetry.getSize(); + uint8_t i = 0; + bool changed = false; + + while (i + 2 < c->extra.sensor.min_deltas_len) { + uint8_t ch = c->extra.sensor.min_deltas[i]; // Get channel # + uint8_t t = c->extra.sensor.min_deltas[i + 1]; // Get data type + uint8_t sz = LPPData::getDataSize(t); + + float min_delta = LPPData::getFloat(&c->extra.sensor.min_deltas[i + 2], sz, LPPData::getMultiplier(t), LPPData::isSigned(t)); + float pv = LPPData::getFloat(&c->extra.sensor.prev_telem[i + 2], sz, LPPData::getMultiplier(t), LPPData::isSigned(t)); + + float v = findTelemValue(buf, size, ch, t, 0.0f); + if (abs(v - pv) > min_delta) changed = true; // Yes, has changed + + i += 2 + sz; // skip + } + if (changed) { + // take snapshot of all _monitored_ telem values, for next cycle + i = 0; + while (i + 2 < c->extra.sensor.min_deltas_len) { + uint8_t ch = c->extra.sensor.min_deltas[i]; // Get channel # + uint8_t t = c->extra.sensor.min_deltas[i + 1]; // Get data type + uint8_t sz = LPPData::getDataSize(t); + + c->extra.sensor.prev_telem[i] = ch; + c->extra.sensor.prev_telem[i + 1] = t; + + float v = findTelemValue(buf, size, ch, t, 0.0f); + LPPData::putFloat(&c->extra.sensor.prev_telem[i + 2], v, sz, LPPData::getMultiplier(t), LPPData::isSigned(t)); + + i += 2 + sz; // skip + } + } + return changed; +} + int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t *payload, size_t payload_len) { // uint32_t now = getRTCClock()->getCurrentTimeUnique(); // memcpy(reply_data, &now, 4); // response packets always prefixed with timestamp @@ -373,6 +446,53 @@ int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t sprintf((char *) &reply_data[4], "%s\n%s\n%s", FIRMWARE_VERSION, _prefs.node_name, _prefs.owner_info); return 4 + strlen((char *) &reply_data[4]); } + + return payload_len > 0 ? handleRequest(sender, sender_timestamp, payload[0], &payload[1], payload_len - 1) : 0; +} + +int MyMesh::handleRequest(ClientInfo *from, uint32_t sender_timestamp, uint8_t req_type, uint8_t *payload, size_t payload_len) { + uint8_t perms = from->isAdmin() ? 0xFF : from->permissions; + + if (req_type == REQ_TYPE_SUBSCRIBE && payload_len >= 8 && (perms & PERM_ACL_ROLE_MASK) >= PERM_ACL_READ_ONLY) { + memcpy(&from->extra.sensor.push_tag, &payload[0], 4); + uint16_t timeout_secs; + memcpy(&timeout_secs, &payload[4], 2); + uint8_t reserved = payload[6]; + uint8_t min_deltas_len = payload[7]; + RegionEntry* r; + if (recv_pkt_region && !recv_pkt_region->isWildcard()) { // use request scope + r = recv_pkt_region; + } else { // use default scope + r = region_map.getDefaultRegion(); + } + uint8_t reply_len; + if (r && min_deltas_len >= 3 && min_deltas_len <= sizeof(from->extra.sensor.min_deltas)) { + if (timeout_secs > TELEM_SUBSCRIBE_MAX_SECS) timeout_secs = TELEM_SUBSCRIBE_MAX_SECS; // impose max + from->extra.sensor.scope_region_id = r->id; + from->extra.sensor.expiry_timestamp = getRTCClock()->getCurrentTime() + timeout_secs; + from->extra.sensor.min_deltas_len = min_deltas_len; + memcpy(from->extra.sensor.min_deltas, &payload[8], min_deltas_len); + // reply with actual expiry seconds (we could modify/impose restriction) + memcpy(&reply_data[4], &timeout_secs, 2); + memset(&reply_data[6], 0, 2); // reserved + strcpy((char *)&reply_data[8], r ? r->name : ""); // reply with name of scope that will be used + reply_len = 8 + strlen((char *)&reply_data[8]); + } else { + memset(&reply_data[4], 0, 4); // expiry secs (0 for error) + reply_len = 8; + } + return reply_len; + } + if (req_type == REQ_TYPE_UNSUBSCRIBE && (perms & PERM_ACL_ROLE_MASK) >= PERM_ACL_READ_ONLY) { + from->extra.sensor.scope_region_id = 0; + from->extra.sensor.push_tag = 0; + from->extra.sensor.expiry_timestamp = 0; + from->extra.sensor.min_deltas_len = 0; + // REVISIT: maybe return some stats, eg total number of telemetry pushes since SUBSCRIBE? + memset(&reply_data[4], 0, 8); // success + getRNG()->random(&reply_data[12], 2); // just some entropy for better packet-hash uniqueness + return 12 + 2; + } return 0; // unknown command } @@ -879,6 +999,7 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc uptime_millis = 0; next_local_advert = next_flood_advert = 0; dirty_contacts_expiry = 0; + last_read_time = 0; set_radio_at = revert_radio_at = 0; _logging = false; region_load_active = false; @@ -1320,6 +1441,49 @@ void MyMesh::loop() { MESH_DEBUG_PRINTLN("Radio params restored"); } + uint32_t curr = getRTCClock()->getCurrentTime(); + if (curr >= last_read_time + SENSOR_READ_INTERVAL_SECS) { + telemetry.reset(); + telemetry.addVoltage(TELEM_CHANNEL_SELF, (float)board.getBattMilliVolts() / 1000.0f); + // query other sensors -- target specific + sensors.querySensors(0xFF, telemetry); // allow all telemetry permissions + // This MCU temperature will be overridden by external sensors (if any) + float temperature = board.getMCUTemperature(); + if (!isnan(temperature)) { // Supported boards with built-in temperature sensor. ESP32-C3 may return NAN + telemetry.addTemperature(TELEM_CHANNEL_SELF, temperature); // Built-in MCU Temperature + } + + // compare with previous telemetry, check if any deltas are greater than subscriber minimums + for (int i = 0; i < acl.getNumClients(); i++) { + auto c = acl.getClientByIdx(i); + if (c->permissions == 0 || c->extra.sensor.scope_region_id == 0 || c->extra.sensor.min_deltas_len == 0) continue; // skip deleted entries, or Not subscribed to deltas + RegionEntry* r = region_map.findById(c->extra.sensor.scope_region_id); + if (r == NULL) continue; // unknown region scope + if (curr > c->extra.sensor.expiry_timestamp) continue; // subscription now expired + if (telemHasChanged(c)) { + TransportKey scope; + if (region_map.getTransportKeysFor(*r, &scope, 1) > 0) { + uint8_t tlen = telemetry.getSize(); + memcpy(reply_data, &c->extra.sensor.push_tag, 4); + uint32_t timestamp = getRTCClock()->getCurrentTimeUnique(); + memcpy(&reply_data[4], ×tamp, 4); + memcpy(&reply_data[8], telemetry.getBuffer(), tlen); + + mesh::Packet* reply = createDatagram(PAYLOAD_TYPE_RESPONSE, c->id, c->shared_secret, reply_data, 8 + tlen); + if (reply) { + if (c->out_path_len != OUT_PATH_UNKNOWN) { // we have an out_path, so send DIRECT + sendDirect(reply, c->out_path, c->out_path_len, 0); + } else { + sendFloodScoped(scope, reply, 0, _prefs.path_hash_mode + 1); + } + } + } + } + } + + last_read_time = curr; + } + // is pending dirty contacts write needed? if (dirty_contacts_expiry && millisHasNowPassed(dirty_contacts_expiry)) { acl.save(_fs); diff --git a/examples/simple_repeater/MyMesh.h b/examples/simple_repeater/MyMesh.h index dcaa71db5bc..a34df75d780 100644 --- a/examples/simple_repeater/MyMesh.h +++ b/examples/simple_repeater/MyMesh.h @@ -93,6 +93,7 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks { RegionEntry* load_stack[8]; RegionEntry* recv_pkt_region; TransportKey default_scope; + uint32_t last_read_time; RateLimiter discover_limiter, anon_limiter; uint32_t pending_discover_tag; unsigned long pending_discover_until; @@ -120,10 +121,12 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks { uint8_t handleAnonOwnerReq(const mesh::Identity& sender, uint32_t sender_timestamp, const uint8_t* data); uint8_t handleAnonClockReq(const mesh::Identity& sender, uint32_t sender_timestamp, const uint8_t* data); int handleRequest(ClientInfo* sender, uint32_t sender_timestamp, uint8_t* payload, size_t payload_len); + int handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t req_type, uint8_t *payload, size_t payload_len); mesh::Packet* createSelfAdvert(); File openAppend(const char* fname); bool isLooped(const mesh::Packet* packet, const uint8_t max_counters[]); + bool telemHasChanged(ClientInfo* c); protected: float getAirtimeBudgetFactor() const override { From 42451698d22bff4bcdd31e1b791fbe2f56ed56d2 Mon Sep 17 00:00:00 2001 From: Blake Latchford Date: Sat, 21 Nov 2026 12:38:41 -0500 Subject: [PATCH 19/21] Document the companion buzzer CLI command get/set buzzer was added to the companion CLI in #3603 but not to docs/companion_cli.md. --- docs/companion_cli.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/companion_cli.md b/docs/companion_cli.md index 212eb905c3a..796309ecbb4 100644 --- a/docs/companion_cli.md +++ b/docs/companion_cli.md @@ -80,6 +80,20 @@ Since version 1.18 meshcore companion radio firmware has a CLI interface, which --- +#### View or change the buzzer state +**Usage:** +- `get buzzer` +- `set buzzer ` + +**Parameters:** +- `state`: `on`|`off` + +**Default:** `on` + +**Note:** Only available on boards with a buzzer (`PIN_BUZZER`). This is the same setting as the buzzer toggle in the device UI. + +--- + ### Radio Radio parameters are common to all roles and handled by `CommonRadioPrefs`. From d27a8bc1a686677f222e16f75deb4746de5ade3c Mon Sep 17 00:00:00 2001 From: mch <32224+hamsolodev@users.noreply.github.com> Date: Sun, 22 Nov 2026 15:47:06 +1100 Subject: [PATCH 20/21] BaseChatMesh: test an ACK's route before marking it do-not-retransmit onAckRecv called markDoNotRetransmit(), which sets the header to 0xFF, before testing isRouteFlood(). 0xFF's route bits read as ROUTE_TYPE_TRANSPORT_DIRECT, so the test was always false and handleReturnPathRetry never ran for a flood ACK: the reciprocal path was never re-sent to a node that was still flooding. Mark the packet after the test instead. --- src/helpers/BaseChatMesh.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/BaseChatMesh.cpp b/src/helpers/BaseChatMesh.cpp index 58c08deaa3f..a4dcafeaeb1 100644 --- a/src/helpers/BaseChatMesh.cpp +++ b/src/helpers/BaseChatMesh.cpp @@ -380,12 +380,13 @@ void BaseChatMesh::onAckRecv(mesh::Packet* packet, uint32_t ack_crc) { ContactInfo* from; if ((from = processAck((uint8_t *)&ack_crc)) != NULL) { txt_send_timeout = 0; // matched one we're waiting for, cancel timeout timer - packet->markDoNotRetransmit(); // ACK was for this node, so don't retransmit if (packet->isRouteFlood() && from->out_path_len != OUT_PATH_UNKNOWN) { // we have direct path, but other node is still sending flood, so maybe they didn't receive reciprocal path properly(?) handleReturnPathRetry(*from, packet->path, packet->path_len); } + // NOTE: must come after the isRouteFlood() test, as it overwrites the header + packet->markDoNotRetransmit(); // ACK was for this node, so don't retransmit } } From 289fbe6b72968185c5a1e0b071043c32e6159f4e Mon Sep 17 00:00:00 2001 From: ElektroVodka <211697683+Elektr0Vodka@users.noreply.github.com> Date: Mon, 23 Nov 2026 01:05:45 +0100 Subject: [PATCH 21/21] test(gps): include the companion NodePrefs from its new upstream location Upstream moved examples/companion_radio/NodePrefs.h to src/helpers/CompanionNodePrefs.h (DMC fields carried over). --- test/test_gps_default/test_gps_default.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_gps_default/test_gps_default.cpp b/test/test_gps_default/test_gps_default.cpp index 3a4b515f1f5..2b7beb52297 100644 --- a/test/test_gps_default/test_gps_default.cpp +++ b/test/test_gps_default/test_gps_default.cpp @@ -5,7 +5,7 @@ #include #include "helpers/GpsDefault.h" -#include "../../examples/companion_radio/NodePrefs.h" +#include "../../src/helpers/CompanionNodePrefs.h" // upstream moved examples/companion_radio/NodePrefs.h here // CommonRadioPrefs.cpp needs target.h, so it is not in the native build. These tests use no radio keys. bool CommonRadioPrefs::setByKey(const char*, const char*) { return false; }