mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 06:32:06 +00:00
Drop received packets from self
This commit is contained in:
parent
0f3450ad44
commit
921d92c649
@ -158,6 +158,11 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length)
|
|||||||
meshtastic_MeshPacket *p = packetPool.allocCopy(*e.packet);
|
meshtastic_MeshPacket *p = packetPool.allocCopy(*e.packet);
|
||||||
p->via_mqtt = true; // Mark that the packet was received via MQTT
|
p->via_mqtt = true; // Mark that the packet was received via MQTT
|
||||||
|
|
||||||
|
if (p->from == 0 || p->from == nodeDB->getNodeNum()) {
|
||||||
|
LOG_INFO("Ignoring downlink message we originally sent.\n");
|
||||||
|
packetPool.release(p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
||||||
p->channel = ch.index;
|
p->channel = ch.index;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user