mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-19 09:12:45 +00:00
Add nodedb channel handling (#2384)
* send ourNodeInfo to channel we got a message we heared someone new * store node-channel into nodeDB * use channel from nodeDb to send local messages * update protobufs * fmt and fix braces * respect requested channel for local send, only store channel while getting a nodeinfo packet --------- Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -173,6 +173,10 @@ ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
|
||||
handleReceived(p, src);
|
||||
}
|
||||
|
||||
if (p->channel) // don't override if a channel was requested
|
||||
p->channel = nodeDB.getNodeChannel(p->to);
|
||||
LOG_DEBUG("localSend to channel %d\n", p->channel);
|
||||
|
||||
return send(p);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user