Claude Ultracode Fixes
This commit is contained in:
@@ -10219,3 +10219,17 @@
|
||||
2026-06-08T15:25:42.319Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T15:25:53.707Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T15:25:59.281Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:15:02.308Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:15:02.316Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-08T16:15:09.917Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:15:09.925Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-08T16:15:18.670Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:15:18.679Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-08T16:15:23.488Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:15:23.495Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-08T16:15:31.077Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:15:31.094Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-08T16:16:38.041Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:16:38.051Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-08T16:17:00.361Z ::ffff:127.0.0.1: M114
|
||||
2026-06-08T16:17:00.370Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
|
||||
@@ -14559,3 +14559,10 @@
|
||||
2026-06-08T15:25:42.307Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T15:25:53.690Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T15:25:59.273Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T16:15:02.289Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T16:15:09.896Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T16:15:18.652Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T16:15:23.464Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T16:15:31.061Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T16:16:38.024Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-08T16:17:00.351Z ::ffff:127.0.0.1 : Ping
|
||||
|
||||
@@ -57,8 +57,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
sendersUl.innerHTML = '';
|
||||
data.senders.forEach(sender => {
|
||||
const li = document.createElement('li');
|
||||
li.textContent = `${sender.name}: ${sender.state}`;
|
||||
li.classList.add((sender.health || 'disconnected').toLowerCase());
|
||||
const state = sender.state || 'disconnected';
|
||||
const label = sender.url ? `${sender.name} (${sender.url}): ${state}` : `${sender.name}: ${state}`;
|
||||
li.textContent = label;
|
||||
li.classList.add(state.toLowerCase());
|
||||
sendersUl.appendChild(li);
|
||||
});
|
||||
|
||||
|
||||
@@ -121,6 +121,12 @@ h1 {
|
||||
content: "⛔";
|
||||
}
|
||||
|
||||
/* 🟡 CONNECTING / RECONNECTING */
|
||||
.section#senders li.connecting::before,
|
||||
.section#senders li.reconnecting::before {
|
||||
content: "🟡";
|
||||
}
|
||||
|
||||
.state-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(25px, 1fr));
|
||||
|
||||
@@ -387,7 +387,7 @@ module.exports = class TelnetSenderGRBL extends SenderInterface {
|
||||
// abhngig vom FluidNC und dessen speed interpretation ist.
|
||||
}
|
||||
|
||||
if(data.indexOf("G90") == -1 && data.indexOf("G1 ") > 0){
|
||||
if(data.indexOf("G90") == -1 && data.indexOf("G1 ") !== -1){
|
||||
data = "G90 " + data;
|
||||
}
|
||||
|
||||
|
||||
@@ -387,8 +387,8 @@ module.exports = class WSSenderGrbl extends SenderInterface {
|
||||
|
||||
data += " f" + (this.maxSpeedF.toFixed(2).toString());
|
||||
|
||||
if (data.length > 3) {
|
||||
if (data.indexOf("G90") == -1) {
|
||||
if (this.ws && data.length > 3) {
|
||||
if (data.indexOf("G90") == -1 && data.indexOf("G1 ") !== -1) {
|
||||
data = "G90 " + data;
|
||||
}
|
||||
console.log("Driver send to 🤖 " + this.urlGRBLstr + " the message: " + data);
|
||||
|
||||
@@ -29,6 +29,7 @@ function initInputWS(server, robot, GCode, sharedState) {
|
||||
/* ---------- GCode ---------- */
|
||||
if (GCode.containsCommand(message)) {
|
||||
console.log("🔵 GCode.receiveGCode: Incoming command: " + message);
|
||||
logCommand(sharedState, clientIP, message);
|
||||
GCode.receiveGCode(robot, message);
|
||||
broadcast(wss, GCode.getM114(robot));
|
||||
return;
|
||||
|
||||
@@ -99,11 +99,13 @@ function createApp(options = {}) {
|
||||
consoleObj.warn(`Startup warning: ${disconnectedSenders.length} sender(s) disconnected at startup.`);
|
||||
}
|
||||
|
||||
setTimeoutFn(() => {
|
||||
senders.forEach(s => {
|
||||
if (s.instance?.tSocket) robot.cmdReceivers.push(s.instance);
|
||||
});
|
||||
}, 5000);
|
||||
// Register all senders as command receivers immediately and permanently.
|
||||
// Each sender's execCommand() guards internally against sending while it is
|
||||
// disconnected, and resumes automatically once it (re)connects — so there is
|
||||
// no need to wait for a socket or to re-register after a reconnect. The old
|
||||
// 5s one-shot registration silently dropped senders that connected later
|
||||
// (e.g. after EHOSTUNREACH backoff) and never registered WebSocket senders.
|
||||
senders.forEach(s => robot.cmdReceivers.push(s.instance));
|
||||
|
||||
const port = Number(processEnv.PORT) || 2095;
|
||||
httpsServer.listen(port);
|
||||
|
||||
@@ -25,8 +25,8 @@ describe("TelnetSenderGRBL.execCommand", () => {
|
||||
|
||||
sender.execCommand("G1", mOld, mNew);
|
||||
|
||||
// ✅ verify output
|
||||
expect(sender.tSocket.written).toBe("G1 x12.34 y90.00 z-90.00 f2300.00\r\n");
|
||||
// ✅ verify output — G1 moves must be sent in absolute mode (G90 prefix)
|
||||
expect(sender.tSocket.written).toBe("G90 G1 x12.34 y90.00 z-90.00 f2300.00\r\n");
|
||||
});
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ describe("TelnetSenderGRBL.execCommand", () => {
|
||||
|
||||
sender.execCommand("G1", mOld, mNew);
|
||||
|
||||
// ✅ verify output
|
||||
expect(sender.tSocket.written).toBe("G1 x22.50 f2300.00\r\n");
|
||||
// ✅ verify output — G1 moves must be sent in absolute mode (G90 prefix)
|
||||
expect(sender.tSocket.written).toBe("G90 G1 x22.50 f2300.00\r\n");
|
||||
});
|
||||
|
||||
test("writes correct G-code G92 to mocked tSocket", () => {
|
||||
|
||||
Reference in New Issue
Block a user