Update last_sent_by_id in FloodingRouter

This commit is contained in:
GUVWAF
2023-06-08 20:02:36 +02:00
parent 5c438ae792
commit 66c71250b8
4 changed files with 34 additions and 6 deletions

View File

@@ -20,6 +20,9 @@ class NeighborInfoModule : public ProtobufModule<meshtastic_NeighborInfo>, priva
bool saveProtoForModule();
// Let FloodingRouter call updateLastSentById upon rebroadcasting a NeighborInfo packet
friend class FloodingRouter;
protected:
// Note: this holds our local info.
meshtastic_NeighborInfo neighborState;
@@ -58,6 +61,9 @@ class NeighborInfoModule : public ProtobufModule<meshtastic_NeighborInfo>, priva
/* update neighbors with subpacket sniffed from network */
void updateNeighbors(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *np);
/* update a NeighborInfo packet with our NodeNum as last_sent_by_id */
void updateLastSentById(meshtastic_MeshPacket *p);
void loadProtoForModule();
/* Does our periodic broadcast */