Merge pull request #3881 from meshcore-dev/ui-task-refactor

UI task refactor
This commit is contained in:
ripplebiz authored and GitHub committed 2026-11-20 11:17:26 +11:00
commit 66a01a227f
262 files changed
+1345 -916

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
#include <helpers/IdentityStore.h>
#include <helpers/ContactInfo.h>
#include <helpers/ChannelDetails.h>
#include "NodePrefs.h"
#include <helpers/CompanionNodePrefs.h>
class DataStoreHost {
public:
-29
View File
@@ -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;
+11 -36
View File
@@ -23,7 +23,7 @@
#endif
#include "DataStore.h"
#include "NodePrefs.h"
#include <helpers/CompanionNodePrefs.h>
#include <RTClib.h>
#include <helpers/ArduinoHelpers.h>
@@ -68,6 +68,7 @@
#include <helpers/BaseChatMesh.h>
#include <helpers/TransportKeyStore.h>
#include <helpers/MeshEventListener.h>
/* -------------------------------------------------------------------------------------- */
@@ -75,10 +76,6 @@
#define REQ_TYPE_KEEP_ALIVE 0x02
#define REQ_TYPE_GET_TELEMETRY_DATA 0x03
// Copied from simple_repeater
#define CTL_TYPE_NODE_DISCOVER_REQ 0x80
#define CTL_TYPE_NODE_DISCOVER_RESP 0x90
struct AdvertPath {
uint8_t pubkey_prefix[7];
uint8_t path_len;
@@ -89,30 +86,11 @@ struct AdvertPath {
class MyMesh : public BaseChatMesh, public DataStoreHost {
public:
class Listener {
public:
virtual void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) = 0;
virtual void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) = 0;
virtual void onQueueSizeChanged(int msgcount) = 0;
virtual void onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path_len, const uint8_t* path) { }
virtual void onControlDataRecv(const mesh::Packet* pkt) { }
virtual void onChannelDataRecv(mesh::Packet *pkt, const mesh::GroupChannel &channel, uint16_t data_type,
const uint8_t *data, size_t data_len) { }
virtual void onACKRecv(uint32_t ack_crc) { }
virtual uint8_t onUnhandledRequest(const ContactInfo &contact, uint32_t sender_timestamp, const uint8_t *data,
uint8_t len, uint8_t *reply) { return 0; /* unknown request type */ }
virtual bool onUnhandledResponse(const ContactInfo &from, uint32_t tag, const uint8_t* data, uint8_t len) { return false; /* not handled */ }
virtual void onTraceRecv(mesh::Packet *pkt, uint32_t tag, uint32_t auth_code, uint8_t flags,
const uint8_t *path_snrs, const uint8_t *path_hashes, uint8_t path_len) { }
virtual void onRawDataRecv(mesh::Packet *pkt) { }
virtual ~Listener() { }
};
MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMeshTables &tables, DataStore& store);
void begin();
void startInterface(BaseSerialInterface &serial);
void setListener(Listener* listener) { _listener = listener; }
void setListener(MeshEventListener* listener) { _listener = listener; }
const char *getNodeName();
NodePrefs *getNodePrefs();
@@ -121,10 +99,14 @@ public:
void loop();
void handleCmdFrame(size_t len);
bool advert();
void enterCLIRescue();
int getRecentlyHeard(AdvertPath dest[], int max_num);
void enterCLIRescue() override;
void savePrefs() override {
_prefs.node_lat = sensors.node_lat;
_prefs.node_lon = sensors.node_lon;
_store->savePrefs(_prefs);
_prefs.clearDirty();
}
protected:
float getAirtimeBudgetFactor() const override;
@@ -194,13 +176,6 @@ protected:
}
public:
void savePrefs() {
_prefs.node_lat = sensors.node_lat;
_prefs.node_lon = sensors.node_lon;
_store->savePrefs(_prefs);
_prefs.clearDirty();
}
#if ENV_INCLUDE_GPS == 1
void applyGpsPrefs() {
if (_prefs.gps_interval > 0 &&
@@ -247,7 +222,7 @@ private:
uint32_t pending_telemetry, pending_discovery; // pending _TELEMETRY_REQ
uint32_t pending_req; // pending _BINARY_REQ
BaseSerialInterface *_serial;
Listener* _listener;
MeshEventListener* _listener;
ContactsIterator _iter;
uint32_t _iter_filter_since;
+1 -6
View File
@@ -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(), &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);
+1 -3
View File
@@ -74,8 +74,6 @@ struct NeighbourInfo {
#define FIRMWARE_VERSION "v1.18.0"
#endif
#define FIRMWARE_ROLE "repeater"
#define PACKET_LOG_FILE "/packet_log"
class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
@@ -189,7 +187,7 @@ public:
void sendNodeDiscoverReq();
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
const char* getRole() override { return FIRMWARE_ROLE; }
const char* getRole() override { return "repeater"; }
const char* getNodeName() { return _prefs.node_name; }
NodePrefs* getNodePrefs() {
return &_prefs;
-22
View File
@@ -1,22 +0,0 @@
#pragma once
#include <helpers/ui/DisplayDriver.h>
#include <helpers/CommonCLI.h>
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();
};
+1 -6
View File
@@ -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 <helpers/nrf52/EthernetCLI.h>
@@ -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
+1 -3
View File
@@ -77,8 +77,6 @@
#define TXT_ACK_DELAY 200
#endif
#define FIRMWARE_ROLE "room_server"
#define PACKET_LOG_FILE "/packet_log"
#define MAX_POST_TEXT_LEN (160-9)
@@ -189,7 +187,7 @@ public:
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
const char* getRole() override { return FIRMWARE_ROLE; }
const char* getRole() override { return "room_server"; }
const char* getNodeName() { return _prefs.node_name; }
NodePrefs* getNodePrefs() {
return &_prefs;
-125
View File
@@ -1,125 +0,0 @@
#include "UITask.h"
#include <Arduino.h>
#include <helpers/CommonCLI.h>
#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();
}
}
}
-19
View File
@@ -1,19 +0,0 @@
#pragma once
#include <helpers/ui/DisplayDriver.h>
#include <helpers/CommonCLI.h>
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();
};
+1 -6
View File
@@ -8,11 +8,6 @@
#include <helpers/nrf52/EthernetCLI.h>
#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
+1 -3
View File
@@ -41,8 +41,6 @@
#define FIRMWARE_VERSION "v1.18.0"
#endif
#define FIRMWARE_ROLE "sensor"
#define MAX_SEARCH_RESULTS 24
#define MAX_CONCURRENT_ALERTS 4
@@ -56,7 +54,7 @@ public:
// CommonCLI callbacks
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
const char* getRole() override { return FIRMWARE_ROLE; }
const char* getRole() override { return "sensor"; }
const char* getNodeName() { return _prefs.node_name; }
NodePrefs* getNodePrefs() { return &_prefs; }
void savePrefs() override { _cli.savePrefs(_fs); }
-125
View File
@@ -1,125 +0,0 @@
#include "UITask.h"
#include <Arduino.h>
#include <helpers/CommonCLI.h>
#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();
}
}
}
-19
View File
@@ -1,19 +0,0 @@
#pragma once
#include <helpers/ui/DisplayDriver.h>
#include <helpers/CommonCLI.h>
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();
};
+1 -6
View File
@@ -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
+3
View File
@@ -182,5 +182,8 @@ public:
bool setChannel(int idx, const ChannelDetails& src);
int findChannelIdx(const mesh::GroupChannel& ch);
virtual void savePrefs() { }
virtual void enterCLIRescue() { }
void loop();
};
File renamed without changes.
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <MeshCore.h>
#include <helpers/ContactInfo.h>
#include <helpers/ChannelDetails.h>
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() { }
};
@@ -5,15 +5,14 @@
#include <helpers/ui/UIScreen.h>
#include <helpers/SensorManager.h>
#include <helpers/MultiSerialInterface.h>
#include <helpers/MeshEventListener.h>
#include <helpers/CompanionNodePrefs.h>
#include <Arduino.h>
#ifdef PIN_BUZZER
#include <helpers/ui/buzzer.h>
#endif
#include "NodePrefs.h"
#include "MyMesh.h"
enum class UIEventType {
none,
contactMessage,
@@ -23,12 +22,12 @@ enum class UIEventType {
ack
};
class AbstractUITask : public MyMesh::Listener {
class AbstractUITask : public MeshEventListener {
protected:
mesh::MainBoard* _board;
MultiSerialInterface* _interfaceManager;
AbstractUITask(mesh::MainBoard* board, MultiSerialInterface* interfaceManager) : _board(board), _interfaceManager(interfaceManager) {
AbstractUITask(mesh::MainBoard* board, MultiSerialInterface* interfaceManager = NULL) : _board(board), _interfaceManager(interfaceManager) {
}
public:
+17
View File
@@ -0,0 +1,17 @@
#include "BaseUITask.h"
#include <Arduino.h>
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();
}
}
}
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#include <MeshCore.h>
#include <helpers/ui/DisplayDriver.h>
// #include <helpers/ui/UIScreen.h>
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();
};
@@ -1,8 +1,8 @@
#include "UITask.h"
#include <helpers/TxtDataHelpers.h>
#include "../MyMesh.h"
#include "target.h"
#include <time.h>
#include <RTClib.h>
#ifdef ENABLE_WIFI_INTERFACE
#include <WiFi.h>
#endif
@@ -31,18 +31,22 @@
#define PRESS_LABEL "long press"
#endif
// Copied from simple_repeater
#define CTL_TYPE_NODE_DISCOVER_REQ 0x80
#define CTL_TYPE_NODE_DISCOVER_RESP 0x90
#include "icons.h"
class SplashScreen : public UIScreen {
UITask* _task;
unsigned long dismiss_after;
char _version_info[12];
const char* _build_date;
public:
SplashScreen(UITask* task) : _task(task) {
SplashScreen(UITask* task, const char* ver, const char* build_date) : _task(task) {
// strip off dash and commit hash by changing dash to null terminator
// e.g: v1.2.3-abcdef -> v1.2.3
const char *ver = FIRMWARE_VERSION;
const char *dash = strchr(ver, '-');
int len = dash ? dash - ver : strlen(ver);
@@ -50,6 +54,8 @@ public:
memcpy(_version_info, ver, len);
_version_info[len] = 0;
_build_date = build_date;
dismiss_after = millis() + BOOT_SCREEN_MILLIS;
}
@@ -74,7 +80,7 @@ public:
display.setColor(UIColor::secondary_txt);
display.setTextSize(1);
display.drawTextCentered(display.width()/2, 48, FIRMWARE_BUILD_DATE);
display.drawTextCentered(display.width()/2, 48, _build_date);
return 1000;
}
@@ -110,6 +116,11 @@ static void formatFixAge(char* buf, size_t size, uint32_t seconds) {
}
#endif
struct AdvertPath {
char name[32];
uint32_t recv_timestamp;
};
class HomeScreen : public UIScreen {
enum HomePage {
FIRST,
@@ -140,6 +151,7 @@ class HomeScreen : public UIScreen {
NodePrefs* _node_prefs;
uint8_t _page;
bool _shutdown_init;
int recent_next_idx;
AdvertPath recent[UI_RECENT_LIST_SIZE];
#if UI_DISCOVER_SCREEN
DiscoveredNode discovered[DISCOVERED_NODES_TABLE_SIZE]; // not circular, latest discovered nodes are not kept
@@ -230,19 +242,31 @@ class HomeScreen : public UIScreen {
public:
HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs)
: _task(task), _rtc(rtc), _sensors(sensors), _node_prefs(node_prefs), _page(0),
_shutdown_init(false), sensors_lpp(200) { }
_shutdown_init(false), sensors_lpp(200)
{
memset(recent, 0, sizeof(recent));
recent_next_idx = 0;
}
void addToRecents(ContactInfo &contact) {
auto p = &recent[recent_next_idx];
recent_next_idx = (recent_next_idx + 1) % UI_RECENT_LIST_SIZE;
strcpy(p->name, contact.name);
p->recv_timestamp = _rtc->getCurrentTime();
}
#if UI_DISCOVER_SCREEN
bool sendDiscoverRequest() {
uint8_t cmd_bytes[6];
cmd_bytes[0] = CTL_TYPE_NODE_DISCOVER_REQ | 1; // DISCOVER_REQ | prefix only
cmd_bytes[1] = 0xFF; // Repeaters
the_mesh.getRNG()->random((uint8_t *) &disc_node_req_tag, 4); // generate random tag
_task->getMesh()->getRNG()->random((uint8_t *) &disc_node_req_tag, 4); // generate random tag
memcpy(&cmd_bytes[2], &disc_node_req_tag, 4);
disc_nodes_count = 0;
mesh::Packet* req = the_mesh.createControlData(cmd_bytes, sizeof(cmd_bytes));
mesh::Packet* req = _task->getMesh()->createControlData(cmd_bytes, sizeof(cmd_bytes));
if (req) {
the_mesh.sendZeroHop(req);
_task->getMesh()->sendZeroHop(req);
discovery_req_time = millis();
return true;
}
@@ -256,7 +280,7 @@ public:
d->type = packet->payload[0] & 0xF;
d->snr_out = ((int8_t)packet->payload[1]) / 4.0;
d->snr_in = radio_driver.getLastSNR();
ContactInfo* c = the_mesh.lookupContactByPubKey(&packet->payload[6], 8);
ContactInfo* c = _task->getMesh()->lookupContactByPubKey(&packet->payload[6], 8);
if (c != NULL) {
strncpy(d->name, c->name, 32);
} else {
@@ -340,9 +364,9 @@ public:
display.drawTextCentered(display.width() / 2, 110, "< Connected >");
else
display.drawTextCentered(display.width() / 2, 43, "< Connected >");
} else if (the_mesh.getBLEPin() != 0) { // BT pin
} else if (_task->getBLEPin() != 0) { // BT pin
display.setColor(UIColor::warning_txt);
sprintf(tmp, "Pin:%d", the_mesh.getBLEPin());
sprintf(tmp, "Pin:%d", _task->getBLEPin());
if (_node_prefs->ui_show_clock) {
display.setTextSize(1);
display.drawTextCentered(display.width() / 2, 110, tmp);
@@ -352,11 +376,10 @@ public:
}
}
} else if (_page == HomePage::RECENT) {
the_mesh.getRecentlyHeard(recent, UI_RECENT_LIST_SIZE);
display.setColor(UIColor::primary_txt);
int y = 20;
for (int i = 0; i < UI_RECENT_LIST_SIZE; i++, y += 11) {
auto a = &recent[i];
for (int i = 0, k = recent_next_idx; i < UI_RECENT_LIST_SIZE; i++, y += 11, k = (k + 1) % UI_RECENT_LIST_SIZE) {
auto a = &recent[k];
if (a->name[0] == 0) continue; // empty slot
int secs = _rtc->getCurrentTime() - a->recv_timestamp;
if (secs < 60) {
@@ -623,7 +646,15 @@ public:
#endif
if (c == KEY_ENTER && _page == HomePage::ADVERT) {
_task->notify(UIEventType::ack);
if (the_mesh.advert()) {
mesh::Packet* pkt;
if (_node_prefs->advert_loc_policy == ADVERT_LOC_NONE) {
pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name);
} else {
pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name, sensors.node_lat, sensors.node_lon);
}
if (pkt) {
_task->getMesh()->sendZeroHop(pkt);
_task->showAlert("Advert sent!", 1000);
} else {
_task->showAlert("Advert failed..", 1000);
@@ -756,9 +787,14 @@ public:
}
};
void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs) {
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;
#if defined(PIN_USER_BTN)
user_btn.begin();
@@ -791,7 +827,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 +924,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 +1216,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 +1261,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 +1289,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
@@ -4,6 +4,7 @@
#include <helpers/ui/DisplayDriver.h>
#include <helpers/ui/UIScreen.h>
#include <helpers/SensorManager.h>
#include <helpers/BaseChatMesh.h>
#include <helpers/MultiSerialInterface.h>
#include <Arduino.h>
#include <helpers/sensors/LPPDataHelpers.h>
@@ -19,8 +20,8 @@
#include <helpers/ui/GenericVibration.h>
#endif
#include "../AbstractUITask.h"
#include "../NodePrefs.h"
#include <helpers/ui/AbstractUITask.h>
#include <helpers/CompanionNodePrefs.h>
#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
@@ -90,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, DisplayDriver* display = NULL) : AbstractUITask(board), _display(display), _sensors(NULL) {
next_batt_chck = _next_refresh = 0;
ui_started_at = 0;
curr = NULL;
}
void begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs);
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);
@@ -103,6 +107,9 @@ public:
bool hasDisplay() const { return _display != NULL; }
bool isButtonPressed() const;
BaseChatMesh* getMesh() const { return the_mesh; }
uint32_t getBLEPin() const { return _ble_pin; }
bool isBuzzerQuiet() {
#ifdef PIN_BUZZER
return buzzer.isQuiet();
@@ -116,7 +123,7 @@ public:
void toggleGPS();
void triggerGPS();
// MyMesh::Listener
// MeshEventListener
void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) override;
void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override;
void onQueueSizeChanged(int offline_queue_size) override;
File renamed without changes.
@@ -1,7 +1,7 @@
#include "UITask.h"
#include <Arduino.h>
#include <helpers/TxtDataHelpers.h>
#include "../MyMesh.h"
#include "target.h"
#define AUTO_OFF_MILLIS 15000 // 15 seconds
#define BOOT_SCREEN_MILLIS 3000 // 3 seconds
@@ -40,9 +40,15 @@ 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, 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;
clearMsgPreview();
_node_prefs = node_prefs;
@@ -52,14 +58,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 +306,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 +561,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 +597,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 +609,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 +630,7 @@ void UITask::handleButtonQuadruplePress() {
notify(UIEventType::ack);
sprintf(_alert, "GPS: Enabled");
}
the_mesh.savePrefs();
the_mesh->savePrefs();
break;
}
}
@@ -628,7 +641,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();
}
@@ -3,14 +3,15 @@
#include <MeshCore.h>
#include <helpers/ui/DisplayDriver.h>
#include <helpers/SensorManager.h>
#include <helpers/BaseChatMesh.h>
#include <stddef.h>
#ifdef PIN_BUZZER
#include <helpers/ui/buzzer.h>
#endif
#include "../AbstractUITask.h"
#include "../NodePrefs.h"
#include <helpers/ui/AbstractUITask.h>
#include <helpers/CompanionNodePrefs.h>
#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,20 +60,20 @@ class UITask : public AbstractUITask {
void handleButtonTriplePress();
void handleButtonQuadruplePress();
void handleButtonLongPress();
public:
UITask(mesh::MainBoard* board, MultiSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL) {
UITask(mesh::MainBoard* board, DisplayDriver* display = NULL) : AbstractUITask(board), _display(display), _sensors(NULL) {
_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, MultiSerialInterface* serial,
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;
@@ -1,6 +1,5 @@
#include "UITask.h"
#include <helpers/TxtDataHelpers.h>
#include "../MyMesh.h"
#include "target.h"
#include "u8g2_icons.h"
@@ -36,12 +35,12 @@ class SplashScreen : public UIScreen {
unsigned long dismiss_after;
unsigned long version_after;
char _version_info[12];
const char* _build_date;
public:
SplashScreen(UITask* task) : _task(task) {
SplashScreen(UITask* task, const char* ver, const char* build_date) : _task(task) {
// strip off dash and commit hash by changing dash to null terminator
// e.g: v1.2.3-abcdef -> v1.2.3
const char *ver = FIRMWARE_VERSION;
const char *dash = strchr(ver, '-');
int len = dash ? dash - ver : strlen(ver);
@@ -49,6 +48,8 @@ public:
memcpy(_version_info, ver, len);
_version_info[len] = 0;
_build_date = build_date;
version_after = millis() + BOOT_SCREEN_MILLIS / 2;
dismiss_after = millis() + BOOT_SCREEN_MILLIS;
}
@@ -75,7 +76,7 @@ public:
display.setColor(UIColor::secondary_txt);
display.setTextSize(1);
display.drawTextCentered(display.width()/2, 27, FIRMWARE_BUILD_DATE);
display.drawTextCentered(display.width()/2, 27, _build_date);
}
return 1000;
}
@@ -87,6 +88,11 @@ public:
}
};
struct AdvertPath {
char name[32];
uint32_t recv_timestamp;
};
class HomeScreen : public UIScreen {
enum HomePage {
FIRST,
@@ -110,6 +116,7 @@ class HomeScreen : public UIScreen {
NodePrefs* _node_prefs;
uint8_t _page;
bool _shutdown_init;
int recent_next_idx;
AdvertPath recent[UI_RECENT_LIST_SIZE];
CayenneLPP sensors_lpp;
@@ -142,7 +149,19 @@ class HomeScreen : public UIScreen {
public:
HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs)
: _task(task), _rtc(rtc), _sensors(sensors), _node_prefs(node_prefs), _page(0),
_shutdown_init(false), sensors_lpp(200) { }
_shutdown_init(false), sensors_lpp(200)
{
memset(recent, 0, sizeof(recent));
recent_next_idx = 0;
}
void addToRecents(ContactInfo &contact) {
auto p = &recent[recent_next_idx];
recent_next_idx = (recent_next_idx + 1) % UI_RECENT_LIST_SIZE;
strcpy(p->name, contact.name);
p->recv_timestamp = _rtc->getCurrentTime();
}
void poll() override {
if (_shutdown_init && !_task->isButtonPressed()) { // must wait for USR button to be released
@@ -184,18 +203,17 @@ public:
display.setTextSize(1);
display.drawTextCentered(display.width() / 2, display.height()-8, "< Connected >");
} else if (the_mesh.getBLEPin() != 0) { // BT pin
} else if (_task->getBLEPin() != 0) { // BT pin
display.setColor(UIColor::warning_txt);
display.setTextSize(2);
sprintf(tmp, "Pin:%d", the_mesh.getBLEPin());
sprintf(tmp, "Pin:%d", _task->getBLEPin());
display.drawTextCentered(display.width() / 2, display.height()-8, tmp);
}
} else if (_page == HomePage::RECENT) {
the_mesh.getRecentlyHeard(recent, UI_RECENT_LIST_SIZE);
display.setColor(UIColor::primary_txt);
int y = 8;
for (int i = 0; i < UI_RECENT_LIST_SIZE; i++, y += 11) {
auto a = &recent[i];
for (int i = 0, k = recent_next_idx; i < UI_RECENT_LIST_SIZE; i++, y += 11, k = (k + 1) % UI_RECENT_LIST_SIZE) {
auto a = &recent[k];
if (a->name[0] == 0) continue; // empty slot
int secs = _rtc->getCurrentTime() - a->recv_timestamp;
if (secs < 60) {
@@ -400,7 +418,14 @@ public:
}
if (c == KEY_ENTER && _page == HomePage::ADVERT) {
_task->notify(UIEventType::ack);
if (the_mesh.advert()) {
mesh::Packet* pkt;
if (_node_prefs->advert_loc_policy == ADVERT_LOC_NONE) {
pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name);
} else {
pkt = _task->getMesh()->createSelfAdvert(_node_prefs->node_name, sensors.node_lat, sensors.node_lon);
}
if (pkt) {
_task->getMesh()->sendZeroHop(pkt);
_task->showAlert("Advert sent!", 1000);
} else {
_task->showAlert("Advert failed..", 1000);
@@ -428,10 +453,14 @@ public:
}
};
void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs) {
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;
_cached_batt_mv = getBattMilliVolts();
@@ -463,7 +492,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 +576,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 +824,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 +869,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 +888,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
@@ -4,6 +4,7 @@
#include <helpers/ui/DisplayDriver.h>
#include <helpers/ui/UIScreen.h>
#include <helpers/SensorManager.h>
#include <helpers/BaseChatMesh.h>
#include <helpers/MultiSerialInterface.h>
#include <Arduino.h>
#include <helpers/sensors/LPPDataHelpers.h>
@@ -22,12 +23,14 @@
#include <helpers/ui/GenericVibration.h>
#endif
#include "../AbstractUITask.h"
#include "../NodePrefs.h"
#include <helpers/ui/AbstractUITask.h>
#include <helpers/CompanionNodePrefs.h>
class UITask : public AbstractUITask {
DisplayDriver* _display;
SensorManager* _sensors;
BaseChatMesh* the_mesh;
uint32_t _ble_pin;
ScrollingStatusBar _statusBar;
#ifdef PIN_BUZZER
genericBuzzer buzzer;
@@ -71,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, DisplayDriver* display = NULL) : AbstractUITask(board), _display(display), _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);
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);
@@ -86,6 +90,9 @@ public:
bool hasDisplay() const { return _display != NULL; }
bool isButtonPressed() const;
BaseChatMesh* getMesh() const { return the_mesh; }
uint32_t getBLEPin() const { return _ble_pin; }
bool isBuzzerQuiet() {
#ifdef PIN_BUZZER
return buzzer.isQuiet();
@@ -98,7 +105,7 @@ public:
bool getGPSState();
void toggleGPS();
// MyMesh::Listener
// MeshEventListener
void onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, const char* text) override;
void onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override;
void onQueueSizeChanged(int offline_queue_size) override;
@@ -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)
+23
View File
@@ -0,0 +1,23 @@
#pragma once
#include <helpers/ui/BaseUITask.h>
#include <helpers/CommonCLI.h>
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;
};
@@ -4,7 +4,7 @@
#include <cstring>
#include <string>
#include "../../examples/companion_radio/NodePrefs.h"
#include "../../src/helpers/CompanionNodePrefs.h"
class ReplayStream : public Stream {
const char* _text;
@@ -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}
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/ST7735Display.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${DFRobot_LoRaWAN_ESP32S3.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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() {
@@ -10,6 +10,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/ST7735Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+9 -4
View File
@@ -37,6 +37,7 @@ build_flags =
-D SX126X_RX_BOOSTED_GAIN=1
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/ebyte_eora_s3>
+<helpers/ui/BaseUITask.cpp>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
${esp32_ota.lib_deps}
@@ -98,7 +103,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 +114,7 @@ build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -118,7 +123,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 +137,7 @@ build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
densaugeo/base64 @ ~1.4.0
+1
View File
@@ -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
+2
View File
@@ -10,6 +10,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/SSD1306Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+9 -5
View File
@@ -23,6 +23,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/sensors>
+<helpers/ui/BaseUITask.cpp>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
[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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
[env:GAT562_30S_Mesh_Kit_companion_radio_usb]
@@ -70,7 +74,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 +83,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>
+<helpers/ui/companion-new>
+<helpers/ui/buzzer.cpp>
lib_deps =
${GAT562_30S_Mesh_Kit.lib_deps}
@@ -93,7 +97,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 +110,7 @@ build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/buzzer.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${GAT562_30S_Mesh_Kit.lib_deps}
densaugeo/base64 @ ~1.4.0
+1
View File
@@ -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
+2
View File
@@ -10,12 +10,14 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/SSD1306Display.h>
#include <UITask.h>
extern DISPLAY_CLASS display;
#include <helpers/ui/MomentaryButton.h>
extern MomentaryButton user_btn;
extern MomentaryButton joystick_left;
extern MomentaryButton joystick_right;
extern MomentaryButton back_btn;
extern UITask ui_task;
#endif
extern GAT56230SMeshKitBoard board;
+1 -1
View File
@@ -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
+2
View File
@@ -10,11 +10,13 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/SSD1306Display.h>
#include <UITask.h>
extern DISPLAY_CLASS display;
#include <helpers/ui/MomentaryButton.h>
extern MomentaryButton user_btn;
extern MomentaryButton back_btn;
extern UITask ui_task;
#endif
extern GAT562EVBProBoard board;
@@ -19,6 +19,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/sensors>
+<helpers/ui/BaseUITask.cpp>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
[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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
[env:GAT562_Mesh_Tracker_Pro_companion_radio_usb]
@@ -66,7 +71,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 +80,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>
+<helpers/ui/companion-new>
lib_deps =
${GAT562_Mesh_Tracker_Pro.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -88,7 +93,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 +106,7 @@ build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${GAT562_Mesh_Tracker_Pro.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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
@@ -10,7 +10,9 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/SSD1306Display.h>
#include <UITask.h>
extern DISPLAY_CLASS display;
extern UITask ui_task;
#include <helpers/ui/MomentaryButton.h>
extern MomentaryButton user_btn;
extern MomentaryButton joystick_left;
+3 -2
View File
@@ -22,6 +22,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/sensors>
+<helpers/ui/BaseUITask.cpp>
lib_deps =
${nrf52_base.lib_deps}
${sensor_base.lib_deps}
@@ -66,7 +67,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 +82,7 @@ build_src_filter = ${GAT562_Mesh_Watch13.build_src_filter}
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/GenericVibration.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${GAT562_Mesh_Watch13.lib_deps}
densaugeo/base64 @ ~1.4.0
+1
View File
@@ -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
+2
View File
@@ -10,6 +10,8 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/SSD1306Display.h>
#include <UITask.h>
extern UITask ui_task;
extern DISPLAY_CLASS display;
#include <helpers/ui/MomentaryButton.h>
extern MomentaryButton user_btn;
+11 -4
View File
@@ -37,6 +37,7 @@ build_flags =
-D DISP_MOSI=6
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_e213>
+<helpers/ui/BaseUITask.cpp>
lib_deps =
${esp32_base.lib_deps}
https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip
@@ -45,7 +46,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 +58,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter}
+<helpers/ui/E213Display.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_E213_base.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -67,7 +68,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 +79,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter}
+<helpers/ui/E213Display.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_E213_base.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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}
+<helpers/ui/E213Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<helpers/ui/E213Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/E213Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${Heltec_E213_base.lib_deps}
${esp32_ota.lib_deps}
+1
View File
@@ -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() {
+2
View File
@@ -10,6 +10,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/E213Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+11 -4
View File
@@ -31,6 +31,7 @@ build_flags =
-D PIN_BOARD_SCL=38
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_e290>
+<helpers/ui/BaseUITask.cpp>
lib_deps =
${esp32_base.lib_deps}
https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip
@@ -39,7 +40,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 +52,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter}
+<helpers/ui/E290Display.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_E290_base.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -61,7 +62,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 +73,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter}
+<helpers/ui/E290Display.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_E290_base.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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}
+<helpers/ui/E290Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<helpers/ui/E290Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/E290Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${Heltec_E290_base.lib_deps}
${esp32_ota.lib_deps}
+1
View File
@@ -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() {
+2
View File
@@ -10,6 +10,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/E290Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+1
View File
@@ -18,6 +18,7 @@ SolarExternalWatchdog external_watchdog;
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
UITask ui_task(&board, &display);
#endif
bool radio_init() {
+2
View File
@@ -11,6 +11,7 @@
#include <helpers/ExternalWatchdogManager.h>
#ifdef DISPLAY_CLASS
#include <helpers/ui/ST7789Display.h>
#include <UITask.h>
#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();
+22 -15
View File
@@ -72,6 +72,7 @@ build_flags =
build_src_filter = ${Heltec_RC32.build_src_filter}
+<helpers/ui/NV3001BDisplay.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/BaseUITask.cpp>
lib_deps =
${Heltec_RC32.lib_deps}
@@ -127,7 +128,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 +139,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter}
+<helpers/ui/NullDisplayDriver.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_RC32.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -148,7 +149,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 +163,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter}
+<helpers/ui/NullDisplayDriver.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_RC32.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -172,7 +173,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 +189,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_RC32.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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>
+<helpers/ui/server>
lib_deps =
${Heltec_RC32_with_display.lib_deps}
${esp32_ota.lib_deps}
@@ -274,7 +281,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 +290,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
+<helpers/ui/buzzer.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_RC32_with_display.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -293,7 +300,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 +312,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
+<helpers/ui/buzzer.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_RC32_with_display.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -315,7 +322,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 +336,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_RC32_with_display.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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]
+1
View File
@@ -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() {
+2
View File
@@ -18,6 +18,7 @@
#else
#include <helpers/ui/NullDisplayDriver.h>
#endif
#include <UITask.h>
#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();
+13 -8
View File
@@ -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-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}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/NullDisplayDriver.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-orig>
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-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}
+<helpers/nrf52/*.cpp>
+<helpers/ui/NullDisplayDriver.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-orig>
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}
+<helpers/ui/NV3001BDisplay.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/BaseUITask.cpp>
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>
+<helpers/ui/server>
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>
+<helpers/ui/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
@@ -146,7 +151,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 +163,7 @@ build_src_filter = ${heltec_rc52_with_display.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/buzzer.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_rc52_with_display.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -170,7 +175,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 +185,7 @@ build_src_filter = ${heltec_rc52_with_display.build_src_filter}
+<helpers/nrf52/*.cpp>
+<helpers/ui/buzzer.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_rc52_with_display.lib_deps}
densaugeo/base64 @ ~1.4.0
+1
View File
@@ -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()
+2
View File
@@ -19,6 +19,7 @@
#else
#include <helpers/ui/NullDisplayDriver.h>
#endif
#include <UITask.h>
#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();
+14 -5
View File
@@ -47,6 +47,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
+<../variants/heltec_t096>
+<helpers/ui/ST7735Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/BaseUITask.cpp>
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>
+<helpers/ui/server>
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}
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
[env:Heltec_t096_room_server]
extends = Heltec_t096
build_src_filter = ${Heltec_t096.build_src_filter}
+<../examples/simple_room_server>
+<helpers/ui/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
@@ -125,7 +131,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 +143,7 @@ build_flags =
build_src_filter = ${Heltec_t096.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_t096.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -148,7 +154,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,12 +165,15 @@ build_flags =
build_src_filter = ${Heltec_t096.build_src_filter}
+<helpers/nrf52/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_t096.lib_deps}
densaugeo/base64 @ ~1.4.0
[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/>
+1
View File
@@ -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() {
+2
View File
@@ -12,6 +12,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/MomentaryButton.h>
#include <helpers/ui/ST7735Display.h>
#include <UITask.h>
#else
#include "helpers/ui/NullDisplayDriver.h"
#endif
@@ -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();
+12 -5
View File
@@ -20,6 +20,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
+<../variants/heltec_t1>
+<helpers/ui/ST7735Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/BaseUITask.cpp>
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>
+<helpers/ui/server>
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>
+<helpers/ui/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
@@ -62,7 +66,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 +79,7 @@ build_src_filter = ${Heltec_t1.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/buzzer.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_t1.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -87,7 +91,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 +101,7 @@ build_src_filter = ${Heltec_t1.build_src_filter}
+<helpers/nrf52/*.cpp>
+<helpers/ui/buzzer.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_t1.lib_deps}
densaugeo/base64 @ ~1.4.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/>
+1
View File
@@ -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() {
+2
View File
@@ -12,6 +12,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/MomentaryButton.h>
#include <helpers/ui/ST7735Display.h>
#include <UITask.h>
#else
#include "helpers/ui/NullDisplayDriver.h"
#endif
@@ -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();
+18 -9
View File
@@ -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}
+<helpers/ui/NullDisplayDriver.cpp>
+<helpers/nrf52/SerialBLEInterface.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
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}
+<helpers/nrf52/*.cpp>
+<helpers/ui/NullDisplayDriver.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_t114.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -152,6 +152,7 @@ build_src_filter = ${Heltec_t114.build_src_filter}
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/OLEDDisplay.cpp>
+<helpers/ui/OLEDDisplayFonts.cpp>
+<helpers/ui/BaseUITask.cpp>
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>
+<helpers/ui/server>
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}
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
[env:Heltec_t114_room_server]
extends = Heltec_t114_with_display
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
+<../examples/simple_room_server>
+<helpers/ui/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
@@ -212,7 +218,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 +230,7 @@ build_flags =
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_t114_with_display.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -235,7 +241,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,12 +252,15 @@ build_flags =
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
+<helpers/nrf52/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_t114_with_display.lib_deps}
densaugeo/base64 @ ~1.4.0
[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/>
+1
View File
@@ -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() {
+2
View File
@@ -16,6 +16,7 @@
#else
#include "helpers/ui/NullDisplayDriver.h"
#endif
#include <UITask.h>
#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();
+14 -4
View File
@@ -44,6 +44,7 @@ build_src_filter = ${esp32_base.build_src_filter}
+<helpers/ui/ST7789Display.cpp>
+<helpers/ui/OLEDDisplay.cpp>
+<helpers/ui/OLEDDisplayFonts.cpp>
+<helpers/ui/BaseUITask.cpp>
lib_deps =
${esp32_base.lib_deps}
adafruit/Adafruit GFX Library @ ^1.12.1
@@ -52,7 +53,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 +62,7 @@ build_flags =
build_src_filter = ${Heltec_T190_base.build_src_filter}
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_T190_base.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -70,7 +71,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 +79,7 @@ build_flags =
build_src_filter = ${Heltec_T190_base.build_src_filter}
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_T190_base.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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>
+<helpers/ui/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/>
+1
View File
@@ -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() {
+2
View File
@@ -10,6 +10,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/ST7789Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+4 -4
View File
@@ -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}
+<helpers/ui/NullDisplayDriver.cpp>
+<helpers/nrf52/SerialBLEInterface.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
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}
+<helpers/ui/NullDisplayDriver.cpp>
+<helpers/nrf52/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_tower_v2.lib_deps}
densaugeo/base64 @ ~1.4.0
+1
View File
@@ -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() {
+2
View File
@@ -13,6 +13,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/MomentaryButton.h>
#include "helpers/ui/NullDisplayDriver.h"
#include <UITask.h>
#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();
+11 -4
View File
@@ -44,6 +44,7 @@ build_flags =
-D SX126X_RX_BOOSTED_GAIN=1
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_tracker>
+<helpers/ui/BaseUITask.cpp>
lib_deps =
${esp32_base.lib_deps}
stevemarple/MicroNMEA @ ^2.0.6
@@ -54,7 +55,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 +70,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
+<helpers/ui/ST7735Display.cpp>
lib_deps =
${Heltec_tracker_base.lib_deps}
@@ -80,7 +81,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 +95,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
+<helpers/ui/ST7735Display.cpp>
lib_deps =
${Heltec_tracker_base.lib_deps}
@@ -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}
+<helpers/ui/ST7735Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<helpers/ui/ST7735Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/ST7735Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${Heltec_tracker_base.lib_deps}
${esp32_ota.lib_deps}
+1
View File
@@ -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() {
+2
View File
@@ -11,6 +11,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/ST7735Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+14 -7
View File
@@ -52,6 +52,7 @@ build_flags =
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_tracker_v2>
+<helpers/sensors>
+<helpers/ui/BaseUITask.cpp>
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}
+<helpers/ui/ST7735Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<helpers/ui/ST7735Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/ST7735Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${Heltec_tracker_v2.lib_deps}
${esp32_ota.lib_deps}
@@ -136,7 +143,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 +154,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter}
+<helpers/ui/ST7735Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_tracker_v2.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -156,7 +163,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 +179,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter}
+<helpers/ui/MomentaryButton.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_tracker_v2.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -181,7 +188,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 +205,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_tracker_v2.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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}
+1
View File
@@ -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() {
+2
View File
@@ -11,6 +11,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/ST7735Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+13 -6
View File
@@ -23,6 +23,7 @@ build_flags =
-D PIN_OLED_RESET=16
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_v2>
+<helpers/ui/BaseUITask.cpp>
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>
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/server>
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}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${Heltec_lora32_v2.lib_deps}
${esp32_ota.lib_deps}
@@ -133,7 +140,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 +152,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_lora32_v2.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -154,7 +161,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 +175,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_lora32_v2.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -177,7 +184,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 +201,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${Heltec_lora32_v2.lib_deps}
densaugeo/base64 @ ~1.4.0
+1
View File
@@ -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() {
+2
View File
@@ -10,6 +10,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/SSD1306Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+25 -7
View File
@@ -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/*.cpp>
+<helpers/ui/BaseUITask.cpp>
+<helpers/sensors>
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}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/server>
+<../examples/simple_repeater>
+<../variants/heltec_v3/ui-other/*.cpp>
lib_deps =
${Heltec_lora32_v3.lib_deps}
${esp32_ota.lib_deps}
@@ -61,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
@@ -76,7 +81,9 @@ build_flags =
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
+<helpers/bridges/RS232Bridge.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/server>
+<../examples/simple_repeater>
+<../variants/heltec_v3/ui-other/*.cpp>
lib_deps =
${Heltec_lora32_v3.lib_deps}
${esp32_ota.lib_deps}
@@ -98,7 +105,9 @@ build_flags =
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
+<helpers/bridges/ESPNowBridge.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/server>
+<../examples/simple_repeater>
+<../variants/heltec_v3/ui-other/*.cpp>
lib_deps =
${Heltec_lora32_v3.lib_deps}
${esp32_ota.lib_deps}
@@ -107,6 +116,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 +127,9 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/server>
+<../examples/simple_room_server>
+<../variants/heltec_v3/ui-other/*.cpp>
lib_deps =
${Heltec_lora32_v3.lib_deps}
${esp32_ota.lib_deps}
@@ -140,7 +152,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
@@ -150,8 +162,9 @@ build_flags =
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/companion-new>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../variants/heltec_v3/ui-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 src/helpers/ui/companion-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D DISPLAY_CLASS=SSD1306Display
@@ -174,10 +187,11 @@ build_flags =
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/companion-new>
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../variants/heltec_v3/ui-companion/*.cpp>
lib_deps =
${Heltec_lora32_v3.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -186,7 +200,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
@@ -200,10 +214,11 @@ build_flags =
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/companion-new>
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../variants/heltec_v3/ui-companion/*.cpp>
lib_deps =
${Heltec_lora32_v3.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -212,6 +227,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 +239,9 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/server>
+<../examples/simple_sensor>
+<../variants/heltec_v3/ui-other/*.cpp>
lib_deps =
${Heltec_lora32_v3.lib_deps}
${esp32_ota.lib_deps}
-5
View File
@@ -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);
+2
View File
@@ -11,6 +11,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/SSD1306Display.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h> // 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();
@@ -0,0 +1,9 @@
#include <Arduino.h>
#include "target.h"
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
UITask ui_task(&board);
#endif
+9
View File
@@ -0,0 +1,9 @@
#include <Arduino.h>
#include "target.h"
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
UITask ui_task(&board, &display);
#endif
+29 -14
View File
@@ -45,6 +45,7 @@ build_flags =
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_v4>
+<helpers/sensors>
+<helpers/ui/BaseUITask.cpp>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${heltec_v4_oled.lib_deps}
${esp32_ota.lib_deps}
@@ -183,7 +192,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 +203,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_oled.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -203,7 +212,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 +230,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_oled.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -230,7 +239,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 +257,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_oled.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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}
+<helpers/ui/ST7789LCDDisplay.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/bridges/ESPNowBridge.cpp>
+<helpers/ui/ST7789LCDDisplay.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/ST7789LCDDisplay.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${heltec_v4_tft.lib_deps}
${esp32_ota.lib_deps}
@@ -354,7 +369,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 +380,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter}
+<helpers/ui/ST7789LCDDisplay.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_tft.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -374,7 +389,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 +406,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_tft.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -400,7 +415,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 +432,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_tft.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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}
+1
View File
@@ -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() {
+2
View File
@@ -15,6 +15,7 @@
#include <helpers/ui/ST7789LCDDisplay.h>
#endif
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#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();
+23 -14
View File
@@ -41,6 +41,7 @@ build_flags =
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_v4_r8>
+<helpers/sensors>
+<helpers/ui/BaseUITask.cpp>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${heltec_v4_r8_oled.lib_deps}
${esp32_ota.lib_deps}
@@ -134,7 +139,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 +148,7 @@ build_src_filter = ${heltec_v4_r8_oled.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_r8_oled.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -152,7 +157,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 +172,7 @@ build_src_filter = ${heltec_v4_r8_oled.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_r8_oled.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -176,7 +181,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 +196,7 @@ build_src_filter = ${heltec_v4_r8_oled.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_r8_oled.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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}
+<helpers/ui/SSD1306Display.cpp>
+<../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}
+<helpers/ui/ST7789LCDDisplay.cpp>
+<../examples/simple_repeater>
+<helpers/ui/server>
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}
+<helpers/ui/ST7789LCDDisplay.cpp>
+<../examples/simple_room_server>
+<helpers/ui/server>
lib_deps =
${heltec_v4_r8_tft.lib_deps}
${esp32_ota.lib_deps}
@@ -263,7 +272,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 +281,7 @@ build_src_filter = ${heltec_v4_r8_tft.build_src_filter}
+<helpers/ui/ST7789LCDDisplay.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_r8_tft.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -281,7 +290,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 +303,7 @@ build_src_filter = ${heltec_v4_r8_tft.build_src_filter}
+<helpers/ui/MomentaryButton.cpp>
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_r8_tft.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -303,7 +312,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 +327,7 @@ build_src_filter = ${heltec_v4_r8_tft.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/companion-new>
lib_deps =
${heltec_v4_r8_tft.lib_deps}
densaugeo/base64 @ ~1.4.0
@@ -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}
+<helpers/ui/ST7789LCDDisplay.cpp>
+<../examples/simple_sensor>
+1
View File
@@ -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() {
Loaded 100 of 262 files, more files were not shown because too many files have changed in this diff. Show more