Browse Source

Remove wifi distance calculation

rfm69
Xose Pérez 6 years ago
parent
commit
2e3664f76f
5 changed files with 2619 additions and 2625 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +2618
    -2618
      code/espurna/static/index.html.gz.h
  3. +0
    -5
      code/espurna/wifi.ino
  4. +0
    -1
      code/espurna/ws.ino
  5. +1
    -1
      code/html/index.html

BIN
code/espurna/data/index.html.gz View File


+ 2618
- 2618
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 0
- 5
code/espurna/wifi.ino View File

@ -330,11 +330,6 @@ String getNetwork() {
return WiFi.SSID(); return WiFi.SSID();
} }
double wifiDistance(int rssi) {
double exponent = (double) (WIFI_RSSI_1M - rssi) / WIFI_PROPAGATION_CONST / 10.0;
return round(pow(10, exponent));
}
bool wifiConnected() { bool wifiConnected() {
return jw.connected(); return jw.connected();
} }


+ 0
- 1
code/espurna/ws.ino View File

@ -220,7 +220,6 @@ void _wsUpdate(JsonObject& root) {
root["heap"] = getFreeHeap(); root["heap"] = getFreeHeap();
root["uptime"] = getUptime(); root["uptime"] = getUptime();
root["rssi"] = WiFi.RSSI(); root["rssi"] = WiFi.RSSI();
root["distance"] = wifiDistance(WiFi.RSSI());
#if NTP_SUPPORT #if NTP_SUPPORT
if (ntpSynced()) root["now"] = now(); if (ntpSynced()) root["now"] = now();
#endif #endif


+ 1
- 1
code/html/index.html View File

@ -199,7 +199,7 @@
<div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="channel"></span></div> <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="channel"></span></div>
<div class="pure-u-1-2 pure-u-lg-1-4">RSSI</div> <div class="pure-u-1-2 pure-u-lg-1-4">RSSI</div>
<div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="rssi"></span> (<span name="distance" post="m"></span>)</div>
<div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="rssi"></span></div>
<div class="pure-u-1-2 pure-u-lg-1-4">IP</div> <div class="pure-u-1-2 pure-u-lg-1-4">IP</div>
<div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="deviceip"></span></div> <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="deviceip"></span></div>


Loading…
Cancel
Save