This repository has been archived by the owner on Jan 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
132 lines (129 loc) · 6.24 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
<!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 id="timer">2:15</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="field">
<svg>
<rect height="216" width="432" x="0" y="0" />
<line x1="0" y1="50" x2="100" y2="0" /> <!-- Top left line -->
<line x1="432" y1="50" x2="332" y2="0" /> <!-- Top right line -->
<line x1="0" y1="166" x2="60" y2="216" /> <!-- Bottom left line -->
<line x1="432" y1="166" x2="382" y2="216" /> <!-- Bottom right line -->
<circle cx="108" cy="108" r="30" /> <!-- Left airship -->
<circle cx="324" cy="108" r="30" /> <!-- Right airship -->
<line x1="216" y1="0" x2="216" y2="216" /> <!-- Center line -->
</svg>
<div class="field-group">
<label><input type="radio" name="field-positions" value="left"> Left</label><br>
<label><input type="radio" name="field-positions" value="middle_left"> Mid. left</label><br>
<label><input type="radio" name="field-positions" value="middle_right"> Mid. right</label><br>
<label><input type="radio" name="field-positions" value="right"> Right</label><br>
</div>
<div class="field-group">
<!--<label><input type="radio" name="field-positions" value="top_right"> Top right</label><br>
<label><input type="radio" name="field-positions" value="middle_right"> Middle right</label><br>
<label><input type="radio" name="field-positions" value="bottom_right"> Bottom right</label>-->
</div>
</div>
</div>
<!-- The main body of the dashboard, by default contains the gyro monitor and the robot diagram -->
<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>
<!-- Example robot diagram, arm moves when encoder value changes -->
<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>
<svg id="camera-buttons" width="200" height="200">
<rect id="camera-up" x="55" y="0" width="50" height="50"/>
<rect id="camera-left" x="0" y="55" width="50" height="50"/>
<rect id="camera-center" x="55" y="55" width="50" height="50"/>
<rect id="camera-right" x="110" y="55" width="50" height="50"/>
<rect id="camera-down" x="55" y="110" width="50" height="50"/>
</svg>
<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>
<label><input type="checkbox" id="piston-stream-only"> Only stream piston cam</label>
<div id="auto-warning">WARNING: Autonomous not configured!</div>
</aside>
<script src="/networktables/networktables.js"></script>
<script src="ui.js"></script>
</body>
</html>