update pintest sidebar
[matches/MCTX3420.git] / testing / MCTXWeb / public_html / pintest.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3   <head>
4     <title>BeagleBone Black Pin Test</title>
5     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6     <!--[if lte IE 8]>
7       <script language="javascript" type="text/javascript" src="static/excanvas.min.js"></script>
8     <![endif]-->
9     <script type="text/javascript" src="static/jquery-1.10.1.min.js"></script>
10     <script type="text/javascript" src="static/jquery.flot.min.js"></script>
11     <script type="text/javascript" src="static/base64.js"></script>
12     <script type="text/javascript" src="static/mctx.gui.js"></script>
13     <script type="text/javascript" src="static/mctx.pintest.js"></script>
14     
15     <link rel="stylesheet" type="text/css" href="static/style.css">
16     <link rel="stylesheet" type="text/css" href="static/nav-menu.css">
17     <script type="text/javascript">
18       $(document).ready(function () {
19         $("#errorlog").setErrorLog();
20         $("#gpio-menu").populateDropdown(mctx.pintest.gpios, "GPIO ");
21         $("#pwm-menu").populateDropdown(mctx.pintest.pwms, "PWM ");
22         
23         $("#gpio-go").click(function () {
24           if ($("#gpio-menu").val()) {
25             $("#gpio-container").exportGPIO($("#gpio-menu"));
26           }
27         });
28         $("#pwm-go").click(function () {
29           if ($("#pwm-menu").val()) {
30             $("#pwm-container").exportPWM($("#pwm-menu"));
31           }
32         });
33         $("#adc-controls").trigger("reset").setADCControl();
34       });
35     </script>
36   </head>
37   
38   <body>
39     <div id="header">
40       <div id="leftnav">
41         <a href="http://www.uwa.edu.au/" target="_blank">
42           <img alt = "The University of Western Australia"
43           src="static/uwacrest-text.png">
44         </a>
45         <span id="title">BBB pin test</span>
46       </div>
47       <div id="rightnav">
48         <div id="menu-container" class="nav-menu">
49         </div>
50         <span id="date">
51           <script type="text/javascript">getDate();</script>
52         </span>
53       </div>
54       <div class="clear"></div>
55     </div>
56     <!-- End header -->
57     
58     <div id="content">
59       <div id="sidebar">
60         <div class="widget">
61           <div class="title">Info</div>
62           <p>This test page gives control over the BBB's pins.
63           Select a pin that you wish to use from the relevant drop-down
64           menu and click 'Go'.</p>
65           <p>A new widget will appear with controls relevant to that pin.</p>
66           <p>Make sure to check the error log to see if something goes wrong.</p>
67         </div>
68         <div class="widget">
69           <div class="title">Pin out diagram</div>
70           <p>To see the pin out diagram of the BBB, click <a href="pinout-table.pdf" target="_blank">here</a>.</p>
71         </div>
72         <div class="widget">
73           <div class="title">Export/Unexport?</div>
74           <p>
75             To export/unexport a pin means to enable/disable it. Apart from the obvious
76             use case, sometimes this can be required if you use two PWM channels
77             that share the same frequency base.
78           </p>
79           <p>
80             You won't be able to change
81             the frequency until you unexport one of them.
82           </p>
83         </div>
84         <div class="widget">
85           <div class="title">PWM explained</div>
86           <p>The frequency must be a decimal number greater than 0.</p>
87           <p>
88             The duty cycle describes the proportion of off/on time per period.
89             This number is specified as a ratio, with values ranging from 0 to 1.
90           </p>
91           <p>
92             The polarity determines if the duty represents the 'active
93             high' or 'active low' portion. By default, the duty cycle
94             represents the 'active high' portion.
95           </p>
96         </div>
97       </div>
98       <!-- End sidebar -->
99
100       <div id="main">
101         <div class="widget">
102           <div class="title">Dashboard</div>
103           <table>
104             <tr>
105               <td>
106                 GPIO <select id="gpio-menu"></select>
107                 <input type="button" id="gpio-go" value="Go">
108               </td>
109               <td>
110                 PWM <select id="pwm-menu"></select>
111                 <input type="button" id="pwm-go" value="Go">
112               </td>
113             </tr>
114           </table>
115             
116           <div class="sub-title">Error log</div>
117           <textarea id="errorlog" wrap="off" rows="4" cols="30" readonly></textarea>
118         </div>
119
120         <div class="widget">
121           <div class="title">Analogue input (ADC)</div>
122           <form class="controls" action="#" id="adc-controls">
123             <table class="centre">
124               <tr>
125                 <td>AIN</td><th>0</th><th>1</th><th>2</th><th>3</th>
126                 <th>4</th><th>5</th><th>6</th><th>7</th>
127               </tr>
128               <tr>
129                 <td>Value</td>
130                 <td><input name="0" type="text" readonly></td>
131                 <td><input name="1" type="text" readonly></td>
132                 <td><input name="2" type="text" readonly></td>
133                 <td><input name="3" type="text" readonly></td>
134                 <td><input name="4" type="text" readonly></td>
135                 <td><input name="5" type="text" readonly></td>
136                 <td><input name="6" type="text" readonly></td>
137                 <td><input name="7" type="text" readonly></td>
138               </tr>
139               <tr>
140                 <td>Export</td>
141                 <td><input name="0" type="checkbox"></td>
142                 <td><input name="1" type="checkbox"></td>
143                 <td><input name="2" type="checkbox"></td>
144                 <td><input name="3" type="checkbox"></td>
145                 <td><input name="4" type="checkbox"></td>
146                 <td><input name="5" type="checkbox"></td>
147                 <td><input name="6" type="checkbox"></td>
148                 <td><input name="7" type="checkbox"></td>
149               </tr>
150             </table>
151           </form>
152         </div>
153         
154         <div class="widget" id="gpio-container">
155           <div class="title">GPIO controls</div>
156         </div>
157         
158         <div class="widget" id="pwm-container">
159           <div class="title">PWM controls</div>
160         </div>
161       </div>
162       <!-- End main content -->
163     </div>
164   </body>
165 </html>

UCC git Repository :: git.ucc.asn.au