-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeams.html
106 lines (92 loc) · 2.17 KB
/
Teams.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Teams</title>
<style>
#right{
width: 175px;
float: left;
}
#rightTeamOne{
height: 40px;
border: 2px solid red;
border-radius: 5px;
}
#rightTeamTwo{
border: 2px solid red;
height: 40px;
border-radius: 5px;
}
#left{
float: left;
width: 175px;
}
#leftTeamOne{
border: 2px solid blue;
height: 40px;
border-radius: 5px;
}
#leftTeamTwo{
border: 2px solid blue;
height: 40px;
border-radius: 5px;
}
.buttonADD{
background-color: #9900cc;
height: 30px;
border: none;
border-radius: 20px;
color: white;
margin-left: 5px;
}
.buttonRESET{
background-color: black;
height: 30px;
border: none;
border-radius: 20px;
color: white;
}
#bottom{
margin-left: 130px;
clear: both;
width: 90px;
}
</style>
</head>
<body>
<script>
function resetTeams(){
NetworkTables.putValue('/SmartDashboard/Team1', "TeamRed");
NetworkTables.putValue('/SmartDashboard/Team2', "TeamRed");
NetworkTables.putValue('/SmartDashboard/Team3', "TeamBlue");
NetworkTables.putValue('/SmartDashboard/Team4', "TeamBlue");
}
function setTeams(){
var r1 = document.getElementById('rightTeamOne').value;
NetworkTables.putValue('/SmartDashboard/Team1', r1);
var r2 = document.getElementById('rightTeamTwo').value;
NetworkTables.putValue('/SmartDashboard/Team2', r2);
var l1 = document.getElementById('leftTeamOne').value;
NetworkTables.putValue('/SmartDashboard/Team3', l1);
var l2 = document.getElementById('leftTeamTwo').value;
NetworkTables.putValue('/SmartDashboard/Team4', l2);
}
</script>
</body>
<div id="right">
<input id="rightTeamOne" type="text"></input>
<input id="rightTeamTwo" type="text"></input>
</div>
<div id="left">
<input id="leftTeamOne" type="text"></input>
<input id="leftTeamTwo" type="text"></input>
</div>
<div id="bottom">
<p></p>
<button class="buttonADD" onclick="setTeams();">Add Teams</button>
<p></p>
<button class="buttonRESET" onclick="resetTeams();">Reset Teams</button>
</div>
<script src="networktables/networktables.js"></script>
</html>