Skip to content

Commit

Permalink
show WiFi status in Freematics Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
soshial committed Jul 2, 2021
1 parent 8febac3 commit ea1b0e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion firmware_v5/telelogger/dashboard/dashboard.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,14 @@ function processInput(data)
if (ret = checkData(con, "HTTPD:")) {
document.getElementById("wifi").innerHTML = ret.indexOf("NO") >= 0 ? imgCross : imgTick;
}
if (ret = checkData(con, "Joining")) {
document.getElementById("wifi").innerText = ret;
}
if (ret = checkData(con, "WiFi IP:")) {
document.getElementById("wifi").innerHTML = imgTick + " IP:" + ret;
document.getElementById("wifi").innerHTML += " " + imgTick + " IP:" + ret;
}
if (ret = checkData(con, "No WiFi")) {
document.getElementById("wifi").innerHTML = imgCross;
}
if (ret = checkData(con, "IMEI:")) {
document.getElementById("sim_card").innerHTML = imgTick;
Expand Down
2 changes: 1 addition & 1 deletion firmware_v5/telelogger/telelogger.ino
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ bool initNetwork()
String ip = teleClient.net.getIP();
if (ip.length()) {
state.set(STATE_NET_CONNECTED);
Serial.print("IP:");
Serial.print("WiFi IP:");
Serial.println(ip);
#if ENABLE_OLED
oled.println(ip);
Expand Down

0 comments on commit ea1b0e6

Please sign in to comment.