This commit is contained in:
Maxim Slipenko 2023-12-10 13:37:46 +03:00
parent 37989e25ae
commit 7b3b746a1b

View File

@ -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;
}