diff --git a/components/esp32_presense/BleFingerprint.cpp b/components/esp32_presense/BleFingerprint.cpp index 0a81034..8364881 100644 --- a/components/esp32_presense/BleFingerprint.cpp +++ b/components/esp32_presense/BleFingerprint.cpp @@ -443,17 +443,17 @@ bool BleFingerprint::fill(JsonObject *doc) { (*doc)["rssi@1m"] = get1mRssi(); (*doc)["rssi"] = rssi; - if (isnormal(raw)) (*doc)["raw"] = serialized(std::string(raw, 2)); - if (isnormal(dist)) (*doc)["distance"] = serialized(std::string(dist, 2)); - if (isnormal(vari)) (*doc)["var"] = serialized(std::string(vari, 2)); + if (isnormal(raw)) (*doc)["raw"] = serialized(std::to_string(raw, 2)); + if (isnormal(dist)) (*doc)["distance"] = serialized(std::to_string(dist, 2)); + if (isnormal(vari)) (*doc)["var"] = serialized(std::to_string(vari, 2)); if (close) (*doc)["close"] = true; (*doc)["int"] = (millis() - firstSeenMillis) / seenCount; if (mv) (*doc)["mV"] = mv; if (battery != 0xFF) (*doc)["batt"] = battery; - if (temp) (*doc)["temp"] = serialized(std::string(temp, 1)); - if (humidity) (*doc)["rh"] = serialized(std::string(humidity, 1)); + if (temp) (*doc)["temp"] = serialized(std::to_string(temp, 1)); + if (humidity) (*doc)["rh"] = serialized(std::to_string(humidity, 1)); return true; }