-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_captureraw.php
76 lines (66 loc) · 2.6 KB
/
test_captureraw.php
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
<html>
<head>
<?php
/*
this page is for test local DB
Copyright (c) 2017 Marco Sillano. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
$d=dirname(__FILE__);
require_once ("$d/irp_commonSQL.php");
require_once ("$d/irp_remotedb_tools.php");
$remotes = getRemotesOptionList();
$protocols = getProtocolsOptionList();
$codes = optionsList("SELECT DISTINCT code, code FROM irp_remcommands", '0');
if (strpos($codes, "value='0'") === false)
$codes = "<option value='0' selected >0-default</opton>".$codes;
echo StyleSheet();
$message ='';
$page='-1';
?>
</head>
<body>
<h1> Capture RAW for any remote </h1>
<hr>
<div class='note'>
This example page make easy to capture RAW stream from remote controls.
<UL>
<LI>This application fills RAW1 field in <code>irp_streams</code> and link it to remote.
<LI>Click a pink key in simulated remote, then, when Arduino red led is on, click same key on remote control.
<LI>Using free 'serial extension', you have usual limits: to restart server before any test.
<LI>After you must run the <a href='test_fillUpd.php'>fill/update</a> tool.
</UL>
For real applications you must use a better communication tool: I planned to use the USBphpTunnel (<a href='https://sourceforge.net/projects/usbphptunnel/'>sourceforge</a>) that solves all connection problems, or you can use an Arduino-yun.
</div>
<hr>
<form action = 'usr_rawremote.php' mode='GET'>
Remote:
<select name='remote'>
<?php echo $remotes; ?>
</select>
Code:
<select name='code'>
<?php echo $codes; ?>
</select>
<i>for multi protocol programmable remote, select a code.</i> <br>
Protocol:
<select name='protocol'>
<option value='none' selected >default</opton>
<?php echo $protocols; ?>
</select><br><br>
<hr>
<input type ='submit' name= 'toRemote' value='Go >> '>
</form>
<hr>
<center><<< <a href="index.html" >Back</a> </center>
</body></head>