removed "data" from JSON
This commit is contained in:
parent
0c77595ae5
commit
93ed16dda0
@ -53,10 +53,10 @@ public:
|
|||||||
if (usage == 0 || !isTimeSet()) {
|
if (usage == 0 || !isTimeSet()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
JsonDocument json;
|
JsonDocument doc;
|
||||||
|
JsonObject json = doc.to<JsonObject>();
|
||||||
json["timestamp"] = correctTime(bufferRead->timestamp);
|
json["timestamp"] = correctTime(bufferRead->timestamp);
|
||||||
JsonObject data = json["data"].to<JsonObject>();
|
bufferRead->data.toJson(json);
|
||||||
bufferRead->data.toJson(data);
|
|
||||||
if (mqttPublishData(json)) {
|
if (mqttPublishData(json)) {
|
||||||
bufferRead = (bufferRead - buffer + 1) % size + buffer;
|
bufferRead = (bufferRead - buffer + 1) % size + buffer;
|
||||||
usage--;
|
usage--;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user