nur wenn xyz genaendert, dann senden

This commit is contained in:
ChK
2026-04-07 09:30:46 +02:00
parent 3d33ecd747
commit a47c168a22
11 changed files with 250 additions and 159 deletions

View File

@@ -19,6 +19,9 @@ describe("TelnetSenderGRBL.execCommand", () => {
// Provide some sample motion data
const mOld = { x: 0, y: 0, z: 0, a:0, b:0, c:0, e:0 }; // not used in your code
const mNew = { x: 12.34, y: Math.PI/2, z: 0, a:0, b:0, c:0, e:0 };
mNew.xMotorChanged = true;
mNew.yMotorChanged = true;
mNew.zMotorChanged = true;
sender.execCommand("G1", mOld, mNew);
@@ -44,6 +47,11 @@ describe("TelnetSenderGRBL.execCommand", () => {
const mOld = { x: 0, y: 0, z: 0, a:Math.PI, b:0, c:0, e:0 }; // not used in your code
const mNew = { x: 12.34, y: Math.PI/2, z: 0, a:Math.PI/8, b:0, c:0, e:0 };
mNew.xMotorChanged = true;
mNew.yMotorChanged = true;
mNew.zMotorChanged = true;
mNew.aMotorChanged = true;
sender.execCommand("G1", mOld, mNew);
// ✅ verify output
@@ -66,6 +74,9 @@ describe("TelnetSenderGRBL.execCommand", () => {
// Provide some sample motion data
const mOld = { x: 0, y: 0, z: 0, a:0, b:0, c:0, e:0 }; // not used in your code
const mNew = { x: 12.34, y: 1.0, z: 2.0, a:0, b:0, c:0, e:0 };
mNew.xMotorChanged = true;
mNew.yMotorChanged = true;
mNew.zMotorChanged = true;
sender.execCommand("G92", mOld, mNew);