-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
38 lines (38 loc) · 1.51 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
<html>
<head>
<title>Remote Snap Rover</title>
<script type="text/javascript" src="protocol.js"></script>
<script type="text/javascript" src="rover-client.js"></script>
<meta name="viewport" content="width=device-width" />
<style>
@media screen and (max-width: 480px) { body { text-align: center; touch-action: manipulation; } }
h1 { font-family: sans-serif; padding: 10px; color: whitesmoke; background-color: navy; }
fieldset { display: inline-block; }
#ctl_buttons button {font-size: 36px; font-weight: bold; margin: auto; -webkit-user-select: none; }
#ctl_fwd, #ctl_back { display: block; }
</style>
</head>
<body onload="bindListeners();">
<div>
<h1>Snap Rover remote control</h1>
</div>
<div>
<div>
<button type="button" id="btn_connect" onclick="requestControl(location.hostname, location.port);">Request Control</button>
</div>
<div>
<fieldset id="ctl_buttons" disabled>
<button type="button" id="ctl_fwd" class="ctl_button" value="forward">↑</button>
<button type="button" id="ctl_left" class="ctl_button" value="left">←</button>
<button type="button" id="ctl_right" class="ctl_button" value="right">→</button>
<button type="button" id="ctl_back" class="ctl_button" value="back">↓</button>
</fieldset>
</div>
<div>
<button type="button" id="btn_disconnect" onclick="cedeControl();" disabled>Give up Control</button>
</div>
<div>
<p id="msgs"></p>
</div>
</body>
</html>