Browse Source

Merge pull request #296 from DanielR92/development03

Add WiFI-RSSI to the home site
pull/299/head
lumapu 3 years ago
committed by GitHub
parent
commit
4c9107effc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tools/esp8266/html/index.html
  2. 1
      tools/esp8266/webApi.cpp

2
tools/esp8266/html/index.html

@ -17,6 +17,7 @@
</p>
<p><span class="des">Uptime: </span><span id="uptime"></span></p>
<p><span class="des">ESP-Time: </span><span id="date"></span></p>
<p><span class="des">RSSI: </span><span id="wifi_rssi"></span>dBm</p>
<p>
<span class="des">Statistics: </span>
<pre id="stat"></pre>
@ -48,6 +49,7 @@
var mIntervalSet = false;
function parseSys(obj) {
document.getElementById("version").innerHTML = "Git SHA: " + obj["build"] + " :: " + obj["version"];
document.getElementById("wifi_rssi").innerHTML = obj["wifi_rssi"];;
var date = new Date(obj["ts_now"] * 1000);
var up = obj["ts_uptime"];

1
tools/esp8266/webApi.cpp

@ -123,6 +123,7 @@ void webApi::getSystem(JsonObject obj) {
obj[F("build")] = String(AUTO_GIT_HASH);
obj[F("ts_uptime")] = mApp->getUptime();
obj[F("ts_now")] = mApp->getTimestamp();
obj[F("wifi_rssi")] = WiFi.RSSI();
}

Loading…
Cancel
Save