summaryrefslogtreecommitdiffstats
path: root/conf.d/project/htdocs/index.html
blob: 4efa887164d3d2e3d2fb1139efd4ecd4aaf3ff7d (plain)
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
<html>
    <head>
        <title>Radio Test</title>
        <link rel="stylesheet" href="RadioBinding.css">
        <script type="text/javascript" src="jquery-3.3.1.min.js"></script>
        <script type="text/javascript" src="AFB-websock.js"></script>
        <script type="text/javascript" src="RadioBinding.js"></script>
    </head>

    <body onload="init()">

        <h1>Radio Test</h1>
        <button id="connected" onclick="init()">Binder WS Fail</button> 
        <button id="monitoring" onclick="window.open('/monitoring/monitor.html', '_monitor_ctl')">Debug/Monitoring</a></button>
    <br><br>

    <h2>V3 API CALL</h2>
    <ol>
        <li><button onclick="callbinder('radio', 'frequency', {} );">Frequency</button></li>
        <br>

        <li><button onclick="callbinder('radio', 'rds', { } );">RDS</button></li>
        <br>

        <form id='band'>
        	<input type="radio" name="band" value="FM" checked>FM</input>
         	<input type="radio" name="band" value="AM">AM</input>
         	<input type="radio" name="band" value="DAB">DAB</input>
        </form>
	
	<li>
        <button onclick="checkband();">Check if band is supported</button>
        <button onclick="setband();">Set band</button>
	<button onclick="get_frequency_range();">Get frequency range</button>
	<button onclick="get_frequency_step();">Get frequency step</button>
	</li>
        <br>

	<li>
	<button onclick="callbinder('radio', 'start', { } );">Start</button>
	<button onclick="callbinder('radio', 'stop', { } );">Stop</button>
	</li>
        <br>


	<li>
	<button onclick="get_stereo_mode();">Get Stereo mode</button>
	<button onclick="set_stereo_mode();">Set Stereo mode</button>
	     <form id='mode'>
        	<input type="radio" name="mode" value="stereo" checked>Stereo</input>
         	<input type="radio" name="mode" value="mono">Mono</input>
        </form>
        </li>
        <br>

        <li>
        <button onclick="callbinder('radio', 'scan_start', { direction:'backward' } );">Scan Backward</button>
        <button onclick="callbinder('radio', 'scan_start', { direction:'forward' } );">Scan Forward</button>
        </li>
        <br>

    </ol>

    <div id="main" style="visibility:hidden">
        <ol>
            <li>Question <pre id="question"></pre>
            <li>Response <pre id="output"></pre>
            <li>Events: <pre id="outevt"></pre>
        </ol>
    </div>

    <script> 
    </script>