fix
This commit is contained in:
parent
37989e25ae
commit
7b3b746a1b
@ -443,17 +443,17 @@ bool BleFingerprint::fill(JsonObject *doc) {
|
|||||||
(*doc)["rssi@1m"] = get1mRssi();
|
(*doc)["rssi@1m"] = get1mRssi();
|
||||||
(*doc)["rssi"] = rssi;
|
(*doc)["rssi"] = rssi;
|
||||||
|
|
||||||
if (isnormal(raw)) (*doc)["raw"] = serialized(std::string(raw, 2));
|
if (isnormal(raw)) (*doc)["raw"] = serialized(std::to_string(raw, 2));
|
||||||
if (isnormal(dist)) (*doc)["distance"] = serialized(std::string(dist, 2));
|
if (isnormal(dist)) (*doc)["distance"] = serialized(std::to_string(dist, 2));
|
||||||
if (isnormal(vari)) (*doc)["var"] = serialized(std::string(vari, 2));
|
if (isnormal(vari)) (*doc)["var"] = serialized(std::to_string(vari, 2));
|
||||||
if (close) (*doc)["close"] = true;
|
if (close) (*doc)["close"] = true;
|
||||||
|
|
||||||
(*doc)["int"] = (millis() - firstSeenMillis) / seenCount;
|
(*doc)["int"] = (millis() - firstSeenMillis) / seenCount;
|
||||||
|
|
||||||
if (mv) (*doc)["mV"] = mv;
|
if (mv) (*doc)["mV"] = mv;
|
||||||
if (battery != 0xFF) (*doc)["batt"] = battery;
|
if (battery != 0xFF) (*doc)["batt"] = battery;
|
||||||
if (temp) (*doc)["temp"] = serialized(std::string(temp, 1));
|
if (temp) (*doc)["temp"] = serialized(std::to_string(temp, 1));
|
||||||
if (humidity) (*doc)["rh"] = serialized(std::string(humidity, 1));
|
if (humidity) (*doc)["rh"] = serialized(std::to_string(humidity, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user