Skip to content

Commit

Permalink
Let NeighborInfo Module ignore packets coming from MQTT (#3457)
Browse files Browse the repository at this point in the history
  • Loading branch information
GUVWAF authored and mverch67 committed Mar 24, 2024
1 parent 662df5b commit 3913865
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/NeighborInfoModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ class NeighborInfoModule : public ProtobufModule<meshtastic_NeighborInfo>, priva
/* Does our periodic broadcast */
int32_t runOnce() override;

// Override wantPacket to say we want to see all packets when enabled, not just those for our port number
virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return enabled; }
/* Override wantPacket to say we want to see all packets when enabled, not just those for our port number.
Exception is when the packet came via MQTT */
virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return enabled && !p->via_mqtt; }

/* These are for debugging only */
void printNeighborInfo(const char *header, const meshtastic_NeighborInfo *np);
Expand Down

0 comments on commit 3913865

Please sign in to comment.