nur wenn xyz genaendert, dann senden
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user