Merge upstream/dev (16 commits): UITask moved to src/helpers/ui
pub-release / release (push) Successful in 37m52s
pub-release / release (push) Successful in 37m52s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
9652199464
264 files changed
+1345
-927
No files matched your search
@@ -3,7 +3,7 @@
|
|||||||
#include <helpers/IdentityStore.h>
|
#include <helpers/IdentityStore.h>
|
||||||
#include <helpers/ContactInfo.h>
|
#include <helpers/ContactInfo.h>
|
||||||
#include <helpers/ChannelDetails.h>
|
#include <helpers/ChannelDetails.h>
|
||||||
#include "NodePrefs.h"
|
#include <helpers/CompanionNodePrefs.h>
|
||||||
|
|
||||||
class DataStoreHost {
|
class DataStoreHost {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -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[]
|
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) {
|
void MyMesh::onContactPathUpdated(const ContactInfo &contact) {
|
||||||
out_frame[0] = PUSH_CODE_PATH_UPDATED;
|
out_frame[0] = PUSH_CODE_PATH_UPDATED;
|
||||||
memcpy(&out_frame[1], contact.id.pub_key, PUB_KEY_SIZE);
|
memcpy(&out_frame[1], contact.id.pub_key, PUB_KEY_SIZE);
|
||||||
@@ -2704,21 +2690,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
|
// To check if there is pending work
|
||||||
bool MyMesh::hasPendingWork() const {
|
bool MyMesh::hasPendingWork() const {
|
||||||
return _mgr->getOutboundTotal() > 0 || dirty_contacts_expiry != 0;
|
return _mgr->getOutboundTotal() > 0 || dirty_contacts_expiry != 0;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "DataStore.h"
|
#include "DataStore.h"
|
||||||
#include "NodePrefs.h"
|
#include <helpers/CompanionNodePrefs.h>
|
||||||
|
|
||||||
#include <RTClib.h>
|
#include <RTClib.h>
|
||||||
#include <helpers/ArduinoHelpers.h>
|
#include <helpers/ArduinoHelpers.h>
|
||||||
@@ -68,6 +68,7 @@
|
|||||||
|
|
||||||
#include <helpers/BaseChatMesh.h>
|
#include <helpers/BaseChatMesh.h>
|
||||||
#include <helpers/TransportKeyStore.h>
|
#include <helpers/TransportKeyStore.h>
|
||||||
|
#include <helpers/MeshEventListener.h>
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
@@ -75,10 +76,6 @@
|
|||||||
#define REQ_TYPE_KEEP_ALIVE 0x02
|
#define REQ_TYPE_KEEP_ALIVE 0x02
|
||||||
#define REQ_TYPE_GET_TELEMETRY_DATA 0x03
|
#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 {
|
struct AdvertPath {
|
||||||
uint8_t pubkey_prefix[7];
|
uint8_t pubkey_prefix[7];
|
||||||
uint8_t path_len;
|
uint8_t path_len;
|
||||||
@@ -89,30 +86,11 @@ struct AdvertPath {
|
|||||||
|
|
||||||
class MyMesh : public BaseChatMesh, public DataStoreHost {
|
class MyMesh : public BaseChatMesh, public DataStoreHost {
|
||||||
public:
|
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);
|
MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMeshTables &tables, DataStore& store);
|
||||||
|
|
||||||
void begin();
|
void begin();
|
||||||
void startInterface(BaseSerialInterface &serial);
|
void startInterface(BaseSerialInterface &serial);
|
||||||
void setListener(Listener* listener) { _listener = listener; }
|
void setListener(MeshEventListener* listener) { _listener = listener; }
|
||||||
|
|
||||||
const char *getNodeName();
|
const char *getNodeName();
|
||||||
NodePrefs *getNodePrefs();
|
NodePrefs *getNodePrefs();
|
||||||
@@ -121,10 +99,14 @@ public:
|
|||||||
|
|
||||||
void loop();
|
void loop();
|
||||||
void handleCmdFrame(size_t len);
|
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:
|
protected:
|
||||||
float getAirtimeBudgetFactor() const override;
|
float getAirtimeBudgetFactor() const override;
|
||||||
@@ -199,13 +181,6 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
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
|
#if ENV_INCLUDE_GPS == 1
|
||||||
void applyGpsPrefs() {
|
void applyGpsPrefs() {
|
||||||
if (_prefs.gps_interval > 0 &&
|
if (_prefs.gps_interval > 0 &&
|
||||||
@@ -255,7 +230,7 @@ private:
|
|||||||
uint32_t pending_telemetry, pending_discovery; // pending _TELEMETRY_REQ
|
uint32_t pending_telemetry, pending_discovery; // pending _TELEMETRY_REQ
|
||||||
uint32_t pending_req; // pending _BINARY_REQ
|
uint32_t pending_req; // pending _BINARY_REQ
|
||||||
BaseSerialInterface *_serial;
|
BaseSerialInterface *_serial;
|
||||||
Listener* _listener;
|
MeshEventListener* _listener;
|
||||||
|
|
||||||
ContactsIterator _iter;
|
ContactsIterator _iter;
|
||||||
uint32_t _iter_filter_since;
|
uint32_t _iter_filter_since;
|
||||||
|
|||||||
@@ -112,11 +112,6 @@ MultiSerialInterface interface_manager;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GLOBAL OBJECTS */
|
/* GLOBAL OBJECTS */
|
||||||
#ifdef DISPLAY_CLASS
|
|
||||||
#include "UITask.h"
|
|
||||||
UITask ui_task(&board, &interface_manager);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
StdRNG fast_rng;
|
StdRNG fast_rng;
|
||||||
SimpleMeshTables tables;
|
SimpleMeshTables tables;
|
||||||
MyMesh the_mesh(radio_driver, fast_rng, rtc_clock, tables, store);
|
MyMesh the_mesh(radio_driver, fast_rng, rtc_clock, tables, store);
|
||||||
@@ -328,7 +323,7 @@ void setup() {
|
|||||||
sensors.applyInaShunt(the_mesh.getNodePrefs()->ina_shunt_mohm); // CUSTOM (TeTeHacko)
|
sensors.applyInaShunt(the_mesh.getNodePrefs()->ina_shunt_mohm); // CUSTOM (TeTeHacko)
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#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);
|
the_mesh.setListener(&ui_task);
|
||||||
#ifdef EINK_REFRESH_LOOP
|
#ifdef EINK_REFRESH_LOOP
|
||||||
if (disp != NULL) disp->setBusyHook(loopDuringDisplayRefresh);
|
if (disp != NULL) disp->setBusyHook(loopDuringDisplayRefresh);
|
||||||
|
|||||||
@@ -186,8 +186,6 @@ struct PktFeedRec {
|
|||||||
#define FIRMWARE_VERSION "v1.18.0"
|
#define FIRMWARE_VERSION "v1.18.0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FIRMWARE_ROLE "repeater"
|
|
||||||
|
|
||||||
#define PACKET_LOG_FILE "/packet_log"
|
#define PACKET_LOG_FILE "/packet_log"
|
||||||
|
|
||||||
class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
||||||
@@ -450,7 +448,7 @@ public:
|
|||||||
void sendNodeDiscoverReq();
|
void sendNodeDiscoverReq();
|
||||||
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
|
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
|
||||||
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
|
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; }
|
const char* getNodeName() { return _prefs.node_name; }
|
||||||
NodePrefs* getNodePrefs() {
|
NodePrefs* getNodePrefs() {
|
||||||
return &_prefs;
|
return &_prefs;
|
||||||
|
|||||||
@@ -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();
|
|
||||||
};
|
|
||||||
@@ -598,11 +598,6 @@ bool identHandleCommand(const char* command, char* reply) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
|
||||||
#include "UITask.h"
|
|
||||||
static UITask ui_task(board, display);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ETHERNET_ENABLED
|
#ifdef ETHERNET_ENABLED
|
||||||
#define ETHERNET_CLI_BANNER "MeshCore Repeater CLI"
|
#define ETHERNET_CLI_BANNER "MeshCore Repeater CLI"
|
||||||
#include <helpers/nrf52/EthernetCLI.h>
|
#include <helpers/nrf52/EthernetCLI.h>
|
||||||
@@ -894,7 +889,7 @@ void setup() {
|
|||||||
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh); // CUSTOM (TeTeHacko): needs the prefs loaded by begin()
|
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh); // CUSTOM (TeTeHacko): needs the prefs loaded by begin()
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#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
|
#endif
|
||||||
|
|
||||||
#ifdef ETHERNET_ENABLED
|
#ifdef ETHERNET_ENABLED
|
||||||
|
|||||||
@@ -78,8 +78,6 @@
|
|||||||
#define TXT_ACK_DELAY 200
|
#define TXT_ACK_DELAY 200
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FIRMWARE_ROLE "room_server"
|
|
||||||
|
|
||||||
#define PACKET_LOG_FILE "/packet_log"
|
#define PACKET_LOG_FILE "/packet_log"
|
||||||
|
|
||||||
#define MAX_POST_TEXT_LEN (160-9)
|
#define MAX_POST_TEXT_LEN (160-9)
|
||||||
@@ -196,7 +194,7 @@ public:
|
|||||||
|
|
||||||
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
|
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
|
||||||
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
|
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; }
|
const char* getNodeName() { return _prefs.node_name; }
|
||||||
NodePrefs* getNodePrefs() {
|
NodePrefs* getNodePrefs() {
|
||||||
return &_prefs;
|
return &_prefs;
|
||||||
|
|||||||
@@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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();
|
|
||||||
};
|
|
||||||
@@ -9,11 +9,6 @@
|
|||||||
#include <helpers/nrf52/EthernetCLI.h>
|
#include <helpers/nrf52/EthernetCLI.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
|
||||||
#include "UITask.h"
|
|
||||||
static UITask ui_task(display);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
StdRNG fast_rng;
|
StdRNG fast_rng;
|
||||||
SimpleMeshTables tables;
|
SimpleMeshTables tables;
|
||||||
MyMesh the_mesh(board, radio_driver, *new ArduinoMillis(), fast_rng, rtc_clock, tables);
|
MyMesh the_mesh(board, radio_driver, *new ArduinoMillis(), fast_rng, rtc_clock, tables);
|
||||||
@@ -102,7 +97,7 @@ void setup() {
|
|||||||
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh);
|
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh);
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#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
|
#endif
|
||||||
|
|
||||||
#ifdef ETHERNET_ENABLED
|
#ifdef ETHERNET_ENABLED
|
||||||
|
|||||||
@@ -42,8 +42,6 @@
|
|||||||
#define FIRMWARE_VERSION "v1.18.0"
|
#define FIRMWARE_VERSION "v1.18.0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FIRMWARE_ROLE "sensor"
|
|
||||||
|
|
||||||
#define MAX_SEARCH_RESULTS 24
|
#define MAX_SEARCH_RESULTS 24
|
||||||
#define MAX_CONCURRENT_ALERTS 4
|
#define MAX_CONCURRENT_ALERTS 4
|
||||||
|
|
||||||
@@ -57,7 +55,7 @@ public:
|
|||||||
// CommonCLI callbacks
|
// CommonCLI callbacks
|
||||||
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
|
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
|
||||||
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
|
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; }
|
const char* getNodeName() { return _prefs.node_name; }
|
||||||
NodePrefs* getNodePrefs() { return &_prefs; }
|
NodePrefs* getNodePrefs() { return &_prefs; }
|
||||||
void savePrefs() override { _cli.savePrefs(_fs); }
|
void savePrefs() override { _cli.savePrefs(_fs); }
|
||||||
|
|||||||
@@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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();
|
|
||||||
};
|
|
||||||
@@ -4,11 +4,6 @@
|
|||||||
// CUSTOM (TeTeHacko): dfu, radio silence watchdog, reset reason -- see NodeMaintenance.h.
|
// CUSTOM (TeTeHacko): dfu, radio silence watchdog, reset reason -- see NodeMaintenance.h.
|
||||||
static NodeMaintenance maint(board, radio_driver);
|
static NodeMaintenance maint(board, radio_driver);
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
|
||||||
#include "UITask.h"
|
|
||||||
static UITask ui_task(display);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class MyMesh : public SensorMesh {
|
class MyMesh : public SensorMesh {
|
||||||
public:
|
public:
|
||||||
MyMesh(mesh::MainBoard& board, mesh::Radio& radio, mesh::MillisecondClock& ms, mesh::RNG& rng, mesh::RTCClock& rtc, mesh::MeshTables& tables)
|
MyMesh(mesh::MainBoard& board, mesh::Radio& radio, mesh::MillisecondClock& ms, mesh::RNG& rng, mesh::RTCClock& rtc, mesh::MeshTables& tables)
|
||||||
@@ -118,7 +113,7 @@ void setup() {
|
|||||||
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh);
|
maint.begin(fs, the_mesh.getNodePrefs(), &the_mesh);
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#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
|
#endif
|
||||||
|
|
||||||
// send out initial zero hop Advertisement to the mesh
|
// send out initial zero hop Advertisement to the mesh
|
||||||
|
|||||||
@@ -182,5 +182,8 @@ public:
|
|||||||
bool setChannel(int idx, const ChannelDetails& src);
|
bool setChannel(int idx, const ChannelDetails& src);
|
||||||
int findChannelIdx(const mesh::GroupChannel& ch);
|
int findChannelIdx(const mesh::GroupChannel& ch);
|
||||||
|
|
||||||
|
virtual void savePrefs() { }
|
||||||
|
virtual void enterCLIRescue() { }
|
||||||
|
|
||||||
void loop();
|
void loop();
|
||||||
};
|
};
|
||||||
@@ -4,16 +4,10 @@
|
|||||||
#include "SensorManager.h"
|
#include "SensorManager.h"
|
||||||
|
|
||||||
class CommonGpsPrefs : public ConfigSerializer {
|
class CommonGpsPrefs : public ConfigSerializer {
|
||||||
bool _is_dirty = false;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CommonGpsPrefs() = default;
|
CommonGpsPrefs() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void markDirty() { _is_dirty = true; }
|
|
||||||
void clearDirty() { _is_dirty = false; }
|
|
||||||
bool isDirty() const { return _is_dirty; }
|
|
||||||
|
|
||||||
virtual bool isGpsEnabled() const = 0;
|
virtual bool isGpsEnabled() const = 0;
|
||||||
virtual void setGpsEnabled(bool enabled) = 0;
|
virtual void setGpsEnabled(bool enabled) = 0;
|
||||||
virtual uint32_t getGpsPeriod() const = 0;
|
virtual uint32_t getGpsPeriod() const = 0;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
class CommonRadioPrefs : public ConfigSerializer, public KeyValueStore {
|
class CommonRadioPrefs : public ConfigSerializer, public KeyValueStore {
|
||||||
bool _is_dirty = false;
|
|
||||||
#ifdef WITH_RX_POWERSAVING
|
#ifdef WITH_RX_POWERSAVING
|
||||||
uint8_t _active_sf = 0; // what the radio runs now (tempradio differs from prefs)
|
uint8_t _active_sf = 0; // what the radio runs now (tempradio differs from prefs)
|
||||||
float _active_bw = 0;
|
float _active_bw = 0;
|
||||||
@@ -14,10 +13,6 @@ class CommonRadioPrefs : public ConfigSerializer, public KeyValueStore {
|
|||||||
protected:
|
protected:
|
||||||
CommonRadioPrefs() { }
|
CommonRadioPrefs() { }
|
||||||
public:
|
public:
|
||||||
void markDirty() { _is_dirty = true; }
|
|
||||||
void clearDirty() { _is_dirty = false; }
|
|
||||||
bool isDirty() const { return _is_dirty; }
|
|
||||||
|
|
||||||
virtual float getFreq() const = 0;
|
virtual float getFreq() const = 0;
|
||||||
virtual void setFreq(float f) = 0;
|
virtual void setFreq(float f) = 0;
|
||||||
|
|
||||||
|
|||||||
File renamed without changes.
@@ -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/ui/UIScreen.h>
|
||||||
#include <helpers/SensorManager.h>
|
#include <helpers/SensorManager.h>
|
||||||
#include <helpers/MultiSerialInterface.h>
|
#include <helpers/MultiSerialInterface.h>
|
||||||
|
#include <helpers/MeshEventListener.h>
|
||||||
|
#include <helpers/CompanionNodePrefs.h>
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
#include <helpers/ui/buzzer.h>
|
#include <helpers/ui/buzzer.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "NodePrefs.h"
|
|
||||||
#include "MyMesh.h"
|
|
||||||
|
|
||||||
enum class UIEventType {
|
enum class UIEventType {
|
||||||
none,
|
none,
|
||||||
contactMessage,
|
contactMessage,
|
||||||
@@ -23,12 +22,12 @@ enum class UIEventType {
|
|||||||
ack
|
ack
|
||||||
};
|
};
|
||||||
|
|
||||||
class AbstractUITask : public MyMesh::Listener {
|
class AbstractUITask : public MeshEventListener {
|
||||||
protected:
|
protected:
|
||||||
mesh::MainBoard* _board;
|
mesh::MainBoard* _board;
|
||||||
MultiSerialInterface* _interfaceManager;
|
MultiSerialInterface* _interfaceManager;
|
||||||
|
|
||||||
AbstractUITask(mesh::MainBoard* board, MultiSerialInterface* interfaceManager) : _board(board), _interfaceManager(interfaceManager) {
|
AbstractUITask(mesh::MainBoard* board, MultiSerialInterface* interfaceManager = NULL) : _board(board), _interfaceManager(interfaceManager) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
};
|
||||||
+58
-20
@@ -1,8 +1,8 @@
|
|||||||
#include "UITask.h"
|
#include "UITask.h"
|
||||||
#include <helpers/TxtDataHelpers.h>
|
#include <helpers/TxtDataHelpers.h>
|
||||||
#include "../MyMesh.h"
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <RTClib.h>
|
||||||
#ifdef ENABLE_WIFI_INTERFACE
|
#ifdef ENABLE_WIFI_INTERFACE
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -31,18 +31,22 @@
|
|||||||
#define PRESS_LABEL "long press"
|
#define PRESS_LABEL "long press"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Copied from simple_repeater
|
||||||
|
#define CTL_TYPE_NODE_DISCOVER_REQ 0x80
|
||||||
|
#define CTL_TYPE_NODE_DISCOVER_RESP 0x90
|
||||||
|
|
||||||
#include "icons.h"
|
#include "icons.h"
|
||||||
|
|
||||||
class SplashScreen : public UIScreen {
|
class SplashScreen : public UIScreen {
|
||||||
UITask* _task;
|
UITask* _task;
|
||||||
unsigned long dismiss_after;
|
unsigned long dismiss_after;
|
||||||
char _version_info[12];
|
char _version_info[12];
|
||||||
|
const char* _build_date;
|
||||||
|
|
||||||
public:
|
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
|
// strip off dash and commit hash by changing dash to null terminator
|
||||||
// e.g: v1.2.3-abcdef -> v1.2.3
|
// e.g: v1.2.3-abcdef -> v1.2.3
|
||||||
const char *ver = FIRMWARE_VERSION;
|
|
||||||
const char *dash = strchr(ver, '-');
|
const char *dash = strchr(ver, '-');
|
||||||
|
|
||||||
int len = dash ? dash - ver : strlen(ver);
|
int len = dash ? dash - ver : strlen(ver);
|
||||||
@@ -50,6 +54,8 @@ public:
|
|||||||
memcpy(_version_info, ver, len);
|
memcpy(_version_info, ver, len);
|
||||||
_version_info[len] = 0;
|
_version_info[len] = 0;
|
||||||
|
|
||||||
|
_build_date = build_date;
|
||||||
|
|
||||||
dismiss_after = millis() + BOOT_SCREEN_MILLIS;
|
dismiss_after = millis() + BOOT_SCREEN_MILLIS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +80,7 @@ public:
|
|||||||
|
|
||||||
display.setColor(UIColor::secondary_txt);
|
display.setColor(UIColor::secondary_txt);
|
||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
display.drawTextCentered(display.width()/2, 48, FIRMWARE_BUILD_DATE);
|
display.drawTextCentered(display.width()/2, 48, _build_date);
|
||||||
|
|
||||||
return 1000;
|
return 1000;
|
||||||
}
|
}
|
||||||
@@ -110,6 +116,11 @@ static void formatFixAge(char* buf, size_t size, uint32_t seconds) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct AdvertPath {
|
||||||
|
char name[32];
|
||||||
|
uint32_t recv_timestamp;
|
||||||
|
};
|
||||||
|
|
||||||
class HomeScreen : public UIScreen {
|
class HomeScreen : public UIScreen {
|
||||||
enum HomePage {
|
enum HomePage {
|
||||||
FIRST,
|
FIRST,
|
||||||
@@ -140,6 +151,7 @@ class HomeScreen : public UIScreen {
|
|||||||
NodePrefs* _node_prefs;
|
NodePrefs* _node_prefs;
|
||||||
uint8_t _page;
|
uint8_t _page;
|
||||||
bool _shutdown_init;
|
bool _shutdown_init;
|
||||||
|
int recent_next_idx;
|
||||||
AdvertPath recent[UI_RECENT_LIST_SIZE];
|
AdvertPath recent[UI_RECENT_LIST_SIZE];
|
||||||
#if UI_DISCOVER_SCREEN
|
#if UI_DISCOVER_SCREEN
|
||||||
DiscoveredNode discovered[DISCOVERED_NODES_TABLE_SIZE]; // not circular, latest discovered nodes are not kept
|
DiscoveredNode discovered[DISCOVERED_NODES_TABLE_SIZE]; // not circular, latest discovered nodes are not kept
|
||||||
@@ -230,19 +242,31 @@ class HomeScreen : public UIScreen {
|
|||||||
public:
|
public:
|
||||||
HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs)
|
HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs)
|
||||||
: _task(task), _rtc(rtc), _sensors(sensors), _node_prefs(node_prefs), _page(0),
|
: _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
|
#if UI_DISCOVER_SCREEN
|
||||||
bool sendDiscoverRequest() {
|
bool sendDiscoverRequest() {
|
||||||
uint8_t cmd_bytes[6];
|
uint8_t cmd_bytes[6];
|
||||||
cmd_bytes[0] = CTL_TYPE_NODE_DISCOVER_REQ | 1; // DISCOVER_REQ | prefix only
|
cmd_bytes[0] = CTL_TYPE_NODE_DISCOVER_REQ | 1; // DISCOVER_REQ | prefix only
|
||||||
cmd_bytes[1] = 0xFF; // Repeaters
|
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);
|
memcpy(&cmd_bytes[2], &disc_node_req_tag, 4);
|
||||||
disc_nodes_count = 0;
|
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) {
|
if (req) {
|
||||||
the_mesh.sendZeroHop(req);
|
_task->getMesh()->sendZeroHop(req);
|
||||||
discovery_req_time = millis();
|
discovery_req_time = millis();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -256,7 +280,7 @@ public:
|
|||||||
d->type = packet->payload[0] & 0xF;
|
d->type = packet->payload[0] & 0xF;
|
||||||
d->snr_out = ((int8_t)packet->payload[1]) / 4.0;
|
d->snr_out = ((int8_t)packet->payload[1]) / 4.0;
|
||||||
d->snr_in = radio_driver.getLastSNR();
|
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) {
|
if (c != NULL) {
|
||||||
strncpy(d->name, c->name, 32);
|
strncpy(d->name, c->name, 32);
|
||||||
} else {
|
} else {
|
||||||
@@ -342,9 +366,9 @@ public:
|
|||||||
display.drawTextCentered(display.width() / 2, 43, "< Connected >");
|
display.drawTextCentered(display.width() / 2, 43, "< Connected >");
|
||||||
// CUSTOM (TeTeHacko): jen kdyz BT opravdu bezi -- jinak displej nabizi PIN
|
// CUSTOM (TeTeHacko): jen kdyz BT opravdu bezi -- jinak displej nabizi PIN
|
||||||
// k parovani, ktere neni jak navazat.
|
// k parovani, ktere neni jak navazat.
|
||||||
} else if (the_mesh.getBLEPin() != 0 && _task->isBluetoothEnabled()) { // BT pin
|
} else if (_task->getBLEPin() != 0 && _task->isBluetoothEnabled()) { // BT pin
|
||||||
display.setColor(UIColor::warning_txt);
|
display.setColor(UIColor::warning_txt);
|
||||||
sprintf(tmp, "Pin:%d", the_mesh.getBLEPin());
|
sprintf(tmp, "Pin:%d", _task->getBLEPin());
|
||||||
if (_node_prefs->ui_show_clock) {
|
if (_node_prefs->ui_show_clock) {
|
||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
display.drawTextCentered(display.width() / 2, 110, tmp);
|
display.drawTextCentered(display.width() / 2, 110, tmp);
|
||||||
@@ -354,11 +378,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (_page == HomePage::RECENT) {
|
} else if (_page == HomePage::RECENT) {
|
||||||
the_mesh.getRecentlyHeard(recent, UI_RECENT_LIST_SIZE);
|
|
||||||
display.setColor(UIColor::primary_txt);
|
display.setColor(UIColor::primary_txt);
|
||||||
int y = 20;
|
int y = 20;
|
||||||
for (int i = 0; i < UI_RECENT_LIST_SIZE; i++, y += 11) {
|
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[i];
|
auto a = &recent[k];
|
||||||
if (a->name[0] == 0) continue; // empty slot
|
if (a->name[0] == 0) continue; // empty slot
|
||||||
int secs = _rtc->getCurrentTime() - a->recv_timestamp;
|
int secs = _rtc->getCurrentTime() - a->recv_timestamp;
|
||||||
if (secs < 60) {
|
if (secs < 60) {
|
||||||
@@ -625,7 +648,15 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
if (c == KEY_ENTER && _page == HomePage::ADVERT) {
|
if (c == KEY_ENTER && _page == HomePage::ADVERT) {
|
||||||
_task->notify(UIEventType::ack);
|
_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);
|
_task->showAlert("Advert sent!", 1000);
|
||||||
} else {
|
} else {
|
||||||
_task->showAlert("Advert failed..", 1000);
|
_task->showAlert("Advert failed..", 1000);
|
||||||
@@ -758,9 +789,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;
|
_display = display;
|
||||||
_sensors = sensors;
|
_sensors = sensors;
|
||||||
|
_interfaceManager = serial;
|
||||||
|
the_mesh = mesh;
|
||||||
|
_ble_pin = ble_pin;
|
||||||
|
|
||||||
#if defined(PIN_USER_BTN)
|
#if defined(PIN_USER_BTN)
|
||||||
user_btn.begin();
|
user_btn.begin();
|
||||||
@@ -793,7 +829,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
|
|||||||
ui_started_at = millis();
|
ui_started_at = millis();
|
||||||
_alert_expiry = 0;
|
_alert_expiry = 0;
|
||||||
|
|
||||||
splash = new SplashScreen(this);
|
splash = new SplashScreen(this, ver, build_date);
|
||||||
home = new HomeScreen(this, &rtc_clock, sensors, node_prefs);
|
home = new HomeScreen(this, &rtc_clock, sensors, node_prefs);
|
||||||
msg_preview = new MsgPreviewScreen(this, &rtc_clock);
|
msg_preview = new MsgPreviewScreen(this, &rtc_clock);
|
||||||
setCurrScreen(splash);
|
setCurrScreen(splash);
|
||||||
@@ -890,6 +926,8 @@ void UITask::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path
|
|||||||
if (!hasConnection()) {
|
if (!hasConnection()) {
|
||||||
notify(UIEventType::newContactMessage);
|
notify(UIEventType::newContactMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
((HomeScreen *) home)->addToRecents(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UITask::onControlDataRecv(const mesh::Packet* packet) {
|
void UITask::onControlDataRecv(const mesh::Packet* packet) {
|
||||||
@@ -1180,7 +1218,7 @@ char UITask::checkDisplayOn(char c) {
|
|||||||
|
|
||||||
char UITask::handleLongPress(char c) {
|
char UITask::handleLongPress(char c) {
|
||||||
if (millis() - ui_started_at < 8000) { // long press in first 8 seconds since startup -> CLI/rescue
|
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
|
c = 0; // consume event
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
@@ -1225,7 +1263,7 @@ void UITask::toggleGPS() {
|
|||||||
_node_prefs->getGpsPrefs()->setGpsEnabled(*_sensors, true);
|
_node_prefs->getGpsPrefs()->setGpsEnabled(*_sensors, true);
|
||||||
notify(UIEventType::ack);
|
notify(UIEventType::ack);
|
||||||
}
|
}
|
||||||
the_mesh.savePrefs();
|
the_mesh->savePrefs();
|
||||||
showAlert(_node_prefs->getGpsPrefs()->isGpsEnabled() ? "GPS: Enabled" : "GPS: Disabled", 800);
|
showAlert(_node_prefs->getGpsPrefs()->isGpsEnabled() ? "GPS: Enabled" : "GPS: Disabled", 800);
|
||||||
_next_refresh = 0;
|
_next_refresh = 0;
|
||||||
break;
|
break;
|
||||||
@@ -1253,7 +1291,7 @@ void UITask::toggleBuzzer() {
|
|||||||
buzzer.quiet(true);
|
buzzer.quiet(true);
|
||||||
}
|
}
|
||||||
_node_prefs->buzzer_quiet = buzzer.isQuiet();
|
_node_prefs->buzzer_quiet = buzzer.isQuiet();
|
||||||
the_mesh.savePrefs();
|
the_mesh->savePrefs();
|
||||||
showAlert(buzzer.isQuiet() ? "Buzzer: OFF" : "Buzzer: ON", 800);
|
showAlert(buzzer.isQuiet() ? "Buzzer: OFF" : "Buzzer: ON", 800);
|
||||||
_next_refresh = 0; // trigger refresh
|
_next_refresh = 0; // trigger refresh
|
||||||
#endif
|
#endif
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <helpers/ui/DisplayDriver.h>
|
#include <helpers/ui/DisplayDriver.h>
|
||||||
#include <helpers/ui/UIScreen.h>
|
#include <helpers/ui/UIScreen.h>
|
||||||
#include <helpers/SensorManager.h>
|
#include <helpers/SensorManager.h>
|
||||||
|
#include <helpers/BaseChatMesh.h>
|
||||||
#include <helpers/MultiSerialInterface.h>
|
#include <helpers/MultiSerialInterface.h>
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <helpers/sensors/LPPDataHelpers.h>
|
#include <helpers/sensors/LPPDataHelpers.h>
|
||||||
@@ -19,8 +20,8 @@
|
|||||||
#include <helpers/ui/GenericVibration.h>
|
#include <helpers/ui/GenericVibration.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../AbstractUITask.h"
|
#include <helpers/ui/AbstractUITask.h>
|
||||||
#include "../NodePrefs.h"
|
#include <helpers/CompanionNodePrefs.h>
|
||||||
|
|
||||||
#ifdef UI_NO_DISCOVER_SCREEN
|
#ifdef UI_NO_DISCOVER_SCREEN
|
||||||
#error "UI_NO_DISCOVER_SCREEN is obsolete - use -D UI_DISCOVER_SCREEN=0 instead"
|
#error "UI_NO_DISCOVER_SCREEN is obsolete - use -D UI_DISCOVER_SCREEN=0 instead"
|
||||||
@@ -49,6 +50,8 @@ struct DiscoveredNode {
|
|||||||
class UITask : public AbstractUITask {
|
class UITask : public AbstractUITask {
|
||||||
DisplayDriver* _display;
|
DisplayDriver* _display;
|
||||||
SensorManager* _sensors;
|
SensorManager* _sensors;
|
||||||
|
BaseChatMesh* the_mesh;
|
||||||
|
uint32_t _ble_pin;
|
||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
genericBuzzer buzzer;
|
genericBuzzer buzzer;
|
||||||
#endif
|
#endif
|
||||||
@@ -90,12 +93,13 @@ class UITask : public AbstractUITask {
|
|||||||
|
|
||||||
public:
|
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;
|
next_batt_chck = _next_refresh = 0;
|
||||||
ui_started_at = 0;
|
ui_started_at = 0;
|
||||||
curr = NULL;
|
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 gotoHomeScreen() { setCurrScreen(home); }
|
||||||
void showAlert(const char* text, int duration_millis);
|
void showAlert(const char* text, int duration_millis);
|
||||||
@@ -103,6 +107,9 @@ public:
|
|||||||
bool hasDisplay() const { return _display != NULL; }
|
bool hasDisplay() const { return _display != NULL; }
|
||||||
bool isButtonPressed() const;
|
bool isButtonPressed() const;
|
||||||
|
|
||||||
|
BaseChatMesh* getMesh() const { return the_mesh; }
|
||||||
|
uint32_t getBLEPin() const { return _ble_pin; }
|
||||||
|
|
||||||
bool isBuzzerQuiet() {
|
bool isBuzzerQuiet() {
|
||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
return buzzer.isQuiet();
|
return buzzer.isQuiet();
|
||||||
@@ -116,7 +123,7 @@ public:
|
|||||||
void toggleGPS();
|
void toggleGPS();
|
||||||
void triggerGPS();
|
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 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 onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override;
|
||||||
void onQueueSizeChanged(int offline_queue_size) override;
|
void onQueueSizeChanged(int offline_queue_size) override;
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+24
-11
@@ -1,7 +1,7 @@
|
|||||||
#include "UITask.h"
|
#include "UITask.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <helpers/TxtDataHelpers.h>
|
#include <helpers/TxtDataHelpers.h>
|
||||||
#include "../MyMesh.h"
|
#include "target.h"
|
||||||
|
|
||||||
#define AUTO_OFF_MILLIS 15000 // 15 seconds
|
#define AUTO_OFF_MILLIS 15000 // 15 seconds
|
||||||
#define BOOT_SCREEN_MILLIS 3000 // 3 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,
|
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;
|
_display = display;
|
||||||
_sensors = sensors;
|
_sensors = sensors;
|
||||||
|
_interfaceManager = serial;
|
||||||
|
the_mesh = mesh;
|
||||||
|
_ble_pin = ble_pin;
|
||||||
|
|
||||||
_auto_off = millis() + AUTO_OFF_MILLIS;
|
_auto_off = millis() + AUTO_OFF_MILLIS;
|
||||||
clearMsgPreview();
|
clearMsgPreview();
|
||||||
_node_prefs = node_prefs;
|
_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
|
// strip off dash and commit hash by changing dash to null terminator
|
||||||
// e.g: v1.2.3-abcdef -> v1.2.3
|
// e.g: v1.2.3-abcdef -> v1.2.3
|
||||||
char *version = strdup(FIRMWARE_VERSION);
|
char *version = strdup(ver);
|
||||||
char *dash = strchr(version, '-');
|
char *dash = strchr(version, '-');
|
||||||
if (dash) {
|
if (dash) {
|
||||||
*dash = 0;
|
*dash = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// v1.2.3 (1 Jan 2025)
|
// 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
|
#ifdef PIN_BUZZER
|
||||||
buzzer.begin();
|
buzzer.begin();
|
||||||
@@ -300,11 +306,11 @@ void UITask::renderCurrScreen() {
|
|||||||
_display->print(tmp);
|
_display->print(tmp);
|
||||||
|
|
||||||
// BT pin
|
// BT pin
|
||||||
if (!hasConnection() && the_mesh.getBLEPin() != 0) {
|
if (!hasConnection() && _ble_pin != 0) {
|
||||||
_display->setColor(UIColor::warning_txt);
|
_display->setColor(UIColor::warning_txt);
|
||||||
_display->setTextSize(2);
|
_display->setTextSize(2);
|
||||||
_display->setCursor(0, 43);
|
_display->setCursor(0, 43);
|
||||||
sprintf(tmp, "Pin:%d", the_mesh.getBLEPin());
|
sprintf(tmp, "Pin:%d", _ble_pin);
|
||||||
_display->print(tmp);
|
_display->print(tmp);
|
||||||
_display->setColor(UIColor::primary_txt);
|
_display->setColor(UIColor::primary_txt);
|
||||||
} else {
|
} else {
|
||||||
@@ -555,7 +561,14 @@ void UITask::handleButtonDoublePress() {
|
|||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
notify(UIEventType::ack);
|
notify(UIEventType::ack);
|
||||||
#endif
|
#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!");
|
MESH_DEBUG_PRINTLN("Advert sent!");
|
||||||
sprintf(_alert, "Advert sent!");
|
sprintf(_alert, "Advert sent!");
|
||||||
} else {
|
} else {
|
||||||
@@ -584,7 +597,7 @@ void UITask::handleButtonTriplePress() {
|
|||||||
case 2: sprintf(_alert, "Alerts: Vibe only"); break;
|
case 2: sprintf(_alert, "Alerts: Vibe only"); break;
|
||||||
default: sprintf(_alert, "Alerts: Silent"); break;
|
default: sprintf(_alert, "Alerts: Silent"); break;
|
||||||
}
|
}
|
||||||
the_mesh.savePrefs();
|
the_mesh->savePrefs();
|
||||||
_need_refresh = true;
|
_need_refresh = true;
|
||||||
#elif defined(PIN_BUZZER)
|
#elif defined(PIN_BUZZER)
|
||||||
if (buzzer.isQuiet()) {
|
if (buzzer.isQuiet()) {
|
||||||
@@ -596,7 +609,7 @@ void UITask::handleButtonTriplePress() {
|
|||||||
sprintf(_alert, "Buzzer: OFF");
|
sprintf(_alert, "Buzzer: OFF");
|
||||||
}
|
}
|
||||||
_node_prefs->buzzer_quiet = buzzer.isQuiet();
|
_node_prefs->buzzer_quiet = buzzer.isQuiet();
|
||||||
the_mesh.savePrefs();
|
the_mesh->savePrefs();
|
||||||
_need_refresh = true;
|
_need_refresh = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -617,7 +630,7 @@ void UITask::handleButtonQuadruplePress() {
|
|||||||
notify(UIEventType::ack);
|
notify(UIEventType::ack);
|
||||||
sprintf(_alert, "GPS: Enabled");
|
sprintf(_alert, "GPS: Enabled");
|
||||||
}
|
}
|
||||||
the_mesh.savePrefs();
|
the_mesh->savePrefs();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -628,7 +641,7 @@ void UITask::handleButtonQuadruplePress() {
|
|||||||
void UITask::handleButtonLongPress() {
|
void UITask::handleButtonLongPress() {
|
||||||
MESH_DEBUG_PRINTLN("UITask: long press triggered");
|
MESH_DEBUG_PRINTLN("UITask: long press triggered");
|
||||||
if (millis() - ui_started_at < 8000) { // long press in first 8 seconds since startup -> CLI/rescue
|
if (millis() - ui_started_at < 8000) { // long press in first 8 seconds since startup -> CLI/rescue
|
||||||
the_mesh.enterCLIRescue();
|
the_mesh->enterCLIRescue();
|
||||||
} else {
|
} else {
|
||||||
shutdown();
|
shutdown();
|
||||||
}
|
}
|
||||||
@@ -3,14 +3,15 @@
|
|||||||
#include <MeshCore.h>
|
#include <MeshCore.h>
|
||||||
#include <helpers/ui/DisplayDriver.h>
|
#include <helpers/ui/DisplayDriver.h>
|
||||||
#include <helpers/SensorManager.h>
|
#include <helpers/SensorManager.h>
|
||||||
|
#include <helpers/BaseChatMesh.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
#include <helpers/ui/buzzer.h>
|
#include <helpers/ui/buzzer.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../AbstractUITask.h"
|
#include <helpers/ui/AbstractUITask.h>
|
||||||
#include "../NodePrefs.h"
|
#include <helpers/CompanionNodePrefs.h>
|
||||||
|
|
||||||
#include "Button.h"
|
#include "Button.h"
|
||||||
|
|
||||||
@@ -21,6 +22,8 @@
|
|||||||
class UITask : public AbstractUITask {
|
class UITask : public AbstractUITask {
|
||||||
DisplayDriver* _display;
|
DisplayDriver* _display;
|
||||||
SensorManager* _sensors;
|
SensorManager* _sensors;
|
||||||
|
BaseChatMesh* the_mesh;
|
||||||
|
uint32_t _ble_pin;
|
||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
genericBuzzer buzzer;
|
genericBuzzer buzzer;
|
||||||
#endif
|
#endif
|
||||||
@@ -57,20 +60,20 @@ class UITask : public AbstractUITask {
|
|||||||
void handleButtonTriplePress();
|
void handleButtonTriplePress();
|
||||||
void handleButtonQuadruplePress();
|
void handleButtonQuadruplePress();
|
||||||
void handleButtonLongPress();
|
void handleButtonLongPress();
|
||||||
|
|
||||||
|
|
||||||
public:
|
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;
|
_next_refresh = 0;
|
||||||
ui_started_at = 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; }
|
bool hasDisplay() const { return _display != NULL; }
|
||||||
void clearMsgPreview();
|
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 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 onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override;
|
||||||
void onQueueSizeChanged(int offline_queue_size) override;
|
void onQueueSizeChanged(int offline_queue_size) override;
|
||||||
File renamed without changes.
+47
-17
@@ -1,6 +1,5 @@
|
|||||||
#include "UITask.h"
|
#include "UITask.h"
|
||||||
#include <helpers/TxtDataHelpers.h>
|
#include <helpers/TxtDataHelpers.h>
|
||||||
#include "../MyMesh.h"
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "u8g2_icons.h"
|
#include "u8g2_icons.h"
|
||||||
|
|
||||||
@@ -36,12 +35,12 @@ class SplashScreen : public UIScreen {
|
|||||||
unsigned long dismiss_after;
|
unsigned long dismiss_after;
|
||||||
unsigned long version_after;
|
unsigned long version_after;
|
||||||
char _version_info[12];
|
char _version_info[12];
|
||||||
|
const char* _build_date;
|
||||||
|
|
||||||
public:
|
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
|
// strip off dash and commit hash by changing dash to null terminator
|
||||||
// e.g: v1.2.3-abcdef -> v1.2.3
|
// e.g: v1.2.3-abcdef -> v1.2.3
|
||||||
const char *ver = FIRMWARE_VERSION;
|
|
||||||
const char *dash = strchr(ver, '-');
|
const char *dash = strchr(ver, '-');
|
||||||
|
|
||||||
int len = dash ? dash - ver : strlen(ver);
|
int len = dash ? dash - ver : strlen(ver);
|
||||||
@@ -49,6 +48,8 @@ public:
|
|||||||
memcpy(_version_info, ver, len);
|
memcpy(_version_info, ver, len);
|
||||||
_version_info[len] = 0;
|
_version_info[len] = 0;
|
||||||
|
|
||||||
|
_build_date = build_date;
|
||||||
|
|
||||||
version_after = millis() + BOOT_SCREEN_MILLIS / 2;
|
version_after = millis() + BOOT_SCREEN_MILLIS / 2;
|
||||||
dismiss_after = millis() + BOOT_SCREEN_MILLIS;
|
dismiss_after = millis() + BOOT_SCREEN_MILLIS;
|
||||||
}
|
}
|
||||||
@@ -75,7 +76,7 @@ public:
|
|||||||
|
|
||||||
display.setColor(UIColor::secondary_txt);
|
display.setColor(UIColor::secondary_txt);
|
||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
display.drawTextCentered(display.width()/2, 27, FIRMWARE_BUILD_DATE);
|
display.drawTextCentered(display.width()/2, 27, _build_date);
|
||||||
}
|
}
|
||||||
return 1000;
|
return 1000;
|
||||||
}
|
}
|
||||||
@@ -87,6 +88,11 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct AdvertPath {
|
||||||
|
char name[32];
|
||||||
|
uint32_t recv_timestamp;
|
||||||
|
};
|
||||||
|
|
||||||
class HomeScreen : public UIScreen {
|
class HomeScreen : public UIScreen {
|
||||||
enum HomePage {
|
enum HomePage {
|
||||||
FIRST,
|
FIRST,
|
||||||
@@ -110,6 +116,7 @@ class HomeScreen : public UIScreen {
|
|||||||
NodePrefs* _node_prefs;
|
NodePrefs* _node_prefs;
|
||||||
uint8_t _page;
|
uint8_t _page;
|
||||||
bool _shutdown_init;
|
bool _shutdown_init;
|
||||||
|
int recent_next_idx;
|
||||||
AdvertPath recent[UI_RECENT_LIST_SIZE];
|
AdvertPath recent[UI_RECENT_LIST_SIZE];
|
||||||
|
|
||||||
CayenneLPP sensors_lpp;
|
CayenneLPP sensors_lpp;
|
||||||
@@ -142,7 +149,19 @@ class HomeScreen : public UIScreen {
|
|||||||
public:
|
public:
|
||||||
HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs)
|
HomeScreen(UITask* task, mesh::RTCClock* rtc, SensorManager* sensors, NodePrefs* node_prefs)
|
||||||
: _task(task), _rtc(rtc), _sensors(sensors), _node_prefs(node_prefs), _page(0),
|
: _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 {
|
void poll() override {
|
||||||
if (_shutdown_init && !_task->isButtonPressed()) { // must wait for USR button to be released
|
if (_shutdown_init && !_task->isButtonPressed()) { // must wait for USR button to be released
|
||||||
@@ -184,18 +203,17 @@ public:
|
|||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
display.drawTextCentered(display.width() / 2, display.height()-8, "< Connected >");
|
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.setColor(UIColor::warning_txt);
|
||||||
display.setTextSize(2);
|
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);
|
display.drawTextCentered(display.width() / 2, display.height()-8, tmp);
|
||||||
}
|
}
|
||||||
} else if (_page == HomePage::RECENT) {
|
} else if (_page == HomePage::RECENT) {
|
||||||
the_mesh.getRecentlyHeard(recent, UI_RECENT_LIST_SIZE);
|
|
||||||
display.setColor(UIColor::primary_txt);
|
display.setColor(UIColor::primary_txt);
|
||||||
int y = 8;
|
int y = 8;
|
||||||
for (int i = 0; i < UI_RECENT_LIST_SIZE; i++, y += 11) {
|
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[i];
|
auto a = &recent[k];
|
||||||
if (a->name[0] == 0) continue; // empty slot
|
if (a->name[0] == 0) continue; // empty slot
|
||||||
int secs = _rtc->getCurrentTime() - a->recv_timestamp;
|
int secs = _rtc->getCurrentTime() - a->recv_timestamp;
|
||||||
if (secs < 60) {
|
if (secs < 60) {
|
||||||
@@ -400,7 +418,14 @@ public:
|
|||||||
}
|
}
|
||||||
if (c == KEY_ENTER && _page == HomePage::ADVERT) {
|
if (c == KEY_ENTER && _page == HomePage::ADVERT) {
|
||||||
_task->notify(UIEventType::ack);
|
_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);
|
_task->showAlert("Advert sent!", 1000);
|
||||||
} else {
|
} else {
|
||||||
_task->showAlert("Advert failed..", 1000);
|
_task->showAlert("Advert failed..", 1000);
|
||||||
@@ -428,10 +453,14 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs, MultiSerialInterface* serial,
|
||||||
void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* node_prefs) {
|
BaseChatMesh* mesh, uint32_t ble_pin, const char* ver, const char* build_date)
|
||||||
|
{
|
||||||
_display = display;
|
_display = display;
|
||||||
_sensors = sensors;
|
_sensors = sensors;
|
||||||
|
_interfaceManager = serial;
|
||||||
|
the_mesh = mesh;
|
||||||
|
_ble_pin = ble_pin;
|
||||||
_auto_off = millis() + AUTO_OFF_MILLIS;
|
_auto_off = millis() + AUTO_OFF_MILLIS;
|
||||||
_cached_batt_mv = getBattMilliVolts();
|
_cached_batt_mv = getBattMilliVolts();
|
||||||
|
|
||||||
@@ -463,7 +492,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
|
|||||||
ui_started_at = millis();
|
ui_started_at = millis();
|
||||||
_alert_expiry = 0;
|
_alert_expiry = 0;
|
||||||
|
|
||||||
splash = new SplashScreen(this);
|
splash = new SplashScreen(this, ver, build_date);
|
||||||
home = new HomeScreen(this, &rtc_clock, sensors, node_prefs);
|
home = new HomeScreen(this, &rtc_clock, sensors, node_prefs);
|
||||||
setCurrScreen(splash);
|
setCurrScreen(splash);
|
||||||
}
|
}
|
||||||
@@ -547,6 +576,7 @@ void UITask::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path
|
|||||||
if (!hasConnection()) {
|
if (!hasConnection()) {
|
||||||
notify(UIEventType::newContactMessage);
|
notify(UIEventType::newContactMessage);
|
||||||
}
|
}
|
||||||
|
((HomeScreen *) home)->addToRecents(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UITask::userLedHandler() {
|
void UITask::userLedHandler() {
|
||||||
@@ -794,7 +824,7 @@ char UITask::checkDisplayOn(char c) {
|
|||||||
|
|
||||||
char UITask::handleLongPress(char c) {
|
char UITask::handleLongPress(char c) {
|
||||||
if (millis() - ui_started_at < 8000) { // long press in first 8 seconds since startup -> CLI/rescue
|
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
|
c = 0; // consume event
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
@@ -839,7 +869,7 @@ void UITask::toggleGPS() {
|
|||||||
_node_prefs->getGpsPrefs()->setGpsEnabled(*_sensors, true);
|
_node_prefs->getGpsPrefs()->setGpsEnabled(*_sensors, true);
|
||||||
notify(UIEventType::ack);
|
notify(UIEventType::ack);
|
||||||
}
|
}
|
||||||
the_mesh.savePrefs();
|
the_mesh->savePrefs();
|
||||||
showAlert(_node_prefs->getGpsPrefs()->isGpsEnabled() ? "GPS: Enabled" : "GPS: Disabled", 800);
|
showAlert(_node_prefs->getGpsPrefs()->isGpsEnabled() ? "GPS: Enabled" : "GPS: Disabled", 800);
|
||||||
_next_refresh = 0;
|
_next_refresh = 0;
|
||||||
break;
|
break;
|
||||||
@@ -858,7 +888,7 @@ void UITask::toggleBuzzer() {
|
|||||||
buzzer.quiet(true);
|
buzzer.quiet(true);
|
||||||
}
|
}
|
||||||
_node_prefs->buzzer_quiet = buzzer.isQuiet();
|
_node_prefs->buzzer_quiet = buzzer.isQuiet();
|
||||||
the_mesh.savePrefs();
|
the_mesh->savePrefs();
|
||||||
showAlert(buzzer.isQuiet() ? "Buzzer: OFF" : "Buzzer: ON", 800);
|
showAlert(buzzer.isQuiet() ? "Buzzer: OFF" : "Buzzer: ON", 800);
|
||||||
_next_refresh = 0; // trigger refresh
|
_next_refresh = 0; // trigger refresh
|
||||||
#endif
|
#endif
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <helpers/ui/DisplayDriver.h>
|
#include <helpers/ui/DisplayDriver.h>
|
||||||
#include <helpers/ui/UIScreen.h>
|
#include <helpers/ui/UIScreen.h>
|
||||||
#include <helpers/SensorManager.h>
|
#include <helpers/SensorManager.h>
|
||||||
|
#include <helpers/BaseChatMesh.h>
|
||||||
#include <helpers/MultiSerialInterface.h>
|
#include <helpers/MultiSerialInterface.h>
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <helpers/sensors/LPPDataHelpers.h>
|
#include <helpers/sensors/LPPDataHelpers.h>
|
||||||
@@ -22,12 +23,14 @@
|
|||||||
#include <helpers/ui/GenericVibration.h>
|
#include <helpers/ui/GenericVibration.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../AbstractUITask.h"
|
#include <helpers/ui/AbstractUITask.h>
|
||||||
#include "../NodePrefs.h"
|
#include <helpers/CompanionNodePrefs.h>
|
||||||
|
|
||||||
class UITask : public AbstractUITask {
|
class UITask : public AbstractUITask {
|
||||||
DisplayDriver* _display;
|
DisplayDriver* _display;
|
||||||
SensorManager* _sensors;
|
SensorManager* _sensors;
|
||||||
|
BaseChatMesh* the_mesh;
|
||||||
|
uint32_t _ble_pin;
|
||||||
ScrollingStatusBar _statusBar;
|
ScrollingStatusBar _statusBar;
|
||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
genericBuzzer buzzer;
|
genericBuzzer buzzer;
|
||||||
@@ -71,13 +74,14 @@ class UITask : public AbstractUITask {
|
|||||||
|
|
||||||
public:
|
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;
|
next_batt_chck = _next_refresh = 0;
|
||||||
_cached_batt_mv = 0;
|
_cached_batt_mv = 0;
|
||||||
ui_started_at = 0;
|
ui_started_at = 0;
|
||||||
curr = NULL;
|
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 gotoHomeScreen() { setCurrScreen(home); }
|
||||||
void showAlert(const char* text, int duration_millis);
|
void showAlert(const char* text, int duration_millis);
|
||||||
@@ -86,6 +90,9 @@ public:
|
|||||||
bool hasDisplay() const { return _display != NULL; }
|
bool hasDisplay() const { return _display != NULL; }
|
||||||
bool isButtonPressed() const;
|
bool isButtonPressed() const;
|
||||||
|
|
||||||
|
BaseChatMesh* getMesh() const { return the_mesh; }
|
||||||
|
uint32_t getBLEPin() const { return _ble_pin; }
|
||||||
|
|
||||||
bool isBuzzerQuiet() {
|
bool isBuzzerQuiet() {
|
||||||
#ifdef PIN_BUZZER
|
#ifdef PIN_BUZZER
|
||||||
return buzzer.isQuiet();
|
return buzzer.isQuiet();
|
||||||
@@ -98,7 +105,7 @@ public:
|
|||||||
bool getGPSState();
|
bool getGPSState();
|
||||||
void toggleGPS();
|
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 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 onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) override;
|
||||||
void onQueueSizeChanged(int offline_queue_size) override;
|
void onQueueSizeChanged(int offline_queue_size) override;
|
||||||
File renamed without changes.
@@ -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,
|
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;
|
_prevBtnState = HIGH;
|
||||||
_auto_off = millis() + AUTO_OFF_MILLIS;
|
_auto_off = millis() + AUTO_OFF_MILLIS;
|
||||||
_started_at = 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
|
// e.g: v1.2.3-abcdef -> v1.2.3
|
||||||
char *version = strdup(firmware_version);
|
char *version = strdup(firmware_version);
|
||||||
char *dash = strchr(version, '-');
|
char *dash = strchr(version, '-');
|
||||||
if(dash){
|
if (dash){
|
||||||
*dash = 0;
|
*dash = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// v1.2.3 (1 Jan 2025)
|
// v1.2.3 (1 Jan 2025)
|
||||||
snprintf(_version_info, sizeof(_version_info), "%s (%s)", version, build_date);
|
snprintf(_version_info, sizeof(_version_info), "%s (%s)", version, build_date);
|
||||||
free(version);
|
free(version);
|
||||||
|
|
||||||
|
_role_label = role_lbl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UITask::renderCurrScreen() {
|
long UITask::renderCurrScreen() {
|
||||||
char tmp[80];
|
char tmp[80];
|
||||||
if (millis() < _started_at + BOOT_SCREEN_MILLIS) { // boot screen
|
if (millis() < _started_at + BOOT_SCREEN_MILLIS) { // boot screen
|
||||||
// meshcore logo
|
// meshcore logo
|
||||||
@@ -72,8 +74,7 @@ void UITask::renderCurrScreen() {
|
|||||||
_display->drawTextCentered(_display->width() / 2, 35, _version_info);
|
_display->drawTextCentered(_display->width() / 2, 35, _version_info);
|
||||||
|
|
||||||
// node type
|
// node type
|
||||||
const char* node_type = "< Repeater >";
|
_display->drawTextCentered(_display->width() / 2, 48, _role_label);
|
||||||
_display->drawTextCentered(_display->width() / 2, 48, node_type);
|
|
||||||
} else if (_powering_off_at > 0) {
|
} else if (_powering_off_at > 0) {
|
||||||
// meshcore logo
|
// meshcore logo
|
||||||
_display->setColor(UIColor::corp_blue);
|
_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);
|
sprintf(tmp, "BW: %03.2f CR: %d", _node_prefs->bw, _node_prefs->cr);
|
||||||
_display->print(tmp);
|
_display->print(tmp);
|
||||||
}
|
}
|
||||||
|
return 1000; // 1 sec interval
|
||||||
}
|
}
|
||||||
|
|
||||||
void UITask::loop() {
|
void UITask::loop() {
|
||||||
@@ -126,18 +128,7 @@ void UITask::loop() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (_display->isOn()) {
|
BaseUITask::loop();
|
||||||
if (millis() >= _next_refresh) {
|
|
||||||
_display->startFrame();
|
|
||||||
renderCurrScreen();
|
|
||||||
_display->endFrame();
|
|
||||||
|
|
||||||
_next_refresh = millis() + 1000; // refresh every second
|
|
||||||
}
|
|
||||||
if (millis() > _auto_off) {
|
|
||||||
_display->turnOff();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_powering_off_at > 0) { // power off timer armed
|
if (_powering_off_at > 0) { // power off timer armed
|
||||||
#if defined(LED_PIN) && defined(LED_STATE_ON)
|
#if defined(LED_PIN) && defined(LED_STATE_ON)
|
||||||
@@ -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 <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "../../examples/companion_radio/NodePrefs.h"
|
#include "../../src/helpers/CompanionNodePrefs.h"
|
||||||
|
|
||||||
class ReplayStream : public Stream {
|
class ReplayStream : public Stream {
|
||||||
const char* _text;
|
const char* _text;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ extends = DFRobot_LoRaWAN_ESP32S3
|
|||||||
build_flags =
|
build_flags =
|
||||||
${DFRobot_LoRaWAN_ESP32S3.build_flags}
|
${DFRobot_LoRaWAN_ESP32S3.build_flags}
|
||||||
-I src/helpers/ui
|
-I src/helpers/ui
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_ROTATION=3
|
-D DISPLAY_ROTATION=3
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -67,7 +67,7 @@ build_src_filter = ${DFRobot_LoRaWAN_ESP32S3.build_src_filter}
|
|||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${DFRobot_LoRaWAN_ESP32S3.lib_deps}
|
${DFRobot_LoRaWAN_ESP32S3.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -19,6 +19,7 @@ SensorManager sensors;
|
|||||||
DISPLAY_CLASS display(&board.periph_power);
|
DISPLAY_CLASS display(&board.periph_power);
|
||||||
// Active-low button, internal pull-up.
|
// Active-low button, internal pull-up.
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/ST7735Display.h>
|
#include <helpers/ui/ST7735Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern DFRobotLoRaBoard board;
|
extern DFRobotLoRaBoard board;
|
||||||
@@ -20,6 +21,7 @@ extern SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ build_flags =
|
|||||||
-D SX126X_RX_BOOSTED_GAIN=1
|
-D SX126X_RX_BOOSTED_GAIN=1
|
||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/ebyte_eora_s3>
|
+<../variants/ebyte_eora_s3>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
adafruit/Adafruit SSD1306 @ ^2.5.13
|
adafruit/Adafruit SSD1306 @ ^2.5.13
|
||||||
@@ -46,6 +47,7 @@ lib_deps =
|
|||||||
extends = Ebyte_EoRa-S3
|
extends = Ebyte_EoRa-S3
|
||||||
build_flags =
|
build_flags =
|
||||||
${Ebyte_EoRa-S3.build_flags}
|
${Ebyte_EoRa-S3.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"EORA_S3-1262 Repeater"'
|
-D ADVERT_NAME='"EORA_S3-1262 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -57,6 +59,7 @@ build_flags =
|
|||||||
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
|
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Ebyte_EoRa-S3.lib_deps}
|
${Ebyte_EoRa-S3.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -79,6 +82,7 @@ lib_deps =
|
|||||||
extends = Ebyte_EoRa-S3
|
extends = Ebyte_EoRa-S3
|
||||||
build_flags =
|
build_flags =
|
||||||
${Ebyte_EoRa-S3.build_flags}
|
${Ebyte_EoRa-S3.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"EORA_S3-1262 Room"'
|
-D ADVERT_NAME='"EORA_S3-1262 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -90,6 +94,7 @@ build_flags =
|
|||||||
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
|
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Ebyte_EoRa-S3.lib_deps}
|
${Ebyte_EoRa-S3.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -98,7 +103,7 @@ lib_deps =
|
|||||||
extends = Ebyte_EoRa-S3
|
extends = Ebyte_EoRa-S3
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -109,7 +114,7 @@ build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Ebyte_EoRa-S3.lib_deps}
|
${Ebyte_EoRa-S3.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -118,7 +123,7 @@ lib_deps =
|
|||||||
extends = Ebyte_EoRa-S3
|
extends = Ebyte_EoRa-S3
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -132,7 +137,7 @@ build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Ebyte_EoRa-S3.lib_deps}
|
${Ebyte_EoRa-S3.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LORA_CR
|
#ifndef LORA_CR
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern ESP32Board board;
|
extern ESP32Board board;
|
||||||
@@ -20,6 +21,7 @@ extern SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<helpers/sensors>
|
+<helpers/sensors>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52_base.lib_deps}
|
${nrf52_base.lib_deps}
|
||||||
${sensor_base.lib_deps}
|
${sensor_base.lib_deps}
|
||||||
@@ -34,7 +35,7 @@ lib_deps =
|
|||||||
extends = GAT562_30S_Mesh_Kit
|
extends = GAT562_30S_Mesh_Kit
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_NAME='"GAT562 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -45,12 +46,14 @@ build_flags =
|
|||||||
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
|
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
|
|
||||||
|
|
||||||
[env:GAT562_30S_Mesh_Kit_room_server]
|
[env:GAT562_30S_Mesh_Kit_room_server]
|
||||||
extends = GAT562_30S_Mesh_Kit
|
extends = GAT562_30S_Mesh_Kit
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_30S_Mesh_Kit.build_flags}
|
${GAT562_30S_Mesh_Kit.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"GAT562 Room"'
|
-D ADVERT_NAME='"GAT562 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -62,6 +65,7 @@ build_flags =
|
|||||||
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
|
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
|
|
||||||
|
|
||||||
[env:GAT562_30S_Mesh_Kit_companion_radio_usb]
|
[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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_30S_Mesh_Kit.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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -79,7 +83,7 @@ build_flags =
|
|||||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||||
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
|
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${GAT562_30S_Mesh_Kit.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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_30S_Mesh_Kit.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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -106,7 +110,7 @@ build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
|
|||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${GAT562_30S_Mesh_Kit.lib_deps}
|
${GAT562_30S_Mesh_Kit.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ GAT56230SMeshKitBoard board;
|
|||||||
MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false);
|
MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false);
|
||||||
MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false);
|
MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false);
|
||||||
MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true);
|
MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,14 @@
|
|||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
|
#include <UITask.h>
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
extern MomentaryButton joystick_left;
|
extern MomentaryButton joystick_left;
|
||||||
extern MomentaryButton joystick_right;
|
extern MomentaryButton joystick_right;
|
||||||
extern MomentaryButton back_btn;
|
extern MomentaryButton back_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern GAT56230SMeshKitBoard board;
|
extern GAT56230SMeshKitBoard board;
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ GAT562EVBProBoard board;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, false, false);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, false, false);
|
||||||
|
|
||||||
MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true);
|
MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,13 @@
|
|||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
|
#include <UITask.h>
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
|
||||||
extern MomentaryButton back_btn;
|
extern MomentaryButton back_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern GAT562EVBProBoard board;
|
extern GAT562EVBProBoard board;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<helpers/sensors>
|
+<helpers/sensors>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52_base.lib_deps}
|
${nrf52_base.lib_deps}
|
||||||
${sensor_base.lib_deps}
|
${sensor_base.lib_deps}
|
||||||
@@ -30,6 +31,7 @@ lib_deps =
|
|||||||
extends = GAT562_Mesh_Tracker_Pro
|
extends = GAT562_Mesh_Tracker_Pro
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_Mesh_Tracker_Pro.build_flags}
|
${GAT562_Mesh_Tracker_Pro.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"GAT562 Repeater"'
|
-D ADVERT_NAME='"GAT562 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -41,12 +43,14 @@ build_flags =
|
|||||||
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
|
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
|
|
||||||
|
|
||||||
[env:GAT562_Mesh_Tracker_Pro_room_server]
|
[env:GAT562_Mesh_Tracker_Pro_room_server]
|
||||||
extends = GAT562_Mesh_Tracker_Pro
|
extends = GAT562_Mesh_Tracker_Pro
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_Mesh_Tracker_Pro.build_flags}
|
${GAT562_Mesh_Tracker_Pro.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"GAT562 Room"'
|
-D ADVERT_NAME='"GAT562 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -58,6 +62,7 @@ build_flags =
|
|||||||
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
|
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
|
|
||||||
|
|
||||||
[env:GAT562_Mesh_Tracker_Pro_companion_radio_usb]
|
[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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_Mesh_Tracker_Pro.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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -75,7 +80,7 @@ build_flags =
|
|||||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||||
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
|
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${GAT562_Mesh_Tracker_Pro.lib_deps}
|
${GAT562_Mesh_Tracker_Pro.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -88,7 +93,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_Mesh_Tracker_Pro.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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -101,7 +106,7 @@ build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
|
|||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${GAT562_Mesh_Tracker_Pro.lib_deps}
|
${GAT562_Mesh_Tracker_Pro.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ GAT562MeshTrackerProBoard board;
|
|||||||
MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false);
|
MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false);
|
||||||
MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false);
|
MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false);
|
||||||
MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true);
|
MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
|
#include <UITask.h>
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
|
extern UITask ui_task;
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
extern MomentaryButton joystick_left;
|
extern MomentaryButton joystick_left;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<helpers/sensors>
|
+<helpers/sensors>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52_base.lib_deps}
|
${nrf52_base.lib_deps}
|
||||||
${sensor_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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${GAT562_Mesh_Watch13.build_flags}
|
${GAT562_Mesh_Watch13.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -81,7 +82,7 @@ build_src_filter = ${GAT562_Mesh_Watch13.build_src_filter}
|
|||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<helpers/ui/GenericVibration.cpp>
|
+<helpers/ui/GenericVibration.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${GAT562_Mesh_Watch13.lib_deps}
|
${GAT562_Mesh_Watch13.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ GAT56MeshWatch13Board board;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, false, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, false, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
|
#include <UITask.h>
|
||||||
|
extern UITask ui_task;
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ build_flags =
|
|||||||
-D DISP_MOSI=6
|
-D DISP_MOSI=6
|
||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/heltec_e213>
|
+<../variants/heltec_e213>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip
|
https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip
|
||||||
@@ -45,7 +46,7 @@ lib_deps =
|
|||||||
extends = Heltec_E213_base
|
extends = Heltec_E213_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=E213Display
|
-D DISPLAY_CLASS=E213Display
|
||||||
@@ -57,7 +58,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter}
|
|||||||
+<helpers/ui/E213Display.cpp>
|
+<helpers/ui/E213Display.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E213_base.lib_deps}
|
${Heltec_E213_base.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -67,7 +68,7 @@ lib_deps =
|
|||||||
extends = Heltec_E213_base
|
extends = Heltec_E213_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=E213Display
|
-D DISPLAY_CLASS=E213Display
|
||||||
@@ -78,7 +79,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter}
|
|||||||
+<helpers/ui/E213Display.cpp>
|
+<helpers/ui/E213Display.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E213_base.lib_deps}
|
${Heltec_E213_base.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -88,6 +89,7 @@ lib_deps =
|
|||||||
extends = Heltec_E213_base
|
extends = Heltec_E213_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_E213_base.build_flags}
|
${Heltec_E213_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=E213Display
|
-D DISPLAY_CLASS=E213Display
|
||||||
-D ADVERT_NAME='"Heltec E213 Repeater"'
|
-D ADVERT_NAME='"Heltec E213 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -97,6 +99,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_E213_base.build_src_filter}
|
build_src_filter = ${Heltec_E213_base.build_src_filter}
|
||||||
+<helpers/ui/E213Display.cpp>
|
+<helpers/ui/E213Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E213_base.lib_deps}
|
${Heltec_E213_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -131,6 +134,7 @@ lib_deps =
|
|||||||
extends = Heltec_E213_base
|
extends = Heltec_E213_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_E213_base.build_flags}
|
${Heltec_E213_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=E213Display
|
-D DISPLAY_CLASS=E213Display
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -145,6 +149,7 @@ build_src_filter = ${Heltec_E213_base.build_src_filter}
|
|||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<helpers/ui/E213Display.cpp>
|
+<helpers/ui/E213Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E213_base.lib_deps}
|
${Heltec_E213_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -154,6 +159,7 @@ lib_deps =
|
|||||||
extends = Heltec_E213_base
|
extends = Heltec_E213_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_E213_base.build_flags}
|
${Heltec_E213_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=E213Display
|
-D DISPLAY_CLASS=E213Display
|
||||||
-D ADVERT_NAME='"Heltec E213 Room"'
|
-D ADVERT_NAME='"Heltec E213 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -163,6 +169,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_E213_base.build_src_filter}
|
build_src_filter = ${Heltec_E213_base.build_src_filter}
|
||||||
+<helpers/ui/E213Display.cpp>
|
+<helpers/ui/E213Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E213_base.lib_deps}
|
${Heltec_E213_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display(&board.periph_power);
|
DISPLAY_CLASS display(&board.periph_power);
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/E213Display.h>
|
#include <helpers/ui/E213Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecE213Board board;
|
extern HeltecE213Board board;
|
||||||
@@ -20,6 +21,7 @@ extern SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ build_flags =
|
|||||||
-D PIN_BOARD_SCL=38
|
-D PIN_BOARD_SCL=38
|
||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/heltec_e290>
|
+<../variants/heltec_e290>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip
|
https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip
|
||||||
@@ -39,7 +40,7 @@ lib_deps =
|
|||||||
extends = Heltec_E290_base
|
extends = Heltec_E290_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=E290Display
|
-D DISPLAY_CLASS=E290Display
|
||||||
@@ -51,7 +52,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter}
|
|||||||
+<helpers/ui/E290Display.cpp>
|
+<helpers/ui/E290Display.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E290_base.lib_deps}
|
${Heltec_E290_base.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -61,7 +62,7 @@ lib_deps =
|
|||||||
extends = Heltec_E290_base
|
extends = Heltec_E290_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=E290Display
|
-D DISPLAY_CLASS=E290Display
|
||||||
@@ -72,7 +73,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter}
|
|||||||
+<helpers/ui/E290Display.cpp>
|
+<helpers/ui/E290Display.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E290_base.lib_deps}
|
${Heltec_E290_base.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -82,6 +83,7 @@ lib_deps =
|
|||||||
extends = Heltec_E290_base
|
extends = Heltec_E290_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_E290_base.build_flags}
|
${Heltec_E290_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=E290Display
|
-D DISPLAY_CLASS=E290Display
|
||||||
-D ADVERT_NAME='"Heltec E290 Repeater"'
|
-D ADVERT_NAME='"Heltec E290 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -91,6 +93,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_E290_base.build_src_filter}
|
build_src_filter = ${Heltec_E290_base.build_src_filter}
|
||||||
+<helpers/ui/E290Display.cpp>
|
+<helpers/ui/E290Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E290_base.lib_deps}
|
${Heltec_E290_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -125,6 +128,7 @@ lib_deps =
|
|||||||
extends = Heltec_E290_base
|
extends = Heltec_E290_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_E290_base.build_flags}
|
${Heltec_E290_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=E290Display
|
-D DISPLAY_CLASS=E290Display
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -139,6 +143,7 @@ build_src_filter = ${Heltec_E290_base.build_src_filter}
|
|||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<helpers/ui/E290Display.cpp>
|
+<helpers/ui/E290Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E290_base.lib_deps}
|
${Heltec_E290_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -148,6 +153,7 @@ lib_deps =
|
|||||||
extends = Heltec_E290_base
|
extends = Heltec_E290_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_E290_base.build_flags}
|
${Heltec_E290_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=E290Display
|
-D DISPLAY_CLASS=E290Display
|
||||||
-D ADVERT_NAME='"Heltec E290 Room"'
|
-D ADVERT_NAME='"Heltec E290 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -157,6 +163,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_E290_base.build_src_filter}
|
build_src_filter = ${Heltec_E290_base.build_src_filter}
|
||||||
+<helpers/ui/E290Display.cpp>
|
+<helpers/ui/E290Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_E290_base.lib_deps}
|
${Heltec_E290_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display(&board.periph_power);
|
DISPLAY_CLASS display(&board.periph_power);
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/E290Display.h>
|
#include <helpers/ui/E290Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecE290Board board;
|
extern HeltecE290Board board;
|
||||||
@@ -20,6 +21,7 @@ extern SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ SolarExternalWatchdog external_watchdog;
|
|||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include <helpers/ExternalWatchdogManager.h>
|
#include <helpers/ExternalWatchdogManager.h>
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/ST7789Display.h>
|
#include <helpers/ui/ST7789Display.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class SolarSensorManager : public SensorManager {
|
class SolarSensorManager : public SensorManager {
|
||||||
@@ -47,6 +48,7 @@ extern SolarExternalWatchdog external_watchdog;
|
|||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_RC32.build_src_filter}
|
build_src_filter = ${Heltec_RC32.build_src_filter}
|
||||||
+<helpers/ui/NV3001BDisplay.cpp>
|
+<helpers/ui/NV3001BDisplay.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32.lib_deps}
|
${Heltec_RC32.lib_deps}
|
||||||
|
|
||||||
@@ -127,7 +128,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32
|
extends = Heltec_RC32
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -138,7 +139,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter}
|
|||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32.lib_deps}
|
${Heltec_RC32.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -148,7 +149,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32
|
extends = Heltec_RC32
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -162,7 +163,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter}
|
|||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32.lib_deps}
|
${Heltec_RC32.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -172,7 +173,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32
|
extends = Heltec_RC32
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 ENABLE_WIFI_INTERFACE
|
||||||
-D DISPLAY_CLASS=NullDisplayDriver
|
-D DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -188,7 +189,7 @@ build_src_filter = ${Heltec_RC32.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32.lib_deps}
|
${Heltec_RC32.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -214,6 +215,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32_with_display
|
extends = Heltec_RC32_with_display
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_NAME='"Heltec RC32 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -221,6 +223,7 @@ build_flags =
|
|||||||
-D MAX_NEIGHBOURS=50
|
-D MAX_NEIGHBOURS=50
|
||||||
build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32_with_display.lib_deps}
|
${Heltec_RC32_with_display.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -230,6 +233,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32_with_display
|
extends = Heltec_RC32_with_display
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_RC32_with_display.build_flags}
|
${Heltec_RC32_with_display.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -239,6 +243,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32_with_display.lib_deps}
|
${Heltec_RC32_with_display.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -247,6 +252,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32_with_display
|
extends = Heltec_RC32_with_display
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_NAME='"Heltec RC32 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -254,6 +260,7 @@ build_flags =
|
|||||||
-D ROOM_PASSWORD='"hello"'
|
-D ROOM_PASSWORD='"hello"'
|
||||||
build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32_with_display.lib_deps}
|
${Heltec_RC32_with_display.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -274,7 +281,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32_with_display
|
extends = Heltec_RC32_with_display
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 UI_HAS_ROTARY_INPUT
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -283,7 +290,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
|||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32_with_display.lib_deps}
|
${Heltec_RC32_with_display.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -293,7 +300,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32_with_display
|
extends = Heltec_RC32_with_display
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 UI_HAS_ROTARY_INPUT
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -305,7 +312,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
|||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32_with_display.lib_deps}
|
${Heltec_RC32_with_display.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -315,7 +322,7 @@ lib_deps =
|
|||||||
extends = Heltec_RC32_with_display
|
extends = Heltec_RC32_with_display
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 ENABLE_WIFI_INTERFACE
|
||||||
-D UI_HAS_ROTARY_INPUT
|
-D UI_HAS_ROTARY_INPUT
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -329,7 +336,7 @@ build_src_filter = ${Heltec_RC32_with_display.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32_with_display.lib_deps}
|
${Heltec_RC32_with_display.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -338,17 +345,17 @@ lib_deps =
|
|||||||
[env:heltec_rc32_sensor]
|
[env:heltec_rc32_sensor]
|
||||||
extends = Heltec_RC32_with_display
|
extends = Heltec_RC32_with_display
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_RC32_with_display.build_flags}
|
${Heltec_RC32.build_flags}
|
||||||
-D ADVERT_NAME='"Heltec RC32 Sensor"'
|
-D ADVERT_NAME='"Heltec RC32 Sensor"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
-D ADMIN_PASSWORD='"password"'
|
-D ADMIN_PASSWORD='"password"'
|
||||||
-D ENV_PIN_SDA=21
|
-D ENV_PIN_SDA=21
|
||||||
-D ENV_PIN_SCL=18
|
-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>
|
+<../examples/simple_sensor>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_RC32_with_display.lib_deps}
|
${Heltec_RC32.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
|
|
||||||
[env:heltec_rc32_kiss_modem]
|
[env:heltec_rc32_kiss_modem]
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|||||||
static HeltecRC32RotaryInput rotaryInputImpl(&board.periph_power);
|
static HeltecRC32RotaryInput rotaryInputImpl(&board.periph_power);
|
||||||
RotaryInput& rotary_input = rotaryInputImpl;
|
RotaryInput& rotary_input = rotaryInputImpl;
|
||||||
#endif
|
#endif
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#else
|
#else
|
||||||
#include <helpers/ui/NullDisplayDriver.h>
|
#include <helpers/ui/NullDisplayDriver.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecRC32Board board;
|
extern HeltecRC32Board board;
|
||||||
@@ -31,6 +32,7 @@ extern EnvironmentSensorManager sensors;
|
|||||||
#if defined(UI_HAS_ROTARY_INPUT)
|
#if defined(UI_HAS_ROTARY_INPUT)
|
||||||
extern RotaryInput& rotary_input;
|
extern RotaryInput& rotary_input;
|
||||||
#endif
|
#endif
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_rc52.build_flags}
|
${heltec_rc52.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-orig
|
||||||
-D DISPLAY_CLASS=NullDisplayDriver
|
-D DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -76,7 +76,7 @@ build_src_filter = ${heltec_rc52.build_src_filter}
|
|||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-orig>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_rc52.lib_deps}
|
${heltec_rc52.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -87,7 +87,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_rc52.build_flags}
|
${heltec_rc52.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-orig
|
||||||
-D DISPLAY_CLASS=NullDisplayDriver
|
-D DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -95,7 +95,7 @@ build_src_filter = ${heltec_rc52.build_src_filter}
|
|||||||
+<helpers/nrf52/*.cpp>
|
+<helpers/nrf52/*.cpp>
|
||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-orig>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_rc52.lib_deps}
|
${heltec_rc52.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -113,6 +113,7 @@ build_flags =
|
|||||||
build_src_filter = ${heltec_rc52.build_src_filter}
|
build_src_filter = ${heltec_rc52.build_src_filter}
|
||||||
+<helpers/ui/NV3001BDisplay.cpp>
|
+<helpers/ui/NV3001BDisplay.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_rc52.lib_deps}
|
${heltec_rc52.lib_deps}
|
||||||
|
|
||||||
@@ -120,8 +121,10 @@ lib_deps =
|
|||||||
extends = heltec_rc52_with_display
|
extends = heltec_rc52_with_display
|
||||||
build_src_filter = ${heltec_rc52_with_display.build_src_filter}
|
build_src_filter = ${heltec_rc52_with_display.build_src_filter}
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_rc52_with_display.build_flags}
|
${heltec_rc52_with_display.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec RC52 Repeater"'
|
-D ADVERT_NAME='"Heltec RC52 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -132,8 +135,10 @@ build_flags =
|
|||||||
extends = heltec_rc52_with_display
|
extends = heltec_rc52_with_display
|
||||||
build_src_filter = ${heltec_rc52_with_display.build_src_filter}
|
build_src_filter = ${heltec_rc52_with_display.build_src_filter}
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_rc52_with_display.build_flags}
|
${heltec_rc52_with_display.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec RC52 Room"'
|
-D ADVERT_NAME='"Heltec RC52 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_rc52_with_display.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 PIN_BUZZER=5
|
||||||
-D UI_HAS_ROTARY_INPUT
|
-D UI_HAS_ROTARY_INPUT
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -158,7 +163,7 @@ build_src_filter = ${heltec_rc52_with_display.build_src_filter}
|
|||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_rc52_with_display.lib_deps}
|
${heltec_rc52_with_display.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -170,7 +175,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_rc52_with_display.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 PIN_BUZZER=5
|
||||||
-D UI_HAS_ROTARY_INPUT
|
-D UI_HAS_ROTARY_INPUT
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -180,7 +185,7 @@ build_src_filter = ${heltec_rc52_with_display.build_src_filter}
|
|||||||
+<helpers/nrf52/*.cpp>
|
+<helpers/nrf52/*.cpp>
|
||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_rc52_with_display.lib_deps}
|
${heltec_rc52_with_display.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
|||||||
static HeltecRC52RotaryInput rotaryInputImpl(&board.periph_power);
|
static HeltecRC52RotaryInput rotaryInputImpl(&board.periph_power);
|
||||||
RotaryInput& rotary_input = rotaryInputImpl;
|
RotaryInput& rotary_input = rotaryInputImpl;
|
||||||
#endif
|
#endif
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init()
|
bool radio_init()
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#else
|
#else
|
||||||
#include <helpers/ui/NullDisplayDriver.h>
|
#include <helpers/ui/NullDisplayDriver.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecRC52Board board;
|
extern HeltecRC52Board board;
|
||||||
@@ -32,6 +33,7 @@ extern MomentaryButton user_btn;
|
|||||||
#if defined(UI_HAS_ROTARY_INPUT)
|
#if defined(UI_HAS_ROTARY_INPUT)
|
||||||
extern RotaryInput& rotary_input;
|
extern RotaryInput& rotary_input;
|
||||||
#endif
|
#endif
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
|
|||||||
+<../variants/heltec_t096>
|
+<../variants/heltec_t096>
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52_base.lib_deps}
|
${nrf52_base.lib_deps}
|
||||||
${sensor_base.lib_deps}
|
${sensor_base.lib_deps}
|
||||||
@@ -58,9 +59,10 @@ upload_protocol = nrfutil
|
|||||||
extends = Heltec_t096
|
extends = Heltec_t096
|
||||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t096.build_flags}
|
${Heltec_t096.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec_t096 Repeater"'
|
-D ADVERT_NAME='"Heltec_t096 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -73,6 +75,7 @@ build_flags =
|
|||||||
extends = Heltec_t096
|
extends = Heltec_t096
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t096.build_flags}
|
${Heltec_t096.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"RS232 Bridge"'
|
-D ADVERT_NAME='"RS232 Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -87,13 +90,16 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||||
+<helpers/bridges/RS232Bridge.cpp>
|
+<helpers/bridges/RS232Bridge.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
|
|
||||||
[env:Heltec_t096_room_server]
|
[env:Heltec_t096_room_server]
|
||||||
extends = Heltec_t096
|
extends = Heltec_t096
|
||||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t096.build_flags}
|
${Heltec_t096.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec_t096 Room"'
|
-D ADVERT_NAME='"Heltec_t096 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t096.build_flags}
|
${Heltec_t096.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D BLE_PIN_CODE=123456
|
-D BLE_PIN_CODE=123456
|
||||||
@@ -137,7 +143,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t096.lib_deps}
|
${Heltec_t096.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -148,7 +154,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t096.build_flags}
|
${Heltec_t096.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D ENABLE_USB_INTERFACE
|
-D ENABLE_USB_INTERFACE
|
||||||
@@ -159,12 +165,15 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||||
+<helpers/nrf52/*.cpp>
|
+<helpers/nrf52/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t096.lib_deps}
|
${Heltec_t096.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|
||||||
[env:Heltec_t096_kiss_modem]
|
[env:Heltec_t096_kiss_modem]
|
||||||
extends = Heltec_t096
|
extends = Heltec_t096
|
||||||
|
build_flags =
|
||||||
|
${Heltec_t096.build_flags}
|
||||||
|
-U DISPLAY_CLASS
|
||||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||||
+<../examples/kiss_modem/>
|
+<../examples/kiss_modem/>
|
||||||
@@ -33,6 +33,7 @@ EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display(&board.periph_power);
|
DISPLAY_CLASS display(&board.periph_power);
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
#include <helpers/ui/ST7735Display.h>
|
#include <helpers/ui/ST7735Display.h>
|
||||||
|
#include <UITask.h>
|
||||||
#else
|
#else
|
||||||
#include "helpers/ui/NullDisplayDriver.h"
|
#include "helpers/ui/NullDisplayDriver.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -24,6 +25,7 @@ extern EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ build_src_filter = ${nrf52_base.build_src_filter}
|
|||||||
+<../variants/heltec_t1>
|
+<../variants/heltec_t1>
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52_base.lib_deps}
|
${nrf52_base.lib_deps}
|
||||||
${sensor_base.lib_deps}
|
${sensor_base.lib_deps}
|
||||||
@@ -31,9 +32,10 @@ upload_protocol = nrfutil
|
|||||||
extends = Heltec_t1
|
extends = Heltec_t1
|
||||||
build_src_filter = ${Heltec_t1.build_src_filter}
|
build_src_filter = ${Heltec_t1.build_src_filter}
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t1.build_flags}
|
${Heltec_t1.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec_t1 Repeater"'
|
-D ADVERT_NAME='"Heltec_t1 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -46,8 +48,10 @@ build_flags =
|
|||||||
extends = Heltec_t1
|
extends = Heltec_t1
|
||||||
build_src_filter = ${Heltec_t1.build_src_filter}
|
build_src_filter = ${Heltec_t1.build_src_filter}
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t1.build_flags}
|
${Heltec_t1.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec_t1 Room"'
|
-D ADVERT_NAME='"Heltec_t1 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t1.build_flags}
|
${Heltec_t1.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D BLE_PIN_CODE=123456
|
-D BLE_PIN_CODE=123456
|
||||||
@@ -75,7 +79,7 @@ build_src_filter = ${Heltec_t1.build_src_filter}
|
|||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t1.lib_deps}
|
${Heltec_t1.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -87,7 +91,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t1.build_flags}
|
${Heltec_t1.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D ENABLE_USB_INTERFACE
|
-D ENABLE_USB_INTERFACE
|
||||||
@@ -97,7 +101,7 @@ build_src_filter = ${Heltec_t1.build_src_filter}
|
|||||||
+<helpers/nrf52/*.cpp>
|
+<helpers/nrf52/*.cpp>
|
||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t1.lib_deps}
|
${Heltec_t1.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -105,5 +109,8 @@ lib_deps =
|
|||||||
|
|
||||||
[env:Heltec_t1_kiss_modem]
|
[env:Heltec_t1_kiss_modem]
|
||||||
extends = Heltec_t1
|
extends = Heltec_t1
|
||||||
|
build_flags =
|
||||||
|
${Heltec_t1.build_flags}
|
||||||
|
-U DISPLAY_CLASS
|
||||||
build_src_filter = ${Heltec_t1.build_src_filter}
|
build_src_filter = ${Heltec_t1.build_src_filter}
|
||||||
+<../examples/kiss_modem/>
|
+<../examples/kiss_modem/>
|
||||||
@@ -32,6 +32,7 @@ EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display(&board.periph_power);
|
DISPLAY_CLASS display(&board.periph_power);
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
#include <helpers/ui/ST7735Display.h>
|
#include <helpers/ui/ST7735Display.h>
|
||||||
|
#include <UITask.h>
|
||||||
#else
|
#else
|
||||||
#include "helpers/ui/NullDisplayDriver.h"
|
#include "helpers/ui/NullDisplayDriver.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -24,6 +25,7 @@ extern EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t114.build_flags}
|
${Heltec_t114.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_CLASS=NullDisplayDriver
|
-D DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -111,7 +111,7 @@ build_src_filter = ${Heltec_t114.build_src_filter}
|
|||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t114.lib_deps}
|
${Heltec_t114.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -122,7 +122,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t114.build_flags}
|
${Heltec_t114.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_CLASS=NullDisplayDriver
|
-D DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -131,7 +131,7 @@ build_src_filter = ${Heltec_t114.build_src_filter}
|
|||||||
+<helpers/nrf52/*.cpp>
|
+<helpers/nrf52/*.cpp>
|
||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t114.lib_deps}
|
${Heltec_t114.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -152,6 +152,7 @@ build_src_filter = ${Heltec_t114.build_src_filter}
|
|||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<helpers/ui/OLEDDisplay.cpp>
|
+<helpers/ui/OLEDDisplay.cpp>
|
||||||
+<helpers/ui/OLEDDisplayFonts.cpp>
|
+<helpers/ui/OLEDDisplayFonts.cpp>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t114.lib_deps}
|
${Heltec_t114.lib_deps}
|
||||||
adafruit/Adafruit SSD1306 @ ^2.5.13
|
adafruit/Adafruit SSD1306 @ ^2.5.13
|
||||||
@@ -162,9 +163,10 @@ upload_protocol = nrfutil
|
|||||||
extends = Heltec_t114_with_display
|
extends = Heltec_t114_with_display
|
||||||
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t114_with_display.build_flags}
|
${Heltec_t114_with_display.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec_T114 Repeater"'
|
-D ADVERT_NAME='"Heltec_T114 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -177,6 +179,7 @@ build_flags =
|
|||||||
extends = Heltec_t114
|
extends = Heltec_t114
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t114.build_flags}
|
${Heltec_t114.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"RS232 Bridge"'
|
-D ADVERT_NAME='"RS232 Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -191,13 +194,16 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
||||||
+<helpers/bridges/RS232Bridge.cpp>
|
+<helpers/bridges/RS232Bridge.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
|
|
||||||
[env:Heltec_t114_room_server]
|
[env:Heltec_t114_room_server]
|
||||||
extends = Heltec_t114_with_display
|
extends = Heltec_t114_with_display
|
||||||
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t114_with_display.build_flags}
|
${Heltec_t114_with_display.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec_T114 Room"'
|
-D ADVERT_NAME='"Heltec_T114 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=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
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t114_with_display.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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D BLE_PIN_CODE=123456
|
-D BLE_PIN_CODE=123456
|
||||||
@@ -224,7 +230,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t114_with_display.lib_deps}
|
${Heltec_t114_with_display.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -235,7 +241,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_t114_with_display.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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D ENABLE_USB_INTERFACE
|
-D ENABLE_USB_INTERFACE
|
||||||
@@ -246,12 +252,15 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
|
||||||
+<helpers/nrf52/*.cpp>
|
+<helpers/nrf52/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_t114_with_display.lib_deps}
|
${Heltec_t114_with_display.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|
||||||
[env:Heltec_t114_kiss_modem]
|
[env:Heltec_t114_kiss_modem]
|
||||||
extends = Heltec_t114
|
extends = Heltec_t114
|
||||||
|
build_flags =
|
||||||
|
${Heltec_t114.build_flags}
|
||||||
|
-U DISPLAY_CLASS
|
||||||
build_src_filter = ${Heltec_t114.build_src_filter}
|
build_src_filter = ${Heltec_t114.build_src_filter}
|
||||||
+<../examples/kiss_modem/>
|
+<../examples/kiss_modem/>
|
||||||
@@ -32,6 +32,7 @@ EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#else
|
#else
|
||||||
#include "helpers/ui/NullDisplayDriver.h"
|
#include "helpers/ui/NullDisplayDriver.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern T114Board board;
|
extern T114Board board;
|
||||||
@@ -26,6 +27,7 @@ extern EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ build_src_filter = ${esp32_base.build_src_filter}
|
|||||||
+<helpers/ui/ST7789Display.cpp>
|
+<helpers/ui/ST7789Display.cpp>
|
||||||
+<helpers/ui/OLEDDisplay.cpp>
|
+<helpers/ui/OLEDDisplay.cpp>
|
||||||
+<helpers/ui/OLEDDisplayFonts.cpp>
|
+<helpers/ui/OLEDDisplayFonts.cpp>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
adafruit/Adafruit GFX Library @ ^1.12.1
|
adafruit/Adafruit GFX Library @ ^1.12.1
|
||||||
@@ -52,7 +53,7 @@ lib_deps =
|
|||||||
extends = Heltec_T190_base
|
extends = Heltec_T190_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D BLE_PIN_CODE=123456 ; dynamic, random PIN
|
-D BLE_PIN_CODE=123456 ; dynamic, random PIN
|
||||||
@@ -61,7 +62,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_T190_base.lib_deps}
|
${Heltec_T190_base.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -70,7 +71,7 @@ lib_deps =
|
|||||||
extends = Heltec_T190_base
|
extends = Heltec_T190_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D OFFLINE_QUEUE_SIZE=256
|
-D OFFLINE_QUEUE_SIZE=256
|
||||||
@@ -78,7 +79,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_T190_base.lib_deps}
|
${Heltec_T190_base.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -87,6 +88,7 @@ lib_deps =
|
|||||||
extends = Heltec_T190_base
|
extends = Heltec_T190_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_T190_base.build_flags}
|
${Heltec_T190_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec T190 Repeater"'
|
-D ADVERT_NAME='"Heltec T190 Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -94,6 +96,7 @@ build_flags =
|
|||||||
-D MAX_NEIGHBOURS=50
|
-D MAX_NEIGHBOURS=50
|
||||||
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_T190_base.lib_deps}
|
${Heltec_T190_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -124,6 +127,7 @@ lib_deps =
|
|||||||
extends = Heltec_T190_base
|
extends = Heltec_T190_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_T190_base.build_flags}
|
${Heltec_T190_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -136,6 +140,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_T190_base.lib_deps}
|
${Heltec_T190_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -144,6 +149,7 @@ lib_deps =
|
|||||||
extends = Heltec_T190_base
|
extends = Heltec_T190_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_T190_base.build_flags}
|
${Heltec_T190_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec T190 Room"'
|
-D ADVERT_NAME='"Heltec T190 Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -151,11 +157,15 @@ build_flags =
|
|||||||
-D ROOM_PASSWORD='"hello"'
|
-D ROOM_PASSWORD='"hello"'
|
||||||
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_T190_base.lib_deps}
|
${Heltec_T190_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
|
|
||||||
[env:Heltec_T190_kiss_modem]
|
[env:Heltec_T190_kiss_modem]
|
||||||
extends = Heltec_T190_base
|
extends = Heltec_T190_base
|
||||||
|
build_flags =
|
||||||
|
${Heltec_T190_base.build_flags}
|
||||||
|
-U DISPLAY_CLASS
|
||||||
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
build_src_filter = ${Heltec_T190_base.build_src_filter}
|
||||||
+<../examples/kiss_modem/>
|
+<../examples/kiss_modem/>
|
||||||
@@ -20,6 +20,7 @@ SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/ST7789Display.h>
|
#include <helpers/ui/ST7789Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecT190Board board;
|
extern HeltecT190Board board;
|
||||||
@@ -20,6 +21,7 @@ extern SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tower_v2.build_flags}
|
${Heltec_tower_v2.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_CLASS=NullDisplayDriver
|
-D DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -72,7 +72,7 @@ build_src_filter = ${Heltec_tower_v2.build_src_filter}
|
|||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tower_v2.lib_deps}
|
${Heltec_tower_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -83,7 +83,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|||||||
board_upload.maximum_size = 712704
|
board_upload.maximum_size = 712704
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tower_v2.build_flags}
|
${Heltec_tower_v2.build_flags}
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_CLASS=NullDisplayDriver
|
-D DISPLAY_CLASS=NullDisplayDriver
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -96,7 +96,7 @@ build_src_filter = ${Heltec_tower_v2.build_src_filter}
|
|||||||
+<helpers/ui/NullDisplayDriver.cpp>
|
+<helpers/ui/NullDisplayDriver.cpp>
|
||||||
+<helpers/nrf52/*.cpp>
|
+<helpers/nrf52/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tower_v2.lib_deps}
|
${Heltec_tower_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ TowerV2ExternalWatchdog external_watchdog;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
#include "helpers/ui/NullDisplayDriver.h"
|
#include "helpers/ui/NullDisplayDriver.h"
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class TowerV2ExternalWatchdog : public ExternalWatchdogManager {
|
class TowerV2ExternalWatchdog : public ExternalWatchdogManager {
|
||||||
@@ -33,6 +34,7 @@ extern TowerV2ExternalWatchdog external_watchdog;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ build_flags =
|
|||||||
-D SX126X_RX_BOOSTED_GAIN=1
|
-D SX126X_RX_BOOSTED_GAIN=1
|
||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/heltec_tracker>
|
+<../variants/heltec_tracker>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
stevemarple/MicroNMEA @ ^2.0.6
|
stevemarple/MicroNMEA @ ^2.0.6
|
||||||
@@ -54,7 +55,7 @@ extends = Heltec_tracker_base
|
|||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_base.build_flags}
|
${Heltec_tracker_base.build_flags}
|
||||||
-I src/helpers/ui
|
-I src/helpers/ui
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_ROTATION=1
|
-D DISPLAY_ROTATION=1
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -69,7 +70,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_base.lib_deps}
|
${Heltec_tracker_base.lib_deps}
|
||||||
@@ -80,7 +81,7 @@ extends = Heltec_tracker_base
|
|||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_base.build_flags}
|
${Heltec_tracker_base.build_flags}
|
||||||
-I src/helpers/ui
|
-I src/helpers/ui
|
||||||
-I examples/companion_radio/ui-new
|
-I src/helpers/ui/companion-new
|
||||||
-D DISPLAY_ROTATION=1
|
-D DISPLAY_ROTATION=1
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -94,7 +95,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_base.lib_deps}
|
${Heltec_tracker_base.lib_deps}
|
||||||
@@ -104,6 +105,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_base
|
extends = Heltec_tracker_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_base.build_flags}
|
${Heltec_tracker_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_ROTATION=1
|
-D DISPLAY_ROTATION=1
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D ADVERT_NAME='"Heltec Repeater"'
|
-D ADVERT_NAME='"Heltec Repeater"'
|
||||||
@@ -116,6 +118,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_base.lib_deps}
|
${Heltec_tracker_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -149,6 +152,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_base
|
extends = Heltec_tracker_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_base.build_flags}
|
${Heltec_tracker_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_ROTATION=1
|
-D DISPLAY_ROTATION=1
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
@@ -164,6 +168,7 @@ build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
|||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_base.lib_deps}
|
${Heltec_tracker_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -172,6 +177,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_base
|
extends = Heltec_tracker_base
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_base.build_flags}
|
${Heltec_tracker_base.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_ROTATION=1
|
-D DISPLAY_ROTATION=1
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D ADVERT_NAME='"Heltec Room"'
|
-D ADVERT_NAME='"Heltec Room"'
|
||||||
@@ -184,6 +190,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_base.lib_deps}
|
${Heltec_tracker_base.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ HWTSensorManager sensors = HWTSensorManager(nmea);
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display(&board.periph_power); // peripheral power pin is shared
|
DISPLAY_CLASS display(&board.periph_power); // peripheral power pin is shared
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/ST7735Display.h>
|
#include <helpers/ui/ST7735Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class HWTSensorManager : public SensorManager {
|
class HWTSensorManager : public SensorManager {
|
||||||
@@ -38,6 +39,7 @@ extern HWTSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ build_flags =
|
|||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/heltec_tracker_v2>
|
+<../variants/heltec_tracker_v2>
|
||||||
+<helpers/sensors>
|
+<helpers/sensors>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
${sensor_base.lib_deps}
|
${sensor_base.lib_deps}
|
||||||
@@ -61,6 +62,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_v2
|
extends = Heltec_tracker_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_v2.build_flags}
|
${Heltec_tracker_v2.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D ADVERT_NAME='"Heltec Repeater"'
|
-D ADVERT_NAME='"Heltec Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -72,6 +74,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_v2.lib_deps}
|
${Heltec_tracker_v2.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -81,6 +84,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_v2
|
extends = Heltec_tracker_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_v2.build_flags}
|
${Heltec_tracker_v2.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -95,6 +99,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
|||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_v2.lib_deps}
|
${Heltec_tracker_v2.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -103,6 +108,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_v2
|
extends = Heltec_tracker_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_tracker_v2.build_flags}
|
${Heltec_tracker_v2.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
-D ADVERT_NAME='"Heltec Room"'
|
-D ADVERT_NAME='"Heltec Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -114,6 +120,7 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_v2.lib_deps}
|
${Heltec_tracker_v2.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -136,7 +143,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_v2
|
extends = Heltec_tracker_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
@@ -147,7 +154,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
|||||||
+<helpers/ui/ST7735Display.cpp>
|
+<helpers/ui/ST7735Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_v2.lib_deps}
|
${Heltec_tracker_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -156,7 +163,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_v2
|
extends = Heltec_tracker_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
-D DISPLAY_CLASS=ST7735Display
|
||||||
@@ -172,7 +179,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
|||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_v2.lib_deps}
|
${Heltec_tracker_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -181,7 +188,7 @@ lib_deps =
|
|||||||
extends = Heltec_tracker_v2
|
extends = Heltec_tracker_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 ENABLE_WIFI_INTERFACE
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -198,7 +205,7 @@ build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_tracker_v2.lib_deps}
|
${Heltec_tracker_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -211,7 +218,7 @@ build_flags =
|
|||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
-D ADMIN_PASSWORD='"password"'
|
-D ADMIN_PASSWORD='"password"'
|
||||||
-D DISPLAY_CLASS=ST7735Display
|
; -D DISPLAY_CLASS=ST7735Display
|
||||||
; -D MESH_PACKET_LOGGING=1
|
; -D MESH_PACKET_LOGGING=1
|
||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display(&board.periph_power); // peripheral power pin is shared
|
DISPLAY_CLASS display(&board.periph_power); // peripheral power pin is shared
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/ST7735Display.h>
|
#include <helpers/ui/ST7735Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecTrackerV2Board board;
|
extern HeltecTrackerV2Board board;
|
||||||
@@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ build_flags =
|
|||||||
-D PIN_OLED_RESET=16
|
-D PIN_OLED_RESET=16
|
||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/heltec_v2>
|
+<../variants/heltec_v2>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
adafruit/Adafruit SSD1306 @ ^2.5.13
|
adafruit/Adafruit SSD1306 @ ^2.5.13
|
||||||
@@ -31,6 +32,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v2
|
extends = Heltec_lora32_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_lora32_v2.build_flags}
|
${Heltec_lora32_v2.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"Heltec Repeater"'
|
-D ADVERT_NAME='"Heltec Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -43,6 +45,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
|
|||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v2.lib_deps}
|
${Heltec_lora32_v2.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -76,6 +79,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v2
|
extends = Heltec_lora32_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_lora32_v2.build_flags}
|
${Heltec_lora32_v2.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -91,6 +95,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v2.lib_deps}
|
${Heltec_lora32_v2.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -99,6 +104,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v2
|
extends = Heltec_lora32_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_lora32_v2.build_flags}
|
${Heltec_lora32_v2.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"Heltec Room"'
|
-D ADVERT_NAME='"Heltec Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -111,6 +117,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v2.lib_deps}
|
${Heltec_lora32_v2.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -133,7 +140,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v2
|
extends = Heltec_lora32_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=160
|
-D MAX_CONTACTS=160
|
||||||
-D MAX_GROUP_CHANNELS=8
|
-D MAX_GROUP_CHANNELS=8
|
||||||
@@ -145,7 +152,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v2.lib_deps}
|
${Heltec_lora32_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -154,7 +161,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v2
|
extends = Heltec_lora32_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=160
|
-D MAX_CONTACTS=160
|
||||||
-D MAX_GROUP_CHANNELS=8
|
-D MAX_GROUP_CHANNELS=8
|
||||||
@@ -168,7 +175,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v2.lib_deps}
|
${Heltec_lora32_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -177,7 +184,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v2
|
extends = Heltec_lora32_v2
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 ENABLE_WIFI_INTERFACE
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D MAX_CONTACTS=160
|
-D MAX_CONTACTS=160
|
||||||
@@ -194,7 +201,7 @@ build_src_filter = ${Heltec_lora32_v2.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v2.lib_deps}
|
${Heltec_lora32_v2.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecV2Board board;
|
extern HeltecV2Board board;
|
||||||
@@ -20,6 +21,7 @@ extern SensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ build_flags =
|
|||||||
-D PIN_GPS_TX=48
|
-D PIN_GPS_TX=48
|
||||||
-D PIN_GPS_EN=26
|
-D PIN_GPS_EN=26
|
||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/heltec_v3>
|
+<../variants/heltec_v3/*.cpp>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
+<helpers/sensors>
|
+<helpers/sensors>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
@@ -41,6 +42,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v3
|
extends = Heltec_lora32_v3
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_lora32_v3.build_flags}
|
${Heltec_lora32_v3.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"Heltec Repeater"'
|
-D ADVERT_NAME='"Heltec Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -51,7 +53,9 @@ build_flags =
|
|||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
|
+<helpers/ui/server>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<../variants/heltec_v3/ui-other/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -61,6 +65,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v3
|
extends = Heltec_lora32_v3
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_lora32_v3.build_flags}
|
${Heltec_lora32_v3.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"RS232 Bridge"'
|
-D ADVERT_NAME='"RS232 Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -76,7 +81,9 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/bridges/RS232Bridge.cpp>
|
+<helpers/bridges/RS232Bridge.cpp>
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
|
+<helpers/ui/server>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<../variants/heltec_v3/ui-other/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -98,7 +105,9 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
|
+<helpers/ui/server>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<../variants/heltec_v3/ui-other/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -107,6 +116,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v3
|
extends = Heltec_lora32_v3
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_lora32_v3.build_flags}
|
${Heltec_lora32_v3.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"Heltec Room"'
|
-D ADVERT_NAME='"Heltec Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -117,7 +127,9 @@ build_flags =
|
|||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
|
+<helpers/ui/server>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<../variants/heltec_v3/ui-other/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -140,7 +152,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v3
|
extends = Heltec_lora32_v3
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
@@ -150,8 +162,9 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/companion-new>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<../variants/heltec_v3/ui-companion/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -160,7 +173,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v3
|
extends = Heltec_lora32_v3
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
@@ -174,10 +187,11 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/companion-new>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<../variants/heltec_v3/ui-companion/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -186,7 +200,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v3
|
extends = Heltec_lora32_v3
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 ENABLE_WIFI_INTERFACE
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -200,10 +214,11 @@ build_flags =
|
|||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/companion-new>
|
||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<../variants/heltec_v3/ui-companion/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -212,6 +227,7 @@ lib_deps =
|
|||||||
extends = Heltec_lora32_v3
|
extends = Heltec_lora32_v3
|
||||||
build_flags =
|
build_flags =
|
||||||
${Heltec_lora32_v3.build_flags}
|
${Heltec_lora32_v3.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D ADVERT_NAME='"Heltec v3 Sensor"'
|
-D ADVERT_NAME='"Heltec v3 Sensor"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
-D ADVERT_LON=0.0
|
-D ADVERT_LON=0.0
|
||||||
@@ -223,7 +239,9 @@ build_flags =
|
|||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
|
+<helpers/ui/server>
|
||||||
+<../examples/simple_sensor>
|
+<../examples/simple_sensor>
|
||||||
|
+<../variants/heltec_v3/ui-other/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${Heltec_lora32_v3.lib_deps}
|
${Heltec_lora32_v3.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
|
|||||||
@@ -24,11 +24,6 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|||||||
EnvironmentSensorManager sensors;
|
EnvironmentSensorManager sensors;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
|
||||||
DISPLAY_CLASS display;
|
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
fallback_clock.begin();
|
fallback_clock.begin();
|
||||||
rtc_clock.begin(Wire);
|
rtc_clock.begin(Wire);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h> // needs -I(nclude) path setting
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecV3Board board;
|
extern HeltecV3Board board;
|
||||||
@@ -21,6 +22,7 @@ extern EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
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
|
||||||
@@ -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
|
||||||
@@ -45,6 +45,7 @@ build_flags =
|
|||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/heltec_v4>
|
+<../variants/heltec_v4>
|
||||||
+<helpers/sensors>
|
+<helpers/sensors>
|
||||||
|
+<helpers/ui/BaseUITask.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
${sensor_base.lib_deps}
|
${sensor_base.lib_deps}
|
||||||
@@ -86,6 +87,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_oled
|
extends = heltec_v4_oled
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_v4_oled.build_flags}
|
${heltec_v4_oled.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"Heltec Repeater"'
|
-D ADVERT_NAME='"Heltec Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -97,6 +99,7 @@ build_flags =
|
|||||||
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_oled.lib_deps}
|
${heltec_v4_oled.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -106,6 +109,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_oled
|
extends = heltec_v4_oled
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_v4_oled.build_flags}
|
${heltec_v4_oled.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"Heltec Repeater"'
|
-D ADVERT_NAME='"Heltec Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -119,6 +123,7 @@ build_flags =
|
|||||||
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_oled.lib_deps}
|
${heltec_v4_oled.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -128,6 +133,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_oled
|
extends = heltec_v4_oled
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_v4_oled.build_flags}
|
${heltec_v4_oled.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -142,6 +148,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter}
|
|||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_oled.lib_deps}
|
${heltec_v4_oled.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -150,6 +157,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_oled
|
extends = heltec_v4_oled
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_v4_oled.build_flags}
|
${heltec_v4_oled.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
-D ADVERT_NAME='"Heltec Room"'
|
-D ADVERT_NAME='"Heltec Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -161,6 +169,7 @@ build_flags =
|
|||||||
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_oled.lib_deps}
|
${heltec_v4_oled.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -183,7 +192,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_oled
|
extends = heltec_v4_oled
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
@@ -194,7 +203,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter}
|
|||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_oled.lib_deps}
|
${heltec_v4_oled.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -203,7 +212,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_oled
|
extends = heltec_v4_oled
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
@@ -221,7 +230,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_oled.lib_deps}
|
${heltec_v4_oled.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -230,7 +239,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_oled
|
extends = heltec_v4_oled
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_WIFI_INTERFACE
|
||||||
-D ENABLE_ESP_MDNS
|
-D ENABLE_ESP_MDNS
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
@@ -248,7 +257,7 @@ build_src_filter = ${heltec_v4_oled.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_oled.lib_deps}
|
${heltec_v4_oled.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -263,7 +272,7 @@ build_flags =
|
|||||||
-D ADMIN_PASSWORD='"password"'
|
-D ADMIN_PASSWORD='"password"'
|
||||||
-D ENV_PIN_SDA=3
|
-D ENV_PIN_SDA=3
|
||||||
-D ENV_PIN_SCL=4
|
-D ENV_PIN_SCL=4
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
;-D DISPLAY_CLASS=SSD1306Display
|
||||||
; -D MESH_PACKET_LOGGING=1
|
; -D MESH_PACKET_LOGGING=1
|
||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
||||||
@@ -278,6 +287,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_tft
|
extends = heltec_v4_tft
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_v4_tft.build_flags}
|
${heltec_v4_tft.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=ST7789LCDDisplay
|
-D DISPLAY_CLASS=ST7789LCDDisplay
|
||||||
-D ADVERT_NAME='"Heltec Repeater"'
|
-D ADVERT_NAME='"Heltec Repeater"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -289,6 +299,7 @@ build_flags =
|
|||||||
build_src_filter = ${heltec_v4_tft.build_src_filter}
|
build_src_filter = ${heltec_v4_tft.build_src_filter}
|
||||||
+<helpers/ui/ST7789LCDDisplay.cpp>
|
+<helpers/ui/ST7789LCDDisplay.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_tft.lib_deps}
|
${heltec_v4_tft.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -299,6 +310,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_tft
|
extends = heltec_v4_tft
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_v4_tft.build_flags}
|
${heltec_v4_tft.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=ST7789LCDDisplay
|
-D DISPLAY_CLASS=ST7789LCDDisplay
|
||||||
-D ADVERT_NAME='"ESPNow Bridge"'
|
-D ADVERT_NAME='"ESPNow Bridge"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -313,6 +325,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter}
|
|||||||
+<helpers/bridges/ESPNowBridge.cpp>
|
+<helpers/bridges/ESPNowBridge.cpp>
|
||||||
+<helpers/ui/ST7789LCDDisplay.cpp>
|
+<helpers/ui/ST7789LCDDisplay.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_tft.lib_deps}
|
${heltec_v4_tft.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -321,6 +334,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_tft
|
extends = heltec_v4_tft
|
||||||
build_flags =
|
build_flags =
|
||||||
${heltec_v4_tft.build_flags}
|
${heltec_v4_tft.build_flags}
|
||||||
|
-I src/helpers/ui/server
|
||||||
-D DISPLAY_CLASS=ST7789LCDDisplay
|
-D DISPLAY_CLASS=ST7789LCDDisplay
|
||||||
-D ADVERT_NAME='"Heltec Room"'
|
-D ADVERT_NAME='"Heltec Room"'
|
||||||
-D ADVERT_LAT=0.0
|
-D ADVERT_LAT=0.0
|
||||||
@@ -332,6 +346,7 @@ build_flags =
|
|||||||
build_src_filter = ${heltec_v4_tft.build_src_filter}
|
build_src_filter = ${heltec_v4_tft.build_src_filter}
|
||||||
+<helpers/ui/ST7789LCDDisplay.cpp>
|
+<helpers/ui/ST7789LCDDisplay.cpp>
|
||||||
+<../examples/simple_room_server>
|
+<../examples/simple_room_server>
|
||||||
|
+<helpers/ui/server>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_tft.lib_deps}
|
${heltec_v4_tft.lib_deps}
|
||||||
${esp32_ota.lib_deps}
|
${esp32_ota.lib_deps}
|
||||||
@@ -354,7 +369,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_tft
|
extends = heltec_v4_tft
|
||||||
build_flags =
|
build_flags =
|
||||||
${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_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
-D DISPLAY_CLASS=ST7789LCDDisplay
|
-D DISPLAY_CLASS=ST7789LCDDisplay
|
||||||
@@ -365,7 +380,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter}
|
|||||||
+<helpers/ui/ST7789LCDDisplay.cpp>
|
+<helpers/ui/ST7789LCDDisplay.cpp>
|
||||||
+<helpers/ui/MomentaryButton.cpp>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_tft.lib_deps}
|
${heltec_v4_tft.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -374,7 +389,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_tft
|
extends = heltec_v4_tft
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 DISPLAY_CLASS=ST7789LCDDisplay
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -391,7 +406,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_tft.lib_deps}
|
${heltec_v4_tft.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -400,7 +415,7 @@ lib_deps =
|
|||||||
extends = heltec_v4_tft
|
extends = heltec_v4_tft
|
||||||
build_flags =
|
build_flags =
|
||||||
${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 ENABLE_WIFI_INTERFACE
|
||||||
-D MAX_CONTACTS=350
|
-D MAX_CONTACTS=350
|
||||||
-D MAX_GROUP_CHANNELS=40
|
-D MAX_GROUP_CHANNELS=40
|
||||||
@@ -417,7 +432,7 @@ build_src_filter = ${heltec_v4_tft.build_src_filter}
|
|||||||
+<helpers/esp32/*.cpp>
|
+<helpers/esp32/*.cpp>
|
||||||
+<helpers/wifi/*.cpp>
|
+<helpers/wifi/*.cpp>
|
||||||
+<../examples/companion_radio/*.cpp>
|
+<../examples/companion_radio/*.cpp>
|
||||||
+<../examples/companion_radio/ui-new/*.cpp>
|
+<helpers/ui/companion-new>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_v4_tft.lib_deps}
|
${heltec_v4_tft.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -432,7 +447,7 @@ build_flags =
|
|||||||
-D ADMIN_PASSWORD='"password"'
|
-D ADMIN_PASSWORD='"password"'
|
||||||
-D ENV_PIN_SDA=3
|
-D ENV_PIN_SDA=3
|
||||||
-D ENV_PIN_SCL=4
|
-D ENV_PIN_SCL=4
|
||||||
-D DISPLAY_CLASS=ST7789LCDDisplay
|
; -D DISPLAY_CLASS=ST7789LCDDisplay
|
||||||
; -D MESH_PACKET_LOGGING=1
|
; -D MESH_PACKET_LOGGING=1
|
||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
build_src_filter = ${heltec_v4_tft.build_src_filter}
|
build_src_filter = ${heltec_v4_tft.build_src_filter}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display(NULL);
|
DISPLAY_CLASS display(NULL);
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
|
UITask ui_task(&board, &display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include <helpers/ui/ST7789LCDDisplay.h>
|
#include <helpers/ui/ST7789LCDDisplay.h>
|
||||||
#endif
|
#endif
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
#include <UITask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HeltecV4Board board;
|
extern HeltecV4Board board;
|
||||||
@@ -25,6 +26,7 @@ extern EnvironmentSensorManager sensors;
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
extern MomentaryButton user_btn;
|
extern MomentaryButton user_btn;
|
||||||
|
extern UITask ui_task;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|||||||
Loaded 100 of 264 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user