-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
324 lines (285 loc) · 17.5 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<html lang="en" class="inv"> <!-- class will be used to toggle color modes -->
<head>
<meta charset="UTF-8">
<title>Sensus IR & RF Code Converter</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<datalist id="defaultFreqs">
<option value="36045">
<option value="38029">
<option value="40244">
</datalist>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Top toolbar section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="theme-container color-c4">
<form name="form-theme">
<input name="theme-col" type="submit" class="miniB" formaction="javascript: ui_colorsToggle('col')" value="😛" style="margin: 0 5px"/>
<input name="theme-bnw" type="submit" class="miniB" formaction="javascript: ui_colorsToggle('bnw')" value="☹" style="margin: 0 5px"/>
<input name="theme-inv" type="submit" class="miniB" formaction="javascript: ui_colorsToggle('inv')" value="🥺" style="margin: 0 5px"/>
<input name="theme-fn0" type="submit" class="miniB" formaction="javascript: ui_fontSize(0)" value="-" style="margin: 0 5px 0 40px"/>
A
<input name="theme-fn1" type="submit" class="miniB" formaction="javascript: ui_fontSize(1)" value="+" style="margin: 0 5px"/>
</form>
</div>
<div class="theme-container color-b4">
<form name="form-theme">
<input id="bfCommand" type="submit" class="miniB" formaction="javascript: ui_formToggle('fCommand')" value="♔" style="margin: 0 3px 0 8px"/>
<input id="bfPronto" type="submit" class="miniB" formaction="javascript: ui_formToggle('fPronto')" value="♕" style="margin: 0 3px"/>
<input id="bfDecimal" type="submit" class="miniB" formaction="javascript: ui_formToggle('fDecimal')" value="♙" style="margin: 0 3px"/>
<input id="bfRawLirc" type="submit" class="miniB" formaction="javascript: ui_formToggle('fRawLirc')" value="♖" style="margin: 0 3px"/>
<input id="bfBroadHex" type="submit" class="miniB" formaction="javascript: ui_formToggle('fBroadHex')" value="♗" style="margin: 0 3px"/>
<input id="bfBroadB64" type="submit" class="miniB" formaction="javascript: ui_formToggle('fBroadB64')" value="♘" style="margin: 0 3px"/>
<input id="bfAnalyse" type="submit" class="miniB" formaction="javascript: ui_formToggle('fAnalyse')" value="⚙" style="margin: 0 3px"/>
</form>
</div>
<div class="theme-container color-bg">
<h3><a href="https://github.com/pasthev/sensus" target="_blank">github.com/pasthev/sensus</a></h3>
</div>
<h1 style="cursor: pointer" onclick="info('« non verbum e verbo sed sensum de sensu »')">Sensus IR & RF Code Converter</h1>
<br>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Commands section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="container command" id = "fCommand">
<button class="closebutton" onclick="formHide('fCommand')">ⓧ</button>
<form name="form0">
<div>
<div class="col-25">
<label for="cHeaderField"><h2>♔ Commands</h2></label>
<input type="number" min="63" max="4145146" id="cFreqField" style="width: 100px" placeholder="00000" list="defaultFreqs"></input>
<label for="cFreqField">Hz</label>
</div>
<div class="col-75">
<label for="cShortField">Short (hex):</label>
<input type="transparent" id="cShortField" style="width: 230px; "placeholder="A51A"></input>
<input name="bCommToConv" type="submit" class="small" style="width: 40px;" formaction="javascript: ui_shortToCommand()" value="⮞"/>
 
