Merge branch 'dev' of https://github.com/ripplebiz/MeshCore into mymesh-refactor2

This commit is contained in:
hank 2025-06-01 09:34:09 -07:00
commit c13f676e57
9 changed files with 90 additions and 17 deletions

View file

@ -545,7 +545,8 @@ void MyMesh::onChannelMessageRecv(const mesh::GroupChannel &channel, mesh::Packe
out_frame[i++] = RESP_CODE_CHANNEL_MSG_RECV;
}
out_frame[i++] = findChannelIdx(channel);
uint8_t channel_idx = findChannelIdx(channel);
out_frame[i++] = channel_idx;
uint8_t path_len = out_frame[i++] = pkt->isRouteFlood() ? pkt->path_len : 0xFF;
out_frame[i++] = TXT_TYPE_PLAIN;
@ -570,7 +571,13 @@ void MyMesh::onChannelMessageRecv(const mesh::GroupChannel &channel, mesh::Packe
#endif
}
#ifdef DISPLAY_CLASS
ui_task.newMsg(path_len, "Public", text, offline_queue_len);
// Get the channel name from the channel index
const char *channel_name = "Unknown";
ChannelDetails channel_details;
if (getChannel(channel_idx, channel_details)) {
channel_name = channel_details.name;
}
ui_task.newMsg(path_len, channel_name, text, offline_queue_len);
#endif
}

View file

@ -74,7 +74,7 @@ static uint32_t _atoi(const char* sp) {
/* GLOBAL OBJECTS */
StdRNG fast_rng;
SimpleMeshTables tables;
MyMesh the_mesh(radio_driver, fast_rng, *new VolatileRTCClock(), tables); // TODO: test with 'rtc_clock' in target.cpp
MyMesh the_mesh(radio_driver, fast_rng, rtc_clock, tables);
#ifdef DISPLAY_CLASS
#include "UITask.h"