Skip to content

Commit a4e4234

Browse files
committed
Update embedded page to generate ISO 8601 data time and hardcode websocket protocol
Bump version
1 parent e73b5e8 commit a4e4234

File tree

4 files changed

+700
-701
lines changed

4 files changed

+700
-701
lines changed

embedded/config/server.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ app.get("/command", function (req, res) {
100100
WebCommunication: "Synchronous",
101101
WebSocketIP: "localhost",
102102
WebSocketPort: "81",
103-
WebSocketSubProtocol: "webui-v3",
104103
Hostname: "esp3d",
105104
WiFiMode: "STA",
106105
WebUpdate: "Enabled",

embedded/src/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ let wsMsg = "";
3030
let logOff = false;
3131
let pageId = "";
3232
let currentPath = "/";
33-
const version = "3.0.0.a5";
33+
const version = "3.0.0.a6";
3434
let xmlhttpupload;
3535
let prgfiletext;
3636
let prgfile;
@@ -239,11 +239,11 @@ function getPCTime() {
239239
padNumber(d.getMonth() + 1, 2) +
240240
"-" +
241241
padNumber(d.getDate(), 2) +
242-
"-" +
242+
"T" +
243243
padNumber(d.getHours(), 2) +
244-
"-" +
244+
":" +
245245
padNumber(d.getMinutes(), 2) +
246-
"-" +
246+
":" +
247247
padNumber(d.getSeconds(), 2)
248248
);
249249
}
@@ -357,18 +357,18 @@ function processFWJson(text) {
357357
}
358358
}
359359
if (json.Hostname) document.title = json.Hostname;
360-
startSocket(json.WebSocketIP, json.WebSocketPort, json.WebCommunication, json.WebSocketSubProtocol);
360+
startSocket(json.WebSocketIP, json.WebSocketPort, json.WebCommunication);
361361
SendFileCommand("list", "all");
362362
}
363363

364-
function startSocket(ip, port, sync, protocol) {
364+
function startSocket(ip, port, sync) {
365365
if (websocketStarted) {
366366
wsSource.close();
367367
}
368368

369369
wsSource = new WebSocket(
370370
"ws://" + ip + ":" + port + (sync == "Asynchronous" ? "/ws" : ""),
371-
[protocol]
371+
["webui-v3"]
372372
);
373373
wsSource.binaryType = "arraybuffer";
374374
wsSource.onopen = function (e) {
@@ -380,7 +380,7 @@ function startSocket(ip, port, sync, protocol) {
380380
//if it is not a log off
381381
if (!logOff)
382382
setTimeout(() => {
383-
startSocket(ip, port, sync, protocol);
383+
startSocket(ip, port, sync);
384384
}, 3000);
385385
};
386386
wsSource.onerror = function (e) {

esp3d/src/include/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define _VERSION_ESP3D_H
2323

2424
//version and sources location
25-
#define FW_VERSION "3.0.0.a215"
25+
#define FW_VERSION "3.0.0.a216"
2626
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
2727

2828
#endif //_VERSION_ESP3D_H

0 commit comments

Comments
 (0)