diff --git a/index.html b/index.html index be4d675..448b4d6 100644 --- a/index.html +++ b/index.html @@ -22,9 +22,11 @@
Mode: N/A Match: N/A Station: N/A + MatchTime:N/A
- MatchTime:N/A + NT: N/A +
Ping:N/A
diff --git a/js/nt_6083.js b/js/nt_6083.js index da78759..f6150ee 100644 --- a/js/nt_6083.js +++ b/js/nt_6083.js @@ -17,12 +17,17 @@ function updateCommStat() { updateModeStat(); } -NetworkTables.putValue("/SmartDashboard/ping", -1); +NetworkTables.putValue("/SmartDashboard/NT/ping", -1); +NetworkTables.putValue("/SmartDashboard/NT/ip", "noConnect"); -NetworkTables.addKeyListener("/SmartDashboard/ping", function(key, value, isNew) { +NetworkTables.addKeyListener("/SmartDashboard/NT/ping", function(key, value, isNew) { $("#ptime").html(value); }, true); +NetworkTables.addKeyListener("/SmartDashboard/NT/ip", function(key, value, isNew) { + $("#ntip").html(value); +}); + var fmsAtt = false; var robotMode = -1; diff --git a/main.js b/main.js index a524bbe..aef8cf1 100644 --- a/main.js +++ b/main.js @@ -162,6 +162,7 @@ function startNTconnect() { else { connectToNT(targetHost); setTimeout(function(){ + client.Update(client.getKeyID("/SmartDashboard/NT/ip"), targetHost); readPing(); },1000); } @@ -170,7 +171,7 @@ function startNTconnect() { function readPing() { tcpp.ping({ address: targetHost, port: 1735}, function(err, data) { - client.Update(client.getKeyID("/SmartDashboard/ping"), Math.round(parseFloat(data.avg))); + client.Update(client.getKeyID("/SmartDashboard/NT/ping"), Math.round(parseFloat(data.avg))); console.log(parseFloat(data.avg)); setTimeout(function(){ readPing(); diff --git a/package.json b/package.json index 2ef3a69..cc21060 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "overdashboard-electron", "productName": "OverDashboard", - "version": "1.0.0", + "version": "1.0.4", "description": "Dashboard for Overlooking", "main": "main.js", "scripts": {