Skip to content

Commit

Permalink
Update embedded page to generate ISO 8601 data time and hardcode webs…
Browse files Browse the repository at this point in the history
…ocket protocol

Bump version
  • Loading branch information
luc-github committed Sep 11, 2022
1 parent e73b5e8 commit a4e4234
Show file tree
Hide file tree
Showing 4 changed files with 700 additions and 701 deletions.
1 change: 0 additions & 1 deletion embedded/config/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions embedded/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
);
}
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion esp3d/src/include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit a4e4234

Please sign in to comment.