mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 18:22:32 +00:00
Router
This commit is contained in:
@@ -9,10 +9,17 @@ RepeaterModule *repeaterModule;
|
||||
|
||||
bool RepeaterModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Routing *r)
|
||||
{
|
||||
printPacket("Repeater rebroadcasting message", &mp);
|
||||
meshtastic_MeshPacket *p = const_cast<meshtastic_MeshPacket *>(&mp);
|
||||
router->send(p);
|
||||
return true;
|
||||
printPacket("Repeater observed message", &mp);
|
||||
router->sniffReceived(&mp, r);
|
||||
|
||||
// FIXME - move this to a non promsicious PhoneAPI module?
|
||||
// Note: we are careful not to send back packets that started with the phone back to the phone
|
||||
if ((mp.to == NODENUM_BROADCAST || mp.to == nodeDB.getNodeNum()) && (mp.from != 0)) {
|
||||
printPacket("Delivering rx packet", &mp);
|
||||
service.handleFromRadio(&mp);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
meshtastic_MeshPacket *RepeaterModule::allocReply()
|
||||
|
||||
Reference in New Issue
Block a user