Let NeighborInfo Module ignore packets coming from MQTT (#3457)

pull/3459/head
GUVWAF 2024-03-21 20:42:53 +01:00 zatwierdzone przez GitHub
rodzic 4debcd5ccd
commit 0a7ddb7594
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

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