forked from darthcloud/BlueRetroWebCfg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathota.html
40 lines (34 loc) · 1.3 KB
/
ota.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
---
feature_name: BlueRetro OTA FW update
icon_url: icon.png
index: index.html
---
{% include_relative _includes/intro.html %}
<!-- Base on https://www.html5rocks.com/en/tutorials/file/dndfiles// -->
<div id="divBtConn">
<button id="btConn">Connect BlueRetro</button><br>
<small><i>Disconnect all controllers from BlueRetro before connecting for update.</i></small>
</div>
<div id="divInfo" style="display:none;margin-bottom:1em;"></div>
<div id="divFwSelect" style="display:none;margin-bottom:1em;">
Select firmware:
<input type="file" id="fwFile" name="fw.bin"/><br>
<button id="btnFwUpdate">Update Firmware</button>
</div>
<div id="divFwUpdate" style="display:none;margin-bottom:1em;">
<div id="progress_bar"><div class="percent"></div></div>
<button id="btnFwUpdateCancel">Cancel</button>
</div>
{% include output_helper.html %}
<script src="ota.js" type="text/javascript"></script>
<script>
document.getElementById("btnFwUpdate").addEventListener('click', firmwareUpdate);
document.getElementById("btnFwUpdateCancel").addEventListener('click', abortFwUpdate);
document.getElementById("btConn").addEventListener('click', function() {
if (isWebBluetoothEnabled()) {
ChromeSamples.clearLog();
btConn();
}
});
</script>
{% include_relative _includes/utils.html %}