-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
387 lines (326 loc) · 20.6 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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<html>
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta content='width=device-width' name='viewport'>
<meta name="theme-color" content="#222222">
<link rel="icon" href="http://www.openhasp.com/0.6.3/favicon.ico">
<title>Install openHASP</title>
<script type="module" src="https://unpkg.com/esp-web-tools@8.0.2/dist/web/install-button.js?module"></script>
<script src="./installer.js"></script>
<link rel="stylesheet" href="admonition.css">
<style>
body {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
padding: 0;
margin: 0;
line-height: 1.4;
}
.content {
max-width: 640px;
margin: auto;
padding: 12px;
text-align: center;
}
h2 {
margin-top: 2em;
}
h3 {
margin-top: 1.5em;
}
a, a:visited {
color: rgb(0, 189, 214);
}
.invisible {
visibility: hidden;
display: none;
}
.hidden {
display: none;
}
.footer {
margin-top: 24px;
border-top: 1px solid #888;
padding-top: 24px;
text-align: center;
}
.footer .initiative {
font-style: italic;
margin-top: 16px;
}
table {
border-collapse: collapse;
border-spacing: 0;
width:100%
}
table td:nth-child(2) { text-align: end; }
td {
padding: 0.25rem 1.2rem;
}
.container {
width: 100%;
display: none;
}
.inst-button {
padding: 5px 0;
position: relative;
}
button {
justify-content: center;
cursor: pointer;
font-size: 14px;
margin: 5px;
padding: 8px 28px;
background-color: rgb(255, 162, 0);
border: none;
border-radius: 4px;
box-shadow: rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 3px 1px -2px, rgba(0, 0, 0, 0.2) 0px 1px 5px 0px;
}
tr {
border-bottom: 1px solid #888;
}
tr:hover {
background-color: rgba(214, 175, 0, 0.25);
}
tr.skip:hover {
background-color: rgba(0, 0, 0, 0.0);
}
tr.selected:hover {
background-color: rgba(214, 160, 0, 0.9);
}
tr.selected {
background-color: rgba(214, 121, 0, 0.75);
}
.radios li {
list-style: none;
line-height: 2em;
}
@media (prefers-color-scheme: dark) {
body {
background-color: rgb(39, 37, 31);
color: #fff;
}
button {
background-color: rgba(214, 121, 0, 0.9);
color: #fff;
}
}
.flash{
width:100%;
text-align: end;
}
.display{
width:100%;
}
</style>
</head>
<body onload="installerLoaded();updateFirmware();">
<div class="content">
<h1>openHASP Nightly Development Build</h1>
<div class="admonition warning">
<div class="title">IMPORTANT</div>
<div class="content">
The internal flash partition layout of openHASP 0.7.0 has changed!</br>
Follow the <a href="https://www.openhasp.com/0.7.0/firmware/firmware-update/#serial-update">Serial Update procedure</a> if you are currently running v0.6.3 or older.
<ul>
<li>Devices coming from 0.6.3 or older with <b>4MB flash will be reformatted</b> and <b>loose all data</b>!!!</li>
<li>Devices with 8MB flash or more <i>should</i> retain the filesystem and user configuration.</li>
</ul>
It is recommended to create a backup of all your files before upgrading.
</div>
</div>
<p>Version: <select id="version" name="version">
<option value="v0.7.0-rc4_f76dee8">v0.7.0-rc4 (f76dee8) 2023-04-15</option>
</select></p>
<div>
<table id="table">
<tr class="skip"><th>Model</th><th>Flash</th><th>Display</th><th>Touch</th></tr>
<tr><td>AZ-Touch MOD<select hidden name="firmware"><option value="az-touch-mod-esp32">az-touch-mod-esp32</option></select></td><td><select class="flash" ><option value="4MB">4 MB</option><option value="8MB">8 MB</option></select></td><td>ILI9341<select hidden class="display" ><option value="ILI9341">ILI9341</option></select></td><td>XPT2406</td></tr>
<tr><td>D1 R32 Espduino<select hidden name="firmware"><option value="d1-r32-unoshield">d1-r32-unoshield</option></select></td><td>4 MB<select hidden class="flash" ><option value="4MB">4 MB</option></select></td><td><select class="display" ><option value="ILI9341_adc">ILI9341</option><option value="ILI9486_adc">ILI9486</option></select></td><td>Analog</td></tr>
<tr><td>D1 R32 Espduino<select hidden name="firmware"><option value="d1-r32-waveshare">d1-r32-waveshare</option></select></td><td>4 MB<select hidden class="flash" ><option value="4MB">4 MB</option></select></td><td><select class="display" ><option value="ILI9486">ILI9486</option><option value="ST7789">ST7789</option></select></td><td>XPT2406</td></tr>
<tr><td>ESP32 D1-mini<select hidden name="firmware"><option value="d1-mini-esp32">d1-mini-esp32</option></select></td><td>4 MB<select hidden class="flash" ><option value="4MB">4 MB</option></select></td><td>ILI9341<select hidden class="display" ><option value="ILI9341">ILI9341</option></select></td><td>XPT2406</td></tr>
<tr><td>ESP32 One<select hidden name="firmware"><option value="esp32-one">esp32-one</option></select></td><td>4 MB<select hidden class="flash" ><option value="4MB">4 MB</option></select></td><td><select class="display" ><option value="ILI9486">ILI9486</option><option value="ST7796">ST7796</option></select></td><td>XPT2406</td></tr>
<tr><td>ESP32 Touchdown<select hidden name="firmware"><option value="esp32-touchdown">esp32-touchdown</option></select></td><td>4 MB<select hidden class="flash" ><option value="4MB">4 MB</option></select></td><td>ILI9488<select hidden class="display" ><option value=""></option></select></td><td>FT6236</td></tr>
<tr><td>FreeTouchDeck<select hidden name="firmware"><option value="freetouchdeck">freetouchdeck</option></select></td><td><select class="flash" ><option value="4MB">4 MB</option><option value="8MB">8 MB</option></select></td><td>ILI9488<select hidden class="display" ><option value=""></option></select></td><td>XPT2406</td></tr>
<tr><td>Featherwing <select name="firmware" class="firmware"><option value="huzzah32-featherwing-24">2.4</option><option value="huzzah32-featherwing-35">3.5</option></select></td><td>4 MB<select hidden class="flash" ><option value="4MB">4 MB</option></select></td><td><span class="display">ILI9341</span><select hidden class="display" ><option value=""></option></select></td><td>STMPE610</td></tr>
<tr><td>GS-T3E v2.3<select hidden name="firmware" class="firmware"><option value="gs-t3e">gs-t3e</option></select></td><td>16 MB<select hidden class="flash" ><option value="16MB">16 MB</option></select></td><td><span class="display">ST7701S</span><select hidden class="display" ><option value=""></option></select></td><td>GT911</td></tr>
<tr><td>Lanbon L8<select hidden name="firmware"><option value="lanbon_l8">lanbon_l8</option></select></td><td>8 MB<select hidden class="flash" ><option value="8MB">8 MB</option></select></td><td>ST7789V<select hidden class="display" ><option value=""></option></select></td><td>FT5206</td></tr>
<tr><td>Lilygo Lily Pi<select hidden name="firmware"><option value="lilygo-lily-pi">lilygo-lily-pi</option></select></td><td>16 MB<select hidden class="flash" ><option value="16MB">16 MB</option></select></td><td><select class="display" ><option value="ILI9481">ILI9481</option><option value="ST7796">ST7796</option></select></td><td>FT5206</td></tr>
<tr><td>Lolin D32 Pro v2<select hidden name="firmware"><option value="lolin-d32-pro">lolin-d32-pro</option></select></td><td>16 MB<select hidden class="flash" ><option value="16MB">16 MB</option></select></td><td>ILI9341<select hidden class="display" ><option value="ILI9341">ILI9341</option></select></td><td>XPT2406</td></tr>
<tr><td>M5Stack Core2<select hidden name="firmware"><option value="m5stack-core2">m5stack-core2</option></select></td><td>16 MB<select hidden class="flash" ><option value="16MB">16 MB</option></select></td><td>ILI9342C<select hidden class="display" ><option value=""></option></select></td><td>FT6336U</td></tr>
<tr><td>Makerfabs TFT Touch<select hidden name="firmware"><option value="makerfabs-tft35-cap">makerfabs-tft35-cap</option></select></td><td>16 MB<select hidden class="flash" ><option value="16MB">16 MB</option></select></td><td>ILI9488<select hidden class="display" ><option value=""></option></select></td><td>FT6236</td></tr>
<tr><td>Sunton <select name="firmware"><option value="esp32-2432s028r">2432S028R</option><option value="esp32-3248s035c">3248S035C</option><option value="esp32-3248s035r">3248S035R</option><option value="sunton-4827s043c">4827S043C</option><option value="sunton-8048s043c">8048S043C</option><option value="sunton-8048s050c">8048S050C</option><option value="sunton-8048s070c">8048S070C</option></select></td><td><span class="flash">4 MB</span><select hidden class="flash" ><option value="4MB">4 MB</option></select></td><td>ILI9341<select hidden class="display" ><option value=""></option></select></td><td>XPT2406</td></tr>
<tr><td>TTGO T7 v1.5<select hidden name="firmware"><option value="ttgo-t7-v1.5">ttgo-t7-v1.5</option></select></td><td><select class="flash" ><option value="4MB">4 MB</option><option value="16MB">16 MB</option></select></td><td>ILI9341<select hidden class="display" ><option value="ILI9341">ILI9341</option></select></td><td>XPT2406</td></tr>
<tr><td>WT32-SC01<select hidden name="firmware"><option value="wt32-sc01">wt32-sc01</option></select></td><td><select class="flash" ><option value="4MB">4 MB</option><option value="16MB">16 MB</option></select></td><td>ST7796<select hidden class="display" ><option value=""></option></select></td><td>FT6336U</td></tr>
<tr><td>WT32-SC01 Plus<select hidden name="firmware"><option value="wt32-sc01-plus">wt32-sc01-plus</option></select></td><td><select class="flash" ><option value="8MB">8 MB</option><option value="16MB">16 MB</option></select></select></td><td>ST7796<select hidden class="display" ><option value=""></option></select></td><td>FT6336U</td></tr>
<tr><td>WT-86-32-3ZW1<select hidden name="firmware"><option value="wt-86-32-3zw1">wt-86-32-3zw1</option></select></td><td>16 MB<select hidden class="flash" ><option value="16MB">16 MB</option></select></td><td>ILI9488<select hidden class="display" ><option value=""></option></select></td><td>GSL1680</td></tr>
<tr><td>Yeacreate Nscreen32<select hidden name="firmware"><option value="yeacreate-nscreen32">yeacreate-nscreen32</option></select></td><td>16 MB<select hidden class="flash" ><option value="16MB">16 MB</option></select></td><td>ST7796<select hidden class="display" ><option value=""></option></select></td><td>GT911</td></tr>
</table>
<p>
<div id="firmware"><b>Select your device</b></div>
<div id="ota"><b></b></div>
</p>
<div class="container" id="support">Chrome and Edge support flashing devices online from within the browser window.</br>Please use another browser or click 'Download' to flash the firmware offline.</div>
<div class="container" id="inst-button">
<esp-web-install-button id="inst" manifest="assets/json/d1-mini-esp32_ili9341_full_4MB.json" hide-progress>
<button slot="activate">INSTALL</button>
<span slot="unsupported"></span>
<span slot="not-allowed"></span>
</esp-web-install-button>
<a id="link" href=""><button>DOWNLOAD</button></a>
<div class="container" id="support">Chrome and Edge support flashing devices online from within the browser window.</br>Please use another browser or click 'Download' to flash the firmware offline.</div>
</div>
<div class="container" id="az-touch-mod-esp32">
<div class="row justify-content-center">
<a href="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-mod-24.jpg" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-6" data-title="AZ-Touch wall enclosure set with 2.4" touchscreen" data-footer="Copyright <a href='https://www.az-delivery.de/'>az-delivery.de,</a> All Rights Reserved - Used with permission">
<img src="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-mod-24.jpg" class="img-fluid">
</a>
<a href="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-mod-28.jpg" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-6" data-title="AZ-Touch wall enclosure set with 2.8" touchscreen" data-footer="Copyright <a href='https://www.az-delivery.de/'>az-delivery.de,</a> All Rights Reserved - Used with permission">
<img src="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-mod-28.jpg" class="img-fluid">
</a>
</div>
<div>
<a href="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-pcb-front.jpg" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-6" data-title="Assembled AZ-Touch PCB" data-footer="Copyright <a href='https://www.az-delivery.de/'>az-delivery.de,</a> All Rights Reserved - Used with permission">more images...</a>
<a href="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-pcb-back.jpg" data-toggle="lightbox" data-gallery="example-gallery" rel="lightbox[work]" data-title="AZ-Touch Top PCB with headers" data-footer="Copyright <a href='https://www.az-delivery.de/'>az-delivery.de,</a> All Rights Reserved - Used with permission"></a>
<a href="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-pcb-back.jpg" data-toggle="lightbox" data-gallery="example-gallery" rel="lightbox[vacation]" data-title="AZ-Touch Bottom PCB with MCU" data-footer="Copyright <a href='https://www.az-delivery.de/'>az-delivery.de,</a> All Rights Reserved - Used with permission"></a>
<a href="https://www.openhasp.com/0.6.3/assets/images/devices/az-touch-pcb-side.jpg" data-toggle="lightbox" data-gallery="example-gallery" rel="lightbox[vacation]" data-title="AZ-Touch PCB Side View" data-footer="Copyright <a href='https://www.az-delivery.de/'>az-delivery.de,</a> All Rights Reserved - Used with permission"></a>
</div>
</div>
<p>
<a href="https://www.paypal.com/donate/?business=E76SN28JLZCXU&currency_code=EUR"><img alt="Paypal donation" src="https://img.shields.io/badge/Paypal-donate-00457C?style=for-the-badge&logo=paypal"></a>
<a href="https://ko-fi.com/openhasp"><img alt="Buy a coffee" src="https://img.shields.io/badge/Kofi-donate-FF5E5B?style=for-the-badge&logo=kofi"></a>
<a href="https://www.buymeacoffee.com/aktdCofU"><img alt="Buy me a coffee" src="https://img.shields.io/badge/Buy_Me_a_Coffee-donate-FFDD00?style=for-the-badge&logo=buymeacoffee"></a>
</p>
<div class="footer">
<a href="https://www.openhasp.com/0.7.0/">openHASP v0.7.0</a> Web Installer powered by <a href="https://esphome.github.io/esp-web-tools/">ESP Web Tools</a>.
</div>
</div>
</div>
<script>
function updateFirmware(){
document.querySelectorAll('tr').forEach(function(row) {
row.querySelectorAll('select[name="firmware"]').forEach(function(item) {
// let firmware = document.getElementById('firmware');
firmware = item.value.toLowerCase();
// Adjust Display driver for Featherwing displays
if (firmware == 'huzzah32-featherwing-24') {
row.querySelectorAll('span[class="display"]').forEach(function(span) {
span.innerHTML = 'ILI9341';
});
} else if (firmware == 'huzzah32-featherwing-35') {
row.querySelectorAll('span[class="display"]').forEach(function(span) {
span.innerHTML = 'HX8357D';
});
} else if (firmware.startsWith("sunton-8048")||firmware.startsWith("sunton-4827")) {
row.querySelectorAll('span[class="flash"]').forEach(function(span) {
span.innerHTML = '16 MB';
});
row.querySelectorAll('select[class="flash"]').forEach(function(select) {
select.options.item(0).value = '16MB';
});
} else if (firmware.startsWith("esp32-2432")||firmware.startsWith("esp32-3248")) {
row.querySelectorAll('span[class="flash"]').forEach(function(span) {
span.innerHTML = '4 MB';
});
row.querySelectorAll('select[class="flash"]').forEach(function(select) {
select.options.item(0).value = '4MB';
});
}
});
});
}
function updateSelected(){
updateFirmware();
document.querySelectorAll('tr[class="selected"]').forEach( row => {
let firmware="";
let display="";
let flash="";
row.querySelectorAll('select[name="firmware"]').forEach(function(item) {
// let firmware = document.getElementById('firmware');
firmware = item.value.toLowerCase();
});
row.querySelectorAll('select[class="display"]').forEach(function(item) {
// let display = document.getElementById('display');
display = item.value.toLowerCase();
});
row.querySelectorAll('select[class="flash"]').forEach(function(item) {
// let flash = document.getElementById('flash');
flash = item.value
});
if (display != "") display = "_" + display;
if (flash != "") flash = "_" + flash;
let manifest = "firmware/" + firmware + display + "_full" + flash + ".json";
const button = document.querySelector('esp-web-install-button');
button.manifest = manifest;
// button.classList.remove('invisible');
var version = document.getElementById("version");
var bin_file = firmware + display + "_full" + flash + "_" + version.value + ".bin";
var bin = document.getElementById("firmware");
bin.innerHTML = "<b>Full firmware:</b> <a href=\"firmware/" + bin_file + "\">" + bin_file + "</a>";
var ota_file = firmware + display + "_ota_" + version.value + ".bin"
var ota = document.getElementById("ota");
ota.innerHTML = "<b>OTA firmware:</b> <a href=\"firmware/" + ota_file + "\">" + ota_file + "</a>";
var link = document.getElementById("link");
link.href = "firmware/" + firmware + display + "_full" + flash + "_" + version.value + ".bin";
var buttons = document.getElementById("inst-button");
buttons.style.display = 'block';
});
}
function selectedRow(){
var index,
table = document.getElementById("table");
for(var i = 1; i < table.rows.length; i++)
{
table.rows[i].onclick = function()
{
// remove the background from the previous selected row
if(typeof index !== "undefined"){
table.rows[index].classList.toggle("selected");
}
// console.log(typeof index);
// get the selected row index
index = this.rowIndex;
// add class selected to the row
this.classList.toggle("selected");
// console.log(typeof index);
updateSelected();
};
}
}
selectedRow();
updateSelected();
const queryString = window.location.search;
console.log(queryString);
const urlParams = new URLSearchParams(queryString);
const fw = urlParams.get('fw')
console.log(fw);
document.querySelectorAll('select[class=firmware]').forEach(sel =>
sel.addEventListener("change", (sel) => {
// console.log(sel);
// let flash = document.getElementById('flash');
// flash.value = sel.target.value
updateSelected();
}
));
document.querySelectorAll('select[class=flash]').forEach(sel =>
sel.addEventListener("change", (sel) => {
// console.log(sel);
// let flash = document.getElementById('flash');
// flash.value = sel.target.value
updateSelected();
}
));
document.querySelectorAll('select[class=display]').forEach(sel =>
sel.addEventListener("change", (sel) => {
// console.log(sel);
// let display = document.getElementById('display');
// display.value = sel.target.value
updateSelected();
}
));
</script>
<!-- Cloudflare Web Analytics -->
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "3334aea471f54b00ad3b8a968094f2a6"}'></script>
<!-- End Cloudflare Web Analytics -->
</body>
</html>