-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
76 lines (76 loc) · 1.49 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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Remote RX</title>
<SCRIPT LANGUAGE=javascript>
var baseuri = "/cgi-bin/set.cgi?";
var audio = null;
function tune(freq) {
if (audio != null) {
audio.src = baseuri + freq;
audio.load();
audio.play();
}
}
function freqChanged() {
var freq = document.fmrx.frequency.value;
if (freq != null)
tune(freq);
}
function stop() {
if (audio != null)
audio.pause();
audio = null;
}
function start() {
var freq = document.fmrx.frequency.value;
try {
if (audio == null)
audio = new Audio("");
tune(freq);
} catch(e) {
audio = null;
}
}
function buz() {
var freq = 4625000;
try {
if (audio == null)
audio = new Audio("");
tune(freq);
} catch(e) {
audio = null;
}
}
function pip() {
var freq = 3828000;
try {
if (audio == null)
audio = new Audio("");
tune(freq);
} catch(e) {
audio = null;
}
}
function sqw() {
var freq = 3756000;
try {
if (audio == null)
audio = new Audio("");
tune(freq);
} catch(e) {
audio = null;
}
}
</SCRIPT>
</head>
<body onLoad="freqChanged()">
<h1>Set RX frequency</h1>
<FORM name="fmrx" onsubmit="return false;">
<P>Frequency: <INPUT name="frequency" VALUE="14025000"
onChange="freqChanged();">
<INPUT TYPE="BUTTON" onClick="start();" VALUE="Goto"><br>
<INPUT TYPE="BUTTON" onClick="buz();" VALUE="Buzzer">
<INPUT TYPE="BUTTON" onClick="pip();" VALUE="Pip">
<INPUT TYPE="BUTTON" onClick="sqw();" VALUE="Squeaky Wheel">
</FORM>
</body> </html>