From 51ab4a7f0763aee4ed43c04a74f1cdef31c0c098 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sun, 23 Feb 2020 11:34:25 +0100 Subject: [PATCH] Reducing precision on temperature and vcc in json to reduce length --- src/HanToJson.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HanToJson.cpp b/src/HanToJson.cpp index 224c09a1..721a0ecc 100644 --- a/src/HanToJson.cpp +++ b/src/HanToJson.cpp @@ -7,13 +7,13 @@ void hanToJson(JsonDocument& json, AmsData& data, HwTools& hw, double temperatur double vcc = hw.getVcc(); if(vcc > 0) { - json["vcc"] = vcc; + json["vcc"] = serialized(String(vcc, 3)); } json["rssi"] = hw.getWifiRssi(); if(temperature != DEVICE_DISCONNECTED_C) { - json["temp"] = temperature; + json["temp"] = serialized(String(temperature, 2)); } // Add a sub-structure to the json object,