<input name="bConvToComm" type="submit" class="small" style="width: 40px;" formaction="javascript: ui_commandToShort()" value="⮜"/>
<label for="cCommandField" >  Command (hex):</label>
<input type="transparent" id="cCommandField" style="width: 354px; "placeholder="A55A58A7"></input>
</br>
<label for="cHeaderField">Header:</label>
<input type="transparent" id="cHeaderField" style="width: 100px; "placeholder="8548 4125"></input>
<label for="">  One:</label>
<input type="transparent" id="cOneField" style="width: 100px; "placeholder="522 1615"></input>
<label for="cZeroField">  Zero:</label>
<input type="transparent" id="cZeroField" style="width: 100px; "placeholder="522 547"></input>
<label for="cPtrailField">  Ptrail:</label>
<input type="transparent" id="cPtrailField" style="width: 70px; "placeholder="522"></input>
<label for="cGapField">  Gap:</label>
<input type="transparent" id="cGapField" style="width: 70px; "placeholder="25817"></input>
<label for="cPreField">  Pre Data:</label>
<input type="transparent" id="cPreField" style="width: 70px; "placeholder="0xA55A"></input>
</div>
<!-- buttons section -->
<div class="row">
<div class="col-25">
</div>
<div class="col-75">
<input type="submit" formaction="javascript: ui_convertCodes()" style="width: 200px" value="✔ Convert"/>
<input type="submit" formaction="javascript: ui_acme('Commands')" value="🎲"/>
<input type="submit" formaction="javascript: ui_clear('Commands')" value="✖ Clear"/>
<input type="submit" formaction="javascript: ui_copyLirc()" value="✂ Copy"/>
<input type="submit" formaction="javascript: ui_freq(36)" value="✎ 36 KHz"/>
<input type="submit" formaction="javascript: ui_freq(38)" value="✎ 38 KHz"/>
<input type="submit" formaction="javascript: ui_freq(40)" value="✎ 40 KHz"/>
</div>
</div>
</div>
</form>
</div>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Pronto data field section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="container pronto" id = "fPronto">
<button class="closebutton" onclick="formHide('fPronto')">ⓧ</button>
<form name="form1">
<div class="row">
<div class="col-25">
<label for="prontoField"><h2>♕ Pronto data</h2></label>
<fieldset class="fieldset2 color-b4">
<input type="number" min="63" max="4145146" id="freqFieldPronto" style="width: 100px" placeholder="00000" list="defaultFreqs"></input>
<span">Hz</span>
<input name="wrtePrFreq" type="submit" class="small" formaction="javascript: ui_freqSet('Pronto')" value="set ⮑"/>
<input name="readPrFreq" type="submit" class="small" formaction="javascript: ui_freqRead('Pronto')" value="⮐ read"/>
</fieldset>
</div>
<div class="col-75">
<textarea type="inputText" id="prontoField" placeholder="Your pronto data, e.g.: 0000 006D 000B..."></textarea>
<!-- buttons section -->
<input type="submit" formaction="javascript: ui_convertPronto()" style="width: 200px" value="✔ Convert"/>
<input type="submit" formaction="javascript: ui_acme('Pronto')" value="🎲"/>
<input type="submit" formaction="javascript: ui_clear('prontoField')" value="✖ Clear"/>
<input type="submit" formaction="javascript: ui_paste('prontoField')" value="📋 Paste"/>
<input type="submit" formaction="javascript: ui_copy('prontoField')" value="✂ Copy"/>
</div>
</div>
</form>
</div>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Decimal field section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="container decimal" id = "fDecimal">
<button class="closebutton" onclick="formHide('fDecimal')">ⓧ</button>
<form name="form1">
<div class="row">
<div class="col-25">
<label for="decimalField"><h2>♙ Decimal</h2></label>
<fieldset class="fieldset2 color-c4">
<input type="number" min="63" max="4145146" id="freqFieldDecimal" style="width: 100px" placeholder="00000" list="defaultFreqs"></input>
<span>Hz</span>
<input name="wrtePrFreq" type="submit" class="small" formaction="javascript: ui_freqSet('Decimal')" value="set ⮑"/>
<input name="readPrFreq" type="submit" class="small" formaction="javascript: ui_freqRead('Decimal')" value="⮐ read"/>
</fieldset>
</div>
<div class="col-75">
<textarea type="inputText" id="decimalField" placeholder="Decimal values"></textarea>
<!-- buttons section -->
<input type="submit" formaction="javascript: ui_convertDecimal()" style="width: 200px" value="✔ Convert"/>
<input type="submit" formaction="javascript: ui_acme('Decimal')" value="🎲"/>
<input type="submit" formaction="javascript: ui_clear('decimalField')" value="✖ Clear"/>
<input type="submit" formaction="javascript: ui_paste('decimalField')" value="📋 Paste"/>
<input type="submit" formaction="javascript: ui_copy('decimalField')" value="✂ Copy"/>
</div>
</div>
</form>
</div>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Raw field section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="container" id = "fRawLirc">
<button class="closebutton" onclick="formHide('fRawLirc')">ⓧ</button>
<form name="form1">
<div class="row">
<div class="col-25">
<label for="rawField"><h2>♖ Raw</h2></label>
<fieldset class="fieldset2 color-a4">
<input type="number" min="63" max="4145146" id="freqFieldRaw" style="width: 100px" placeholder="00000" list="defaultFreqs"></input>
<span">Hz</span>
<input name="wrtePrFreq" type="submit" class="small" formaction="javascript: ui_freqSet('Raw')" value="set ⮑"/>
<input name="readPrFreq" type="submit" class="small" formaction="javascript: ui_freqRead('Raw')" value="⮐ read"/>
</fieldset>
</div>
<div class="col-75">
<textarea type="inputText" id='rawField' placeholder="Raw decimal values"></textarea>
<!-- buttons section -->
<input type="submit" formaction="javascript: ui_convertRaw()" style="width: 200px" value="✔ Convert"/>
<input type="submit" formaction="javascript: ui_acme('Raw')" value="🎲"/>
<input type="submit" formaction="javascript: ui_clear('rawField')" value="✖ Clear"/>
<input type="submit" formaction="javascript: ui_paste('rawField')" value="📋 Paste"/>
<input type="submit" formaction="javascript: ui_copy('rawField')" value="✂ Copy"/>
</div>
</div>
</form>
</div>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Broadlink Hex field section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="container broadlinkHex" id = "fBroadHex">
<button class="closebutton" onclick="formHide('fBroadHex')">ⓧ</button>
<form name="form1">
<div class="row">
<div class="col-25">
<label for="broadlinkField"><h2>♗ Broadlink Hex</h2></label>
<fieldset class="fieldset2 color-b4">
<span">Repeats:</span>
<input type="number" min="0" max="255" id="hexRepeats" style="width: 62px" placeholder="255"></input>
<input name="hexRepdef" type="submit" class="small" formaction="javascript: ui_hexSetRepeats()" value="set ⮑"/>
<input name="hexRepRefr" type="submit" class="small" formaction="javascript: ui_hexReadRepeats()" value="⮐ read"/>
</fieldset>
</div>
<div class="col-75">
<textarea type="inputText" id="broadlinkField" placeholder="(For Jeedom & similar)"></textarea>
<!-- buttons section -->
<input type="submit" formaction="javascript: ui_convertBroadlink()" style="width: 200px" value="✔ Convert"/>
<input type="submit" formaction="javascript: ui_acme('Broadlink')" value="🎲"/>
<input type="submit" formaction="javascript: ui_clear('broadlinkField')" value="✖ Clear"/>
<input type="submit" formaction="javascript: ui_paste('broadlinkField')" value="📋 Paste"/>
<input type="submit" formaction="javascript: ui_copy('broadlinkField')" value="✂ Copy"/>
<input type="submit" formaction="javascript: ui_copyPrefixed('broadlinkField')" value="✂ Jeedom"/>
<!-- Broadlink frequency section -->
<fieldset class="fieldset1 color-b4">
<input name="chkSig" type="submit" class="miniB" formaction="javascript: ui_freqHexCheck()" value="?"/>
<input type="radio" id="rbIR0" name="sigType" value="rbIR" checked><label for="rbIR" style="mini">IR</label>
<input type="radio" id="rbRF4" name="sigType" value="rbRF4"><label for="rbRF4" style="mini">RF 433</label>
<input type="radio" id="rbRF3" name="sigType" value="rbRF3"><label for="rbRF3" style="mini">RF 315</label>
<input name="setSig" type="submit" class="miniB" formaction="javascript: ui_freqHexSet()" value="⮝"/>
</fieldset>
</div>
</div>
</form>
</div>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Broadlink B64 field section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="container broadlinkB64" id = "fBroadB64">
<button class="closebutton" onclick="formHide('fBroadB64')">ⓧ</button>
<form name="form1">
<div class="row">
<div class="col-25">
<label for="broadB64Field"><h2>♘ Broadlink B64</h2></label>
<fieldset class="fieldset2 color-c4">
<span>Repeats:</span>
<input type="number" min="0" max="255" id="b64Repeats" style="width: 62px" placeholder="255"></input>
<input name="b64Repdef" type="submit" class="small" formaction="javascript: ui_b64SetRepeats()" value="set ⮑"/>
<input name="b64RepRefr" type="submit" class="small" formaction="javascript: ui_b64ReadRepeats()" value="⮐ read"/>
</fieldset>
</div>
<div class="col-75">
<textarea type="inputText" id="broadB64Field" placeholder="(For Home Assistant)"></textarea>
<!-- buttons section -->
<input type="submit" formaction="javascript: ui_convertB64()" style="width: 200px" value="✔ Convert"/>
<input type="submit" formaction="javascript: ui_acme('BroadB64')" value="🎲"/>
<input type="submit" formaction="javascript: ui_clear('broadB64Field')" value="✖ Clear"/>
<input type="submit" formaction="javascript: ui_paste('broadB64Field')" value="📋 Paste"/>
<input type="submit" formaction="javascript: ui_copy('broadB64Field')" value="✂ Copy"/>
<!-- Broadlink frequency section -->
<fieldset class="fieldset1 color-c4">
<input name="chkSigb64" type="submit" class="miniB" formaction="javascript: ui_freqB64Check()" value="?"/>
<input name="sigTypb64" type="radio" id="rbIR0b64" value="rbIR" checked><label for="rbIRb64" style="mini">IR</label>
<input name="sigTypb64" type="radio" id="rbRF4b64" value="rbRF4"><label for="rbRF4b64" style="mini">RF 433</label>
<input name="sigTypb64" type="radio" id="rbRF3b64" value="rbRF3"><label for="rbRF3b64" style="mini">RF 315</label>
<input name="setSigb64" type="submit" class="miniB" formaction="javascript: ui_freqB64Set()" value="⮝"/>
</fieldset>
</div>
</div>
</form>
</div>
<!----------------------------------------------------------------------------------------------------------------------------->
<!-- Tests section -->
<!----------------------------------------------------------------------------------------------------------------------------->
<div class="container Command" id = "fAnalyse">
<button class="closebutton" onclick="formHide('fAnalyse')">ⓧ</button>
<form name="form0">
<div class="row">
<div class="col-25">
<label for="testField"><h2>⚙ Raw analysis</h2></label>
<fieldset class="fieldset2 color-a4">
<span">Head. len:</span>
<input type="number" min="0" max="99" id="headerLength" style="width: 62px" placeholder="2" value="2"></input>
<span>Trailer len:</span>
<input type="number" min="0" max="99" id="trailerLength" style="width: 58px" placeholder="1" value="1"></input>
<input name="headTraildefault" type="submit" class="small" formaction="javascript: ui_headTrailReset(2,1)" value="default"/>
<input name="headTrailReset" type="submit" class="small" formaction="javascript: ui_headTrailReset(0,0)" value="reset"/>
</fieldset>
</div>
<div class="col-75">
<textarea type="inputText" id="testField" placeholder="(Input a chain in Raw field and check Analysis results here)" style="height:120px; border: 1px solid;"></textarea>
<!-- buttons section -->
<input type="submit" formaction="javascript: ui_readRaw()" style="width: 200px" value="✔ Read Raw"/>
<input type="submit" formaction="javascript: ui_acme('Analysis')" value="🧪"/>
<input type="submit" formaction="javascript: ui_clear('testField')" value="✖ Clear"/>
<input type="submit" formaction="javascript: ui_copy('testField')" value="✂ Copy"/>
<input type="submit" formaction="javascript: ui_check()" value="➀ Check"/>
<input type="submit" formaction="javascript: ui_repeats()" value="♲ Repeats"/>
<input type="submit" formaction="javascript: ui_clearAll()" value="🗑 Clear all"/>
</div>
</div>
</form>
</div>
</div>
<body>
</html>