Mark packets received via MQTT and add option to ignore them (#3117)

* Mark packets received via MQTT and add option to ignore them

* Don't send packets received via MQTT back into MQTT
Generate implicit ACK for packets we as an MQTT gateway sent

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
GUVWAF
2024-01-20 21:22:09 +01:00
committed by GitHub
parent 4f76239d48
commit 8f6a2836b8
7 changed files with 27 additions and 14 deletions

View File

@@ -362,6 +362,7 @@ void RadioLibInterface::handleReceiveInterrupt()
assert(HOP_MAX <= PACKET_FLAGS_HOP_MASK); // If hopmax changes, carefully check this code
mp->hop_limit = h->flags & PACKET_FLAGS_HOP_MASK;
mp->want_ack = !!(h->flags & PACKET_FLAGS_WANT_ACK_MASK);
mp->via_mqtt = !!(h->flags & PACKET_FLAGS_VIA_MQTT_MASK);
addReceiveMetadata(mp);
@@ -406,4 +407,4 @@ void RadioLibInterface::startSend(meshtastic_MeshPacket *txp)
// bits
enableInterrupt(isrTxLevel0);
}
}
}