fix(mqtt): restore 'origin' field position in packet message structure
Reintroduced the 'origin' field in the buildPacketMessage function to its original position within the JSON object. This adjustment ensures consistency in the message format and aligns with previous structural changes made to enhance clarity.
This commit is contained in:
1 parent
8be27e4e94
commit
673361b63a
2 files changed
+6
-1
No files matched your search
@@ -224,6 +224,11 @@ public:
|
||||
*/
|
||||
PsychicMqttClient &setWill(const char *topic, uint8_t qos, bool retain, const char *payload = nullptr, int length = 0);
|
||||
|
||||
/**
|
||||
* @brief Clears the last will and testament (disables LWT for the next connect / config apply).
|
||||
*/
|
||||
PsychicMqttClient &clearLastWill();
|
||||
|
||||
/**
|
||||
* @brief Sets the MQTT server URI. Supports mqtt://, mqtts:// and ws://, wss:// as
|
||||
* transport protocols. Fully supports SSL/TLS.
|
||||
|
||||
@@ -118,8 +118,8 @@ int MQTTMessageBuilder::buildPacketMessage(
|
||||
snprintf(rssi_str, sizeof(rssi_str), "%d", rssi);
|
||||
|
||||
root["timestamp"] = timestamp;
|
||||
root["origin"] = origin;
|
||||
root["hash"] = hash;
|
||||
root["origin"] = origin;
|
||||
root["type"] = "PACKET";
|
||||
root["direction"] = direction;
|
||||
root["time"] = time;
|
||||
|
||||
Reference in new issue
Block a user