forked from ajinkyamandhre/Telemetry
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
398 lines (394 loc) · 14.8 KB
/
index.html
File metadata and controls
398 lines (394 loc) · 14.8 KB
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="icon"
href="">
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author"
content="Khalil A. Estell">
<meta name="description"
content="Web Interface to display and modify firmware variables within the SJOne Development board.">
<title>SJOne Telemetry</title>
<!-- xterm.js stylesheet-->
<link rel="stylesheet"
type="text/css"
href="web-app-resources/lib/xterm/dist/xterm.css">
<!-- Bootstrap core CSS -->
<link rel="stylesheet"
type="text/css"
href="web-app-resources/lib/bootstrap-4.0.0-alpha.6/css/bootstrap.min.css">
<!-- Custom styles for this template -->
<link rel="stylesheet"
type="text/css"
href="web-app-resources/dashboard.css">
</head>
<body>
<nav class="navbar navbar-toggleable-md navbar-inverse fixed-top bg-inverse">
<button class="navbar-toggler navbar-toggler-right hidden-lg-up"
type="button"
data-toggle="collapse"
data-target="#navbarsExampleDefault"
aria-controls="navbarsExampleDefault"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand"
href="#"> Telemetry <span class='supsub'>
<sup class='superscript'>version 1.2</sup>
<sub class="subscript disconnected-text"
id="app-connection-indicator"></sub>
</span>
<button class="btn btn-outline help-btn"
data-toggle="modal"
data-target="#helpModal"
style="margin-left: 95px;"> Help </button>
</a>
<div class="collapse navbar-collapse"
id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto"></ul>
<div class="form-inline mt-2 mt-md-0">
<label class="form-check-label"
style="color: white;">
<input class="form-check-input"
type="checkbox"
id="dtr-control"> DTR </label>
<label class="form-check-label"
style="padding:10px; color: white;">
<input class="form-check-input"
type="checkbox"
id="rts-control"> RTS </label>
<button class="btn btn-outline options-btn"
data-toggle="modal"
data-target="#options-modal"
style="margin-right: 5px;"> Options </button>
<select class="custom-select mb-2 mr-sm-2 mb-sm-0"
id="device-select">
<option value="-1" selected="selected">No Serial Ports</option>
</select>
<button class="btn btn-outline-success my-2 my-sm-0"
id="connect">Connect</button>
</div>
</div>
</nav>
<!-- Options Modal-->
<div id="options-modal"
class="modal fade"
role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Options</h4>
<button type="button"
class="close"
data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<div class="btn-group-vertical" style="width:100%">
<label class="form-check-label">
<input class="form-check-input"
disabled
type="checkbox"
value="telemetry"
id="graph-switch"> Graph </label>
<label class="form-check-label">
<input class="form-check-input"
disabled
type="checkbox"
value="telemetry"
id="telemetry-on"> Telemetry </label>
<label class="form-check-label">
<input class="form-check-input"
type="checkbox"
value="dark-theme"
id="dark-theme"> Dark Theme </label>
<label class="form-check-label">
<input class="form-check-input"
disabled
type="checkbox"
value="reset"
id="reset-on-connect"
checked> Reset On Connect </label>
<div class="input-group" style="margin-bottom: 10px">
<input type="text"
class="form-control"
placeholder="Enter Chrome Serial ID here"
id="chrome-app-id" />
<span class="input-group-btn">
<button id="save-and-refresh-page"
onclick="location.reload();"
class="btn btn-secondary btn-outline-info"
type="button">Save & Refresh Page</button>
</span>
</div>
<button id="clear-cache-modal-open"
class="btn btn-outline-danger clear-btn"> Clear Command History
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Help Modal -->
<div id="helpModal"
class="modal fade"
role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">How to Use Telemetry</h4>
<button type="button"
class="close"
data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<h4>Connecting Your Device</h4>
<ol>
<li>Connect device to USB port</li>
<li>Using the dropdown menu next to the connect button, connect to
the corresponding COM or TTY serial device number and press
Connect.</li>
</ol>
<h4>Serial Baud Select</h4>
<ul>
<li>Baud rates select the rate at which bits are sent and received
from Telemetry to your device.</li>
<li> 1 Baud represents one bit of information transferred per
second.</li>
</ul>
<h4>Carriage Return (CR) and New Line (NL) Selectors</h4>
<ul>
<li>Having CR checked sends a carriage return character,
<code>\r</code>, at the end of your string of text.</li>
<li>Having NL checked sends a new line character, <code>\n</code>,
at the end of your string of text.</li>
</ul>
<h3 style="text-decoration: underline">Options</h3>
<p>To active/deactivate open the options interface by pressing the
button on the upper right hand location.</p>
<h4>Dark Theme</h4>
<ul>
<li>Selecting this changes the interface to a dark mode.</li>
</ul>
<h4>Enable Telemetry</h4>
<ul>
<li>Having Telemetry checked enables the Telemetry features, and
allows you to interact with your variables in real time.</li>
</ul>
<h4>Enable Graph</h4>
<ul>
<li>Having Graph checked enables data sent from your device to be
graphed in real time.</li>
</ul>
</div>
<div class="modal-footer">
<button type="button"
class="btn btn-outline-info"
data-toggle="modal"
data-target="#not-connected-modal">
Show Chrome Installation Instructions</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Chrome App Installation Modal -->
<div id="not-connected-modal"
class="modal fade"
role="dialog">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Chrome App Is Not Connected</h4>
<button type="button"
class="close"
data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<h4>Telemetry App Installation Steps:</h4>
<ol>
<li>Create a new tab or window and enter
<code>chrome://extensions</code> into your address bar.</li>
<li>On the upper right hand corner, enable "Developer Mode".</li>
<li>Download the
<a href="https://github.com/kammce/Telemetry/raw/master/telemetry-chrome-interface.crx">telemetry-chrome-interface.crx</a> file to your
computer. Ignore the download warnings, the file is safe.</li>
<li>Drag and drop the <strong>telemetry-chrome-interface.crx</strong> file
into the chrome extension page and add it to your list of
apps.</li>
<li>Done, go back to the
<a href="https://kammce.github.io/Telemetry">
kammce.github.io/Telemetry</a> and refresh the page</li>
</ol>
</div>
<div class="modal-footer">
<button type="button"
class="btn btn-default"
data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Page Content -->
<div class="container-fluid pt-4"
style="height: 97.5%">
<div class="row"
style="height: 100%">
<main class="col-sm-12 col-md-12 col-lg-12"
id="serial-output-section"
style="z-index: 1; position: absolute;">
<div style="display: inherit;">
<h2>Serial Output</h2>
<select style="margin-left: 15px"
class="custom-select mb-2 mr-sm-2 mb-sm-0"
id="baudrate">
<option value="110">110 baud</option>
<option value="150">150 baud</option>
<option value="300">300 baud</option>
<option value="1200">1200 baud</option>
<option value="2400">2400 baud</option>
<option value="4800">4800 baud</option>
<option value="9600">9600 baud</option>
<option value="19200">19200 baud</option>
<option value="38400" selected>38400 baud</option>
<option value="57600">57600 baud</option>
<option value="115200">115200 baud</option>
<option value="230400">230400 baud</option>
<option value="460800">460800 baud</option>
<option value="921600">921600 baud</option>
</select>
<button id="clear-button"
class="btn btn-outline-warning">Clear Console</button>
</div>
<hr>
<div class="input-group"
style="margin-bottom: 10px; min-height: 37px;">
<input type="text"
class="form-control"
list="command-history"
placeholder="Write Serial Data Here ..."
id="serial-input">
<datalist id="command-history"></datalist>
<span class="input-group-btn">
<button class="btn btn-outline-warning help-btn"
data-toggle="modal"
data-target="#serial-file-modal"
type="button"> Upload File </button>
</span>
<span class="input-group-addon">
<input type="checkbox"
id="carriage-return-select">
<span> CR</span>
</span>
<span class="input-group-addon">
<input type="checkbox"
id="newline-select"
checked><span> NL</span>
</span>
<span class="input-group-btn">
<button id="serial-send"
class="btn btn-secondary btn-outline-info"
type="button">Send</button>
</span>
</div>
<div id="terminal"
style="height:80%"></div>
<textarea disabled
id="serial-output"
style="display:none"
class="form-control fill"></textarea>
</main>
</div>
</div>
<!-- Clear Command History Cache Modal -->
<div class="modal fade"
id="clear-cache-modal"
tabindex="-1"
role="dialog"
aria-labelledby="clear-cache-modalLabel">
<div class="modal-dialog"
role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"
id="clear-cache-modalLabel">Clear Command History Cache?</h4>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<p>Are you sure you want to clear the command history?</p>
</div>
<div class="modal-footer">
<button type="button"
id="clear-command-cache"
class="btn btn-danger"
data-dismiss="modal">Yes, Clear Command History</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal"> Cancel</button>
</div>
</div>
</div>
</div>
<!-- File Upload Modal-->
<div class="modal fade"
id="serial-file-modal"
tabindex="-1"
role="dialog"
aria-labelledby="serial-file-modalLabel">
<div class="modal-dialog"
role="document">
<div class="modal-content">
<div class="modal-header">Upload File To Current Device</h4>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<input type="file"
class="form-control-file"
accept=".txt, .hex"
id="serial-file" />
</div>
</form>
<div id="alert-display"></div>
</div>
<div class="modal-footer">
<button type="button"
id="serial-upload"
class="btn btn-primary">Upload</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.bundle.min.js"></script>
<script src="web-app-resources/lib/bootstrap-4.0.0-alpha.6/js/jquery.min.js"></script>
<script src="web-app-resources/lib/bootstrap-4.0.0-alpha.6/js/tether.min.js"></script>
<script src="web-app-resources/lib/bootstrap-4.0.0-alpha.6/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="web-app-resources/lib/bootstrap-4.0.0-alpha.6/js/ie10-viewport-bug-workaround.js"></script>
<script src="web-app-resources/lib/xterm/dist/xterm.js"></script>
<script src="web-app-resources/lib/xterm/dist/addons/fit/fit.js"></script>
<script src="web-app-resources/flags.js"></script>
<script src="web-app-resources/term.js"></script>
<script src="web-app-resources/main.js"></script>
</body>
</html>