Refactor MQTT bridge handling in MyMesh to support RX and TX packet logging based on MQTT settings. Introduce mqtt_rx_enabled preference for default RX packet handling and update related logic in CommonCLI and MQTTBridge for improved configuration management. Enhance MQTTMessageBuilder to conditionally include SNR and RSSI for RX packets only.

This commit is contained in:
agessaman committed 2026-04-04 16:01:35 -07:00
1 parent 258a0d724c
commit 47b632aaa9
11 files changed
+2739 -37

No files matched your search

+5 -2
View File
@@ -122,8 +122,11 @@ int MQTTMessageBuilder::buildPacketMessage(
root["route"] = route;
root["payload_len"] = payload_len_str;
root["raw"] = raw;
root["SNR"] = snr_str;
root["RSSI"] = rssi_str;
// SNR and RSSI are only meaningful for RX packets (received from radio)
if (strcmp(direction, "rx") == 0) {
root["SNR"] = snr_str;
root["RSSI"] = rssi_str;
}
root["hash"] = hash;
if (path && strlen(path) > 0) {