mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-03 03:11:57 +00:00
* misc
This commit is contained in:
@@ -139,7 +139,7 @@ void UITask::clearMsgPreview() {
|
||||
_need_refresh = true;
|
||||
}
|
||||
|
||||
void UITask::onMessageRecv(const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, uint8_t path_len, const char* text) {
|
||||
void UITask::onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, 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;
|
||||
|
||||
@@ -147,6 +147,7 @@ void UITask::onMessageRecv(const ContactInfo &from, uint8_t txt_type, uint32_t s
|
||||
vibration.trigger(); // vibrate even while the app is connected (honors quiet + cooldown)
|
||||
#endif
|
||||
|
||||
uint8_t path_len = pkt->isRouteFlood() ? pkt->path_len : 0xFF;
|
||||
if (path_len == 0xFF) {
|
||||
sprintf(_origin, "(F) %s", from.name);
|
||||
} else {
|
||||
@@ -168,11 +169,12 @@ void UITask::onMessageRecv(const ContactInfo &from, uint8_t txt_type, uint32_t s
|
||||
}
|
||||
}
|
||||
|
||||
void UITask::onChannelMessageRecv(ChannelDetails& channel_details, uint8_t path_len, const char* text) {
|
||||
void UITask::onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_details, const char* text) {
|
||||
#ifdef HAS_DRV2605
|
||||
vibration.trigger(); // vibrate even while the app is connected (honors quiet + cooldown)
|
||||
#endif
|
||||
|
||||
uint8_t path_len = pkt->isRouteFlood() ? pkt->path_len : 0xFF;
|
||||
if (path_len == 0xFF) {
|
||||
sprintf(_origin, "(F) %s", channel_details.name);
|
||||
} else {
|
||||
|
||||
@@ -71,8 +71,8 @@ public:
|
||||
void clearMsgPreview();
|
||||
|
||||
// MyMesh::Listener
|
||||
void onMessageRecv(const ContactInfo &from, uint8_t txt_type, uint32_t sender_timestamp, uint8_t path_len, const char* text) override;
|
||||
void onChannelMessageRecv(ChannelDetails& channel_details, uint8_t path_len, 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 onQueueSizeChanged(int offline_queue_size) override;
|
||||
void onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path_len, const uint8_t* path) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user