-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
158 lines (154 loc) · 6.48 KB
/
index.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FRC Dashboard</title>
<link rel="stylesheet" href="css/style.css">
<link id="theme-link" rel="stylesheet" href>
</head>
<body>
<!-- Clock that shows up in top left -->
<div class="blink" id="timer">0:00</div>
<header>
<!-- Tells whether robot is connected to dashboard. -->
<div id="robot-state">Unknown state</div>
<button id="tuning-button">Tuning</button>
<button id="auto-button">Auto</button>
<p>Theme:</p>
<div class="select-container">
<select id="theme-select">
<option>dark</option>
<option>light</option>
<option>red</option>
<option>blue</option>
<option>rainbow</option>
</select>
</div>
</header>
<!-- You'll need to mess around with the CSS of #camera (found in css/style.css) to get it to work.
More explanation in that CSS rule. -->
<div id="camera"></div>
<div id="tuning" style="display: none;">
<input type="text" placeholder="Property" id="name">
<input type="text" placeholder="Value" id="value">
<button id="set">Set</button>
<button id="get">Get</button>
</div>
<div id="auto" style="display: none;">
<!-- Autonomous selector -->
<div class="select-container">
<select id="auto-select">
<option>No auto modes found</option>
<!-- This gets populated by JS -->
</select>
</div>
<div id="replay-auto">
<label for="replay-name">Recording Name</label>
<input type="text" placeholder="Source" id="replay-name">
</div>
<div id="auto-modes">
<div id="field">
<svg width="500px" height="250px">
<rect width="80" height="25" x="200" y="40"/>
<rect width="5" height="35" x="237.5" y="65"/>
<rect width="80" height="50" x="200" y="100"/>
<rect width="5" height="35" x="237.5" y="150"/>
<rect width="80" height="25" x="200" y="185"/>
</svg>
</div>
<div id="auto-options">
<div id="field-position">
<label>Left<input type="radio" id="left" name="position" value="left"></label>
<label>Middle<input type="radio" id="middle" name="position" value="middle"></label>
<label>Right<input type="radio" id="right" name="position" value="right"></label>
</div>
<input type="checkbox" id="dump">Dump in switch</input>
<label class="cube">Fetch another cube:<select id="fetch">
<option value="">----</option>
<option value="pile">Pile</option>
<option value="line">Line</option>
</select></label>
<label class="cube">Second cube destination:<select id="cube">
<option value="">----</option>
<option value="switch">Switch</option>
<option value="vault">Vault</option>
</select></label>
</div>
</div>
</div>
<!-- The main body of the dashboard -->
<article>
<!-- Gyroscope -->
<svg id="gyro" width="400" height="400">
<circle cx="160" cy="160" r="150" />
<circle cx="160" cy="160" r="100" />
<g id="gyro-arm">
<rect x="70" y="60" width="180" height="200" />
<rect x="90" y="70" width="15" height="40" id="fl_module" />
<rect x="215" y="70" width="15" height="40" id="fr_module" />
<rect x="90" y="210" width="15" height="40" id="rl_module" />
<rect x="215" y="210" width="15" height="40" id="rr_module" />
</g>
<circle id="field-centric" cx="160" cy="120" r="20" />
<text id="fc-label" x="148" y="126">FC</text>
<text id="gyro-number" x="160" y="200">0º</text>
</svg>
<svg id="robot-diagram" width="332" height="450">
<circle cx="100" cy="280" r="25" />
<rect x="75" y="280" width="230" height="120" />
<rect x="85" y="290" width="210" height="120" />
<rect x="240" y="370" width="55" height="10" />
<circle cx="185" cy="330" r="50" />
<rect x="75" y="280" width="230" height="10" />
<rect class="svginvis" x="166" y="291" width="120" height="50" />
<circle class="svgsolid"cx="185" cy="330" r="20" />
<circle cx="185" cy="330" r="10" />
<circle class="ballicons" cx="200" cy="365" r="10" />
<circle class="ballicons" cx="217" cy="353" r="10" />
<circle class="ballicons" cx="180" cy="370" r="10" />
<circle class="ballicons" cx="161" cy="360" r="10" />
<circle cx="100" cy="410" r="25" />
<circle cx="270" cy="410" r="25" />
<rect x="60" y="380" width="250" height="30" />
<text x="185" y="405" id="team" text-anchor="middle">1418</text>
</svg>
</article>
<!-- The sidebar of the dashboard. Designed for smaller control elements like selection boxes and small buttons. -->
<aside>
<div id="tank-pressure">
<div id="tank-label">TANK @</div>
<div id="tank-readout">??psi</div>
<div id="tank-gauge-container">
<div id="tank-gauge"></div>
</div>
</div>
<div id="auto-warning">WARNING: Autonomous not configured!</div>
<div id="auto-diagram">
<table id="auto-table" border="2">
<tr>
<td width="50%"><strong>Left</strong></td>
<td width="50%"><strong>Right</strong></td>
</tr>
<tr>
<td>Far Switch</td>
<td>Far Switch</td>
</tr>
<tr>
<td>Scale</td>
<td>Scale</td>
</tr>
<tr>
<td>Our Switch</td>
<td>Our Switch</td>
</tr>
</table>
</div>
<div>
<p>Recording Name</p>
<input type="text" placeholder="Save target" id="recording-target">
</div>
</aside>
<script src="/networktables/networktables.js"></script>
<script src="ui.js"></script>
</body>
</html>