From 93ed16dda07c7054c4967ce7c3cdf2e56980622e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Mon, 15 Apr 2024 14:49:27 +0200 Subject: [PATCH] removed "data" from JSON --- lib/patrix/data.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/patrix/data.h b/lib/patrix/data.h index f68ecb3..799180a 100644 --- a/lib/patrix/data.h +++ b/lib/patrix/data.h @@ -53,10 +53,10 @@ public: if (usage == 0 || !isTimeSet()) { return; } - JsonDocument json; + JsonDocument doc; + JsonObject json = doc.to(); json["timestamp"] = correctTime(bufferRead->timestamp); - JsonObject data = json["data"].to(); - bufferRead->data.toJson(data); + bufferRead->data.toJson(json); if (mqttPublishData(json)) { bufferRead = (bufferRead - buffer + 1) % size + buffer; usage--;