aboutsummaryrefslogtreecommitdiffstats
path: root/htdocs/ucs-controller.html
blob: f1b9ed834f533de7b8f585d27691a53b028e9e3e (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
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
<!--
Copyright 2019 Microchip Technology Inc. and its subsidiaries

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<html>
<head>
    <title>Unicens Controller Test</title>

    <link rel="stylesheet" href="ucs-controller.css">
    <script type="text/javascript" src="AFB.js"></script>
    <script type="text/javascript" src="ucs-controller.js"></script>
    <style>
        .divTable{
            display: table;
        }
        .divTableRow {
            display: table-row;
        }
        .divTableHeading {
            background-color: #EEE;
            display: table-header-group;
        }
        .divTableCell, .divTableHead {
            border: 1px solid #999999;
            display: table-cell;
            padding: 3px 10px;
        }
        .divTableHeading {
            background-color: #EEE;
            display: table-header-group;
            font-weight: bold;
        }
        .divTableFoot {
            background-color: #EEE;
            display: table-footer-group;
            font-weight: bold;
        }
        .divTableBody {
            display: table-row-group;
        }

        .ucsCtrlButton {
            border: none;
            padding: 5px 15px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            width: 144px;
            border: 2px solid #4CAF50;
        }
    </style>
</head>
<body onload="init('unused','unicens-controller', 'ping');">

    <h1>Unicens Controller</h1>

    <button id="connected" onclick="init('ucs2_config','unicens', 'listconfig')">Binder WS Fail</button>
    <br>
    <h1>Slim-Amplifier</h1>
    <h3>Master Volume</h3>
    <div class="slidecontainer">
        <input type="range" min="0" max="100" value="50" class="slider" id="slimamp-master">
    </div>

    <h1>Fiberdyne-Amplifier</h1>
    <h3>Master Volume</h3>
    <div class="slidecontainer">
        <input type="range" min="0" max="100" value="50" class="slider" id="amplifier-master">
    </div>

    <h1>Microphone</h1>
    <h3>Mode</h3>
    <div>
    <ol>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'none'})">None</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'doa'})">DOA</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'thinking'})">Thinking</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'speaking'})">Speaking</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'error'})">Error</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'waking'})">Waking</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'ending'})">Ending</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'cylon'})">Cylon</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'rainbow'})">Rainbow</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'wheel'})">Wheel</button></li>
        <li><button onclick="callbinder('unicens-controller','microphone_mode_set', {'value': 'unknown'})">Unknown</button></li>
    </ol>
    </div>

    <h1>Events</h1>
    <br>
    <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>

    <div style="visibility:hidden">
    <ol>
        <li><button onclick="callbinder('unicens-controller','slimamp_master_volume_set', {'value': 100})">Set Master-Volume: 100</button></li>
        <li><button onclick="callbinder('unicens-controller','slimamp_master_volume_set', {'value': 75})">Set Master-Volume: 75</button></li>
        <li><button onclick="callbinder('unicens-controller','slimamp_master_volume_set', {'value': 50})">Set Master-Volume: 50</button></li>
        <li><button onclick="callbinder('unicens-controller','slimamp_master_volume_set', {'value': 25})">Set Master-Volume: 25</button></li>
        <li><button onclick="callbinder('unicens-controller','slimamp_master_volume_set', {'value': 0})">Set Master-Volume: 0</button></li>
    </ol>
    </div>

</body>