This repository has been archived by the owner on Mar 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
msctrl.html
114 lines (98 loc) · 2.15 KB
/
msctrl.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
<html>
<head>
<title>Main Screen Controls</title>
<link href="style.css" media="all" rel="stylesheet" />
</head>
<body>
<!--
-->
<span class="txtlbl">Main Screen Controls</span>
<br /><br />
<button id="btn1" class="button">Front</button>
<br /><br />
<button id="btn2" class="button">Rear</button>
<br /><br />
<button id="btn3" class="button">Port/Left</button>
<br /><br />
<button id="btn4" class="button">Starboard/Right</button>
<br /><br />
<button id="btn5" class="button">SRS</button>
<br /><br />
<button id="btn6" class="button">LRS</button>
<br /><br />
<script src="jquery-1.12.0.min.js"></script>
<script>
server=""; //"http://localhost:8080";
$(document).ready(function(){
$("#btn1").click(function(){
msfront();
});
$("#btn2").click(function(){
msrear();
});
$("#btn3").click(function(){
msleft();
});
$("#btn4").click(function(){
msright();
});
$("#btn5").click(function(){
mssrs();
});
$("#btn6").click(function(){
mslrs();
});
});
$(document).keydown(function(e) {
if(e.which == 49) { //1
msfront();
}
if(e.which == 50) { //2
msrear();
}
if(e.which == 51) { //3
msleft();
}
if(e.which == 52) { //4
msright();
}
if(e.which == 53) { //5
mssrs();
}
if(e.which == 54) { //6
mslrs();
}
});
function msfront() {
var mss = "Front";
url = server+'/set.lua?commandMainScreenSetting("'+mss+'")';
$.get( url );
}
function msrear() {
var mss = "Back";
url = server+'/set.lua?commandMainScreenSetting("'+mss+'")';
$.get( url );
}
function msleft() {
var mss = "Left";
url = server+'/set.lua?commandMainScreenSetting("'+mss+'")';
$.get( url );
}
function msright() {
var mss = "Right";
url = server+'/set.lua?commandMainScreenSetting("'+mss+'")';
$.get( url );
}
function mssrs() {
var mss = "Tactical";
url = server+'/set.lua?commandMainScreenSetting("'+mss+'")';
$.get( url );
}
function mslrs() {
mss = "LongRange";
var url = server+'/set.lua?commandMainScreenSetting("'+mss+'")';
$.get( url );
}
</script>
</body>
</html>