Skip to content

Commit

Permalink
Unset received SNR/RSSI values upon receiving packet via MQTT (meshta…
Browse files Browse the repository at this point in the history
  • Loading branch information
GUVWAF authored Dec 26, 2024
1 parent d87b7e4 commit b12aa3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mqtt/MQTT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ inline void onReceiveProto(char *topic, byte *payload, size_t length)

UniquePacketPoolPacket p = packetPool.allocUniqueCopy(*e.packet);
p->via_mqtt = true; // Mark that the packet was received via MQTT
// Unset received SNR/RSSI which might have been added by the MQTT gateway
p->rx_snr = 0;
p->rx_rssi = 0;

if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
if (moduleConfig.mqtt.encryption_enabled) {
Expand Down

0 comments on commit b12aa3f

Please sign in to comment.