Merge pull request #2754 from ExpressLRS/merge-3.4.2-into-master
[ExpressLRS.git] / src / html / index.html
blobd35c0a876f55475b2084d575e21e5345d0533236
1 @@require(PLATFORM, VERSION, isTX, hasSubGHz)
2 <!DOCTYPE HTML>
3 <html lang="en">
5 <head>
6 <title>Welcome to your ExpressLRS System</title>
7 <meta charset="utf-8" />
8 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 <link rel="stylesheet" href="elrs.css" />
10 </head>
12 <body>
13 <header class="mui-appbar mui--z1 mui--text-center elrs-header">
14 @@include("logo-template.svg")
15 <h1><b>ExpressLRS</b></h1>
16 <span id="product_name"></span><br/>
17 <b>Firmware Rev. </b>@@{VERSION} <span id="reg_domain"></span>
18 </header>
19 <br/>
20 <div class="mui-container-fluid">
21 <div class="mui-panel mui-col-sm-10 mui-col-sm-offset-1">
23 <ul class="mui-tabs__bar mui-tabs__bar--justified">
24 @@if not isTX:
25 <li><a data-mui-toggle="tab" data-mui-controls="pane-justified-3">Model</a></li>
26 @@end
27 <li><a data-mui-toggle="tab" data-mui-controls="pane-justified-1">Options</a></li>
28 <li><a id="network-tab" data-mui-toggle="tab" data-mui-controls="pane-justified-4">WiFi</a></li>
29 @@if isTX:
30 <li id="button-tab"><a data-mui-toggle="tab" data-mui-controls="pane-justified-3">Buttons</a></li>
31 @@end
32 <li><a data-mui-toggle="tab" data-mui-controls="pane-justified-2">Update</a></li>
33 </ul>
35 <div class="mui-tabs__pane" id="pane-justified-1">
36 <div class="mui-panel">
37 <h2>Runtime Options</h2>
38 This form <b>overrides</b> the options provided when the firmware was flashed. These changes will persist across reboots, but <b>will be reset</b> when the firmware is reflashed.
39 @@if isTX:
40 Note: The Binding phrase is <b>not</b> remembered, it is a temporary field used to generate the binding UID.
41 <br/><br/>
42 <div class="mui-textfield">
43 <input type="text" id="phrase" name="phrase" placeholder="Binding Phrase" />
44 <label for="phrase">Binding Phrase</label>
45 </div>
46 <form id='upload_options' method='POST' action="/options">
47 <div class="mui-textfield">
48 <label for='uid'><span id="uid-text"></span></label>
49 <span class="badge" id="uid-type"></span>
50 <input size='40' id='uid' name='uid' type='text' class='array' readonly/>
51 </div>
52 @@else:
53 <br/><br/>
54 <form id='upload_options' method='POST' action="/options">
55 @@end
56 @@if hasSubGHz:
57 <div class="mui-select">
58 <select id='domain' name='domain'>
59 <option value='0'>AU915</option>
60 <option value='1'>FCC915</option>
61 <option value='2'>EU868</option>
62 <option value='3'>IN866</option>
63 <option value='4'>AU433</option>
64 <option value='5'>EU433</option>
65 <option value='6'>US433</option>
66 <option value='7'>US433-Wide</option>
67 </select>
68 <label for="domain">Regulatory domain</label>
69 </div>
70 @@end
71 <div class="mui-textfield">
72 <input size='3' id='wifi-on-interval' name='wifi-on-interval' type='text' placeholder="Disabled"/>
73 <label for="wifi-on-interval">WiFi "auto on" interval in seconds (leave blank to disable)</label>
74 </div>
75 @@if isTX:
76 <div class="mui-textfield">
77 <input size='5' id='tlm-interval' name='tlm-interval' type='text'/>
78 <label for="tlm-interval">TLM report interval (ms)</label>
79 </div>
80 <div class="mui-textfield">
81 <input size='3' id='fan-runtime' name='fan-runtime' type='text'/>
82 <label for="fan-runtime">Fan runtime (s)</label>
83 </div>
84 <div id="has-highpower" class="mui-checkbox" style="display: none;">
85 <input id='unlock-higher-power' name='unlock-higher-power' type='checkbox'/>
86 <label for="unlock-higher-power">Unlock higher power</label>
87 </div>
88 <div class="mui-checkbox">
89 <input id='is-airport' name='is-airport' type='checkbox'/>
90 <label for="is-airport">Use as AirPort Serial device</label>
91 </div>
92 <div class="mui-textfield">
93 <input size='7' id='airport-uart-baud' name='airport-uart-baud' type='text'/>
94 <label for="airport-uart-baud">AirPort UART baud</label>
95 </div>
96 @@else:
97 <div id="baud-config" class="mui-textfield" style="display: block;">
98 <input size='7' id='rcvr-uart-baud' name='rcvr-uart-baud' type='text'/>
99 <label for="rcvr-uart-baud">UART baud</label>
100 </div>
101 <div class="mui-checkbox">
102 <input id='lock-on-first-connection' name='lock-on-first-connection' type='checkbox'/>
103 <label for="lock-on-first-connection">Lock on first connection</label>
104 </div>
105 <div class="mui-checkbox">
106 <input id='is-airport' name='is-airport' type='checkbox'/>
107 <label for="is-airport">Use as AirPort Serial device</label>
108 </div>
109 @@end
110 <button id='submit-options' class="mui-btn mui-btn--primary" disabled>Save</button>
111 <div id="reset-options" style="display: none;">
112 <a class="mui-btn mui-btn--small mui-btn--danger">Reset runtime options to defaults</a>
113 </div>
114 <input type="hidden" id="flash-discriminator" name="flash-discriminator"/>
115 <input type="hidden" id="wifi-ssid" name="wifi-ssid"/>
116 <input type="hidden" id='wifi-password' name='wifi-password'/>
117 </form>
118 </div>
119 @@if isTX:
120 <div class="mui-panel">
121 <h2>Import/Export</h2>
122 <br/>
123 <div>
124 <a href="/config?export" download="models.json" target="_blank" class="mui-btn mui-btn--small mui-btn--dark">Save model configuration file</a>
125 </div>
126 <div>
127 <button class="mui-btn mui-btn--small mui-btn--primary upload">
128 <label>
129 Upload model configuration file
130 <input type="file" id="fileselect" name="fileselect[]" />
131 </label>
132 </button>
133 </div>
134 </div>
135 @@end
136 </div>
138 <div class="mui-tabs__pane" id="pane-justified-2">
139 <div class="mui-panel">
140 <h2>Firmware Update</h2>
141 Choose a file to update module firmware. Select the correct .bin file for @@{PLATFORM} otherwise a bad flash may occur.
142 If this happens you will need to recover via USB/Serial. You may also download the
143 <a href="firmware.bin" title="Click to download firmware">currently running firmware</a>.
144 <br/><br/>
145 @@if (PLATFORM.find('8285')>=0):
146 <div class="mui-panel" style="background-color: #fcecae;text-align:center;">Do NOT decompress/unzip/extract the firmware.bin.gz file, upload the file as it is.</div>
147 <br/>
148 @@end
149 <button id="upload_btn" class="mui-btn mui-btn--primary upload" style="margin: 0 auto; display:block;">
150 <label>
151 Select firmware file
152 <input type="file" id="firmware_file" name="update[]" />
153 </label>
154 </button>
155 <div id="filedrag">or drop firmware file here</div>
156 <br/>
157 <h3 id="status"></h3>
158 <progress id="progressBar" value="0" max="100" style="width:100%;"></progress>
159 </div>
160 </div>
162 @@if isTX:
163 <div class="mui-tabs__pane" id="pane-justified-3">
164 <div class="mui-panel">
165 <h2>Button Actions</h2>
166 Specify which actions to perform when clicking or long pressing module buttons.
167 <br/><br/>
168 <form class="mui-form" id='button_actions'>
169 <table class="mui-table">
170 <tbody id="button-actions"></tbody>
171 </table>
172 <div id="button1-color-div" style="display: none;">
173 <input id='button1-color' name='button1-color' type='color'/>
174 <label for="button1-color">User button 1 color</label>
175 </div>
176 <div id ="button2-color-div" style="display: none;">
177 <input id='button2-color' name='button2-color' type='color'/>
178 <label for="button2-color">User button 2 color</label>
179 </div>
180 <button id="submit-actions" class="mui-btn mui-btn--primary">Save</button>
181 </form>
182 </div>
183 </div>
184 @@end
185 @@if not isTX:
186 <div class="mui-tabs__pane" id="pane-justified-3">
187 <div class="mui-panel">
188 <div id="model_tab">
189 <h2>PWM Output</h2>
190 Set PWM output mode and failsafe positions.
191 <ul>
192 <li><b>Output:</b> Receiver output pin</li>
193 <li><b>Features:</b> If an output is capable of supporting another function, that is indicated here</li>
194 <li><b>Mode:</b> Output frequency, 10KHz 0-100% duty cycle, binary On/Off, DShot, Serial, or I2C (some options are pin dependant)</li>
195 <ul>
196 <li>When enabling serial pins, be sure to select the <b>Serial Protocol</b> below and <b>UART baud</b> on the <b>Options</b> tab</li>
197 </ul>
198 <li><b>Input:</b> Input channel from the handset</li>
199 <li><b>Invert:</b> Invert input channel position</li>
200 <li><b>750us:</b> Use half pulse width (494-1006us) with center 750us instead of 988-2012us</li>
201 <li><b>Failsafe</b>
202 <ul>
203 <li>"Set Position" sets the servo to an absolute "Failsafe Pos"
204 <ul>
205 <li>Does not use "Invert" flag</li>
206 <li>Value will be halved if "750us" flag is set</li>
207 <li>Will be converted to binary for "On/Off" mode (>1500us = HIGH)</li>
208 </ul>
209 </li>
210 <li>"No Pulses" stops sending pulses
211 <ul>
212 <li>Unpowers servos</li>
213 <li>May disarm ESCs</li>
214 </ul>
215 </li>
216 <li>"Last Position" continues sending last received channel position</li>
217 </ul>
218 </li>
219 </ul>
220 <form action="/pwm" id="pwm" method="POST">
221 </form>
222 </div>
223 <form class="mui-form" action='/config' id='config' method='POST'>
224 <h2>Binding Phrase</h2>
225 <div class="mui-checkbox">
226 <input id="vbind" name="vbind" type="checkbox" value="1"/>
227 <label for="vbind">Never store bind information across reboots (volatile binding)</label>
228 </div>
229 <div id="bindphrase">
230 Enter a new binding phrase to replace the current binding information.
231 This will persist across reboots, but <b>will be reset</b> if the firmware is flashed with a binding phrase.
232 Note: The Binding phrase is not remembered, it is a temporary field used to generate the binding UID.
233 <br/><br/>
234 <div class="mui-textfield">
235 <input type="text" id="phrase" name="phrase" placeholder="Binding Phrase" />
236 <label for="phrase">Binding Phrase</label>
237 </div>
238 <div class="mui-textfield">
239 <label for="uid"><span id="uid-text"></span></label>
240 <span class="badge" id="uid-type"></span>
241 <input size="40" id="uid" name="uid" type="text" class="array" readonly/>
242 </div>
243 </div>
244 <div id="serial-config">
245 <h2>Serial Protocol</h2>
246 Set the protocol used to communicate with the flight controller or other external devices.
247 <br/><br/>
248 <div class="mui-select">
249 <select id='serial-protocol' name='serial-protocol'>
250 <option value='0'>CRSF</option>
251 <option value='1'>Inverted CRSF</option>
252 <option value='2'>SBUS</option>
253 <option value='3'>Inverted SBUS</option>
254 <option value='4'>SUMD</option>
255 <option value='5'>DJI RS Pro</option>
256 <option value='6'>HoTT Telemetry</option>
257 </select>
258 <label for='serial-protocol'>Serial Protocol</label>
259 </div>
260 </div>
261 <div id="serial1-config">
262 <div class="mui-select">
263 <select id='serial1-protocol' name='serial1-protocol'>
264 <option value='0'>NONE</option>
265 <option value='1'>CRSF</option>
266 <option value='2'>Inverted CRSF</option>
267 <option value='3'>SBUS</option>
268 <option value='4'>Inverted SBUS</option>
269 <option value='5'>SUMD</option>
270 <option value='6'>DJI RS Pro</option>
271 <option value='7'>HoTT Telemetry</option>
272 </select>
273 <label for='serial1-protocol'>Serial2 Protocol</label>
274 </div>
275 </div>
276 <div id="sbus-config" style="display: none;">
277 <h2>SBUS Failsafe</h2>
278 Set the failsafe behaviour when using the SBUS protocol:<br/>
279 <ul>
280 <li>"No Pulses" stops sending SBUS data when a connection to the transmitter is lost</li>
281 <li>"Last Position" continues to send the last received channel data along with the FAILSAFE bit set</li>
282 </ul>
283 <br/>
284 <div class="mui-select">
285 <select id='sbus-failsafe' name='serial-failsafe'>
286 <option value='0'>No Pulses</option>
287 <option value='1'>Last Position</option>
288 </select>
289 <label for="sbus-failsafe">SBUS Failsafe</label>
290 </div>
291 </div>
293 <h2>Model Match</h2>
294 Specify the 'Receiver' number in OpenTX/EdgeTX model setup page and turn on the 'Model Match'
295 in the ExpressLRS Lua script for that model. 'Model Match' is between 0 and 63 inclusive.
296 <br/><br/>
297 <div class="mui-checkbox">
298 <input id='model-match' name='model-match' type='checkbox'/>
299 <label for="model-match">Enable Model Match</label>
300 </div>
301 <div class="mui-textfield">
302 <input id='modelid' type='text' name='modelid' value="255" required/>
303 <label for="modelid">Model ID</label>
304 </div>
305 <h2>Force telemetry off</h2>
306 When running multiple receivers simultaneously from the same TX (to increase the number of PWM servo outputs), there can be at most one receiver with telemetry enabled.<br>Enable this option to ignore the "Telem Ratio" setting on the TX and never send telemetry from this receiver.
307 <br/><br/>
308 <div class="mui-checkbox">
309 <input id='force-tlm' name='force-tlm' type='checkbox' value="1"/>
310 <label for="force-tlm">Force telemetry OFF on this receiver</label>
311 </div>
312 <button type='submit' class="mui-btn mui-btn--small mui-btn--primary">Save</button>
313 </form>
314 </div>
315 <div class="mui-panel">
316 <a id="reset-model" href="#">Reset all model settings to defaults (includes binding).</a>
317 </div>
318 </div>
319 @@end
321 <div class="mui-tabs__pane" id="pane-justified-4">
322 <div class="mui-panel">
323 <h2 id="apmode" style="display:none;">Currently in Access Point mode</h2>
324 <h2 id="stamode" style="display:none;">Current Home network: <span id="ssid"></span></h2>
325 Here you can join a network and it will be saved as your Home network. When you enable WiFi in range of your Home network,
326 ExpressLRS will automatically connect to it. In Access Point (AP) mode, the network name is ExpressLRS TX or ExpressLRS RX
327 with password "expresslrs".
328 <br/>
329 <br/>
330 <form id="sethome" method="POST" autocomplete="off" class="mui-form">
331 <div class="mui-radio">
332 <input type="radio" id="nt0" name="networktype" value="0" checked>
333 <label for="nt0">Set new Home network</label>
334 </div>
335 <div class="mui-radio">
336 <input type="radio" id="nt1" name="networktype" value="1">
337 <label for="nt1">One-time connect to network, retain Home network setting</label>
338 </div>
339 <div class="mui-radio">
340 <input type="radio" id="nt2" name="networktype" value="2">
341 <label for="nt2">Start AP mode, retain Home network setting</label>
342 </div>
343 <div class="mui-radio">
344 <input type="radio" id="nt3" name="networktype" value="3">
345 <label for="nt3">Forget Home network setting, always use AP mode</label>
346 </div>
347 <br/>
348 <div id="credentials">
349 <div class="autocomplete mui-textfield" style="position:relative;">
350 <div id="loader" style="position:absolute;right:0;width: 28px;height: 28px;" class="loader"></div>
351 <input id="network" type="text" name="network" placeholder="SSID"/>
352 <label for="network">WiFi SSID</label>
353 </div>
354 <div class="mui-textfield">
355 <input size='64' id='password' name='password' type='password'/>
356 <label for="password">WiFi password</label>
357 </div>
358 </div>
359 <button type="submit" class="mui-btn mui-btn--primary">Confirm</button>
360 </form>
361 </div>
362 <div class="mui-panel">
363 <a id="connect" href="#">Connect to Home network: <span id="homenet"></span></a>
364 </div>
365 </div>
366 </div>
367 </div>
368 @@include("footer-template.html")
369 </body>
370 <script src="mui.js"></script>
371 <script src="scan.js"></script>
372 </html>