This commit is contained in:
ChK
2026-04-03 22:57:17 +02:00
parent 71d04271db
commit 8ea33bd8df
4 changed files with 1645 additions and 62 deletions

View File

@@ -75,3 +75,8 @@
2026-04-01T15:55:56.352Z ::ffff:172.21.0.6: FMinus
2026-04-01T15:55:56.354Z ::ffff:172.21.0.6: FShow
2026-04-01T15:56:05.764Z ::ffff:172.21.0.6: G91 G1 Y-10 F100
2026-04-03T16:47:38.805Z ::ffff:172.21.0.9: FShow
2026-04-03T16:47:39.917Z ::ffff:172.21.0.9: G91 G1 B-0.1 F100
2026-04-03T17:24:07.977Z ::ffff:172.21.0.5: FShow
2026-04-03T17:24:08.631Z ::ffff:172.21.0.5: G91 G1 X-10 F100
2026-04-03T20:34:15.915Z ::ffff:172.21.0.5: FShow

File diff suppressed because it is too large Load Diff

View File

@@ -148,8 +148,10 @@ console.log("Works with FluidNc Base");
const port = Number(process.env.PORT);
const listenPort = Number.isInteger(port) ? port : 2095;
console.log("Starting server on port: " + listenPort.toString());
server.listen(listenPort);
console.log("Listen on Port: https://localhost:" + port.toString()+ "/")
console.log("Listen on Port: https://localhost:" + listenPort.toString()+ "/")
@@ -197,7 +199,8 @@ const infoServer = https.createServer(httpsOptions, (req, res) => {
const InfPort = Number(process.env.PORT);
const listenInfoPort = Number.isInteger(InfPort) ? InfPort : 2095;
const listenInfoPort = Number.isInteger(InfPort) ? InfPort : 2098;
console.log("Starting info server on port: " + listenInfoPort.toString());
infoServer.listen(listenInfoPort);
console.log("Info server listening on https://localhost:"+ listenInfoPort.toString() + "/");

View File

@@ -1,60 +0,0 @@
const WebSocket = require('ws');
const TEST_URL = "wss://localhost:2095";
describe("WebSocket Verbindung (appRobot_Driver)", () => {
let ws;
beforeAll((done) => {
// self-signed cert ignorieren (wichtig!)
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
ws = new WebSocket(TEST_URL);
ws.on('open', () => {
done();
});
ws.on('error', (err) => {
done(err);
});
});
afterAll(() => {
if (ws) ws.close();
});
test("Ping → sollte Antwort bekommen", (done) => {
ws.on('message', (data) => {
const msg = data.toString();
try {
expect(msg).toBe("Ping");
done();
} catch (err) {
done(err);
}
});
ws.send("Ping");
});
test("GCode senden → sollte Antwort liefern", (done) => {
ws.on('message', (data) => {
const msg = data.toString();
try {
expect(msg).toContain("X"); // M114 response enthält Positionsdaten
done();
} catch (err) {
done(err);
}
});
ws.send("G1 X10 F100");
});
});