mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Expose team in AllianceStation JSON for field monitor (fixes #32).
This commit is contained in:
@@ -10,9 +10,14 @@ var websocket;
|
||||
var handleStatus = function(data) {
|
||||
// Update the team status view.
|
||||
$.each(data.AllianceStations, function(station, stationStatus) {
|
||||
if (stationStatus.Team) {
|
||||
$("#status" + station + " .team").text(stationStatus.Team.Id);
|
||||
} else {
|
||||
$("#status" + station + " .team").text("");
|
||||
}
|
||||
|
||||
if (stationStatus.DsConn) {
|
||||
var dsConn = stationStatus.DsConn;
|
||||
$("#status" + station + " .team").text(stationStatus.DsConn.TeamId);
|
||||
$("#status" + station + " .ds-status").attr("data-status-ok", dsConn.DsLinked);
|
||||
$("#status" + station + " .ds-status").text(dsConn.MBpsToRobot.toFixed(1) + "/" + dsConn.MBpsFromRobot.toFixed(1));
|
||||
$("#status" + station + " .robot-status").attr("data-status-ok", dsConn.RobotLinked);
|
||||
|
||||
Reference in New Issue
Block a user