Update embedded page to generate ISO 8601 data time and hardcode websocket protocol

Bump version
This commit is contained in:
Luc 2022-09-11 17:53:54 +08:00
parent e73b5e85c8
commit a4e42340ef
4 changed files with 700 additions and 701 deletions

View File

@ -100,7 +100,6 @@ app.get("/command", function (req, res) {
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketPort: "81",
WebSocketSubProtocol: "webui-v3",
Hostname: "esp3d",
WiFiMode: "STA",
WebUpdate: "Enabled",

View File

@ -30,7 +30,7 @@ let wsMsg = "";
let logOff = false;
let pageId = "";
let currentPath = "/";
const version = "3.0.0.a5";
const version = "3.0.0.a6";
let xmlhttpupload;
let prgfiletext;
let prgfile;
@ -239,11 +239,11 @@ function getPCTime() {
padNumber(d.getMonth() + 1, 2) +
"-" +
padNumber(d.getDate(), 2) +
"-" +
"T" +
padNumber(d.getHours(), 2) +
"-" +
":" +
padNumber(d.getMinutes(), 2) +
"-" +
":" +
padNumber(d.getSeconds(), 2)
);
}
@ -357,18 +357,18 @@ function processFWJson(text) {
}
}
if (json.Hostname) document.title = json.Hostname;
startSocket(json.WebSocketIP, json.WebSocketPort, json.WebCommunication, json.WebSocketSubProtocol);
startSocket(json.WebSocketIP, json.WebSocketPort, json.WebCommunication);
SendFileCommand("list", "all");
}
function startSocket(ip, port, sync, protocol) {
function startSocket(ip, port, sync) {
if (websocketStarted) {
wsSource.close();
}
wsSource = new WebSocket(
"ws://" + ip + ":" + port + (sync == "Asynchronous" ? "/ws" : ""),
[protocol]
["webui-v3"]
);
wsSource.binaryType = "arraybuffer";
wsSource.onopen = function (e) {
@ -380,7 +380,7 @@ function startSocket(ip, port, sync, protocol) {
//if it is not a log off
if (!logOff)
setTimeout(() => {
startSocket(ip, port, sync, protocol);
startSocket(ip, port, sync);
}, 3000);
};
wsSource.onerror = function (e) {

View File

@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H
//version and sources location
#define FW_VERSION "3.0.0.a215"
#define FW_VERSION "3.0.0.a216"
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
#endif //_VERSION_ESP3D_H

File diff suppressed because it is too large Load Diff