Compare commits

..

2 Commits

Author SHA1 Message Date
ae7e408b4e fix 2023-12-10 13:38:37 +03:00
7b3b746a1b fix 2023-12-10 13:37:46 +03:00

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));
if (isnormal(dist)) (*doc)["distance"] = serialized(std::to_string(dist));
if (isnormal(vari)) (*doc)["var"] = serialized(std::to_string(vari));
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));
if (humidity) (*doc)["rh"] = serialized(std::to_string(humidity));
return true;
}