This commit is contained in:
Ben Meadors
2023-01-28 08:17:29 -06:00
parent e01e830c0e
commit 654d38ed3f
2 changed files with 11 additions and 10 deletions

View File

@@ -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()