* refactored the UI_DISCOVER_* feature

This commit is contained in:
Scott Powell committed 2026-09-17 13:45:33 +10:00
1 parent ab3cb11a18
commit e72c9c3759
8 files changed
+112 -108

No files matched your search

+7 -1
View File
@@ -510,7 +510,10 @@ void UITask::onQueueSizeChanged(int msgcount) {
}
}
void UITask::onMessageRecv(uint8_t path_len, const char* from_name, const char* text) {
void UITask::onMessageRecv(const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, uint8_t path_len, const char* text) {
// we only want to show text messages on display, not cli data
if (!(txt_type == TXT_TYPE_PLAIN || txt_type == TXT_TYPE_SIGNED_PLAIN)) return;
if (_display != NULL) {
if (!_display->isOn() && !hasConnection()) {
_display->turnOn();
@@ -546,6 +549,9 @@ void UITask::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path
}
}
void UITask::onControlDataRecv(const mesh::Packet* packet) {
}
void UITask::userLedHandler() {
#ifdef PIN_STATUS_LED
int cur_time = millis();
+2 -1
View File
@@ -99,10 +99,11 @@ public:
void toggleGPS();
// MyMesh::Listener
void onMessageRecv(uint8_t path_len, const char* from_name, const char* text) override;
void onMessageRecv(const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, uint8_t path_len, const char* text) override;
void onChannelMsgRecv(ChannelDetails& channel_details, uint8_t path_len, const char* text) override;
void onQueueSizeChanged(int offline_queue_size) override;
void onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path_len, const uint8_t* path) override;
void onControlDataRecv(const mesh::Packet* packet) override;
// from AbstractUITask
void notify(UIEventType t = UIEventType::none) override;