Browse Source

Check binary flash mode in web upgrade

pull/987/head
Xose Pérez 6 years ago
parent
commit
0371a193d6
11 changed files with 7136 additions and 7114 deletions
  1. BIN
      code/espurna/data/index.all.html.gz
  2. BIN
      code/espurna/data/index.light.html.gz
  3. BIN
      code/espurna/data/index.rfbridge.html.gz
  4. BIN
      code/espurna/data/index.sensor.html.gz
  5. BIN
      code/espurna/data/index.small.html.gz
  6. +1795
    -1793
      code/espurna/static/index.all.html.gz.h
  7. +1673
    -1670
      code/espurna/static/index.light.html.gz.h
  8. +1228
    -1226
      code/espurna/static/index.rfbridge.html.gz.h
  9. +1194
    -1191
      code/espurna/static/index.sensor.html.gz.h
  10. +1234
    -1232
      code/espurna/static/index.small.html.gz.h
  11. +12
    -2
      code/html/custom.js

BIN
code/espurna/data/index.all.html.gz View File


BIN
code/espurna/data/index.light.html.gz View File


BIN
code/espurna/data/index.rfbridge.html.gz View File


BIN
code/espurna/data/index.sensor.html.gz View File


BIN
code/espurna/data/index.small.html.gz View File


+ 1795
- 1793
code/espurna/static/index.all.html.gz.h
File diff suppressed because it is too large
View File


+ 1673
- 1670
code/espurna/static/index.light.html.gz.h
File diff suppressed because it is too large
View File


+ 1228
- 1226
code/espurna/static/index.rfbridge.html.gz.h
File diff suppressed because it is too large
View File


+ 1194
- 1191
code/espurna/static/index.sensor.html.gz.h
File diff suppressed because it is too large
View File


+ 1234
- 1232
code/espurna/static/index.small.html.gz.h
File diff suppressed because it is too large
View File


+ 12
- 2
code/html/custom.js View File

@ -309,11 +309,17 @@ function checkFirmware(file, callback) {
reader.onloadend = function(evt) {
if (FileReader.DONE === evt.target.readyState) {
callback(0xE9 === evt.target.result.charCodeAt(0));
if (0xE9 !== evt.target.result.charCodeAt(0)) callback(false);
if (0x03 !== evt.target.result.charCodeAt(2)) {
var response = window.confirm("Binary image is not using DOUT flash mode. This might cause resets in some devices. Press OK to continue.");
callback(response);
} else {
callback(true);
}
}
};
var blob = file.slice(0, 1);
var blob = file.slice(0, 3);
reader.readAsBinaryString(blob);
}
@ -1430,12 +1436,14 @@ function connectToURL(url) {
initUrls(url);
/*
$.ajax({
'method': 'GET',
'crossDomain': true,
'url': urls.auth.href,
'xhrFields': { 'withCredentials': true }
}).done(function(data) {
*/
if (websock) { websock.close(); }
websock = new WebSocket(urls.ws.href);
websock.onmessage = function(evt) {
@ -1444,9 +1452,11 @@ function connectToURL(url) {
processData(data);
}
};
/*
}).fail(function() {
// Nothing to do, reload page and retry
});
*/
}


Loading…
Cancel
Save