Anpassungen, nichts relevantes
This commit is contained in:
@@ -11452,3 +11452,12 @@
|
||||
2026-06-26T14:27:33.903Z ::ffff:127.0.0.1: G1 X1
|
||||
2026-06-26T14:27:33.905Z ::ffff:127.0.0.1: M114
|
||||
2026-06-26T14:27:33.931Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-26T18:38:26.674Z ::ffff:127.0.0.1: FList
|
||||
2026-06-26T18:38:26.718Z ::ffff:127.0.0.1: FPlus
|
||||
2026-06-26T18:38:26.751Z ::ffff:127.0.0.1: FLoad nichtda
|
||||
2026-06-26T18:38:26.778Z ::ffff:127.0.0.1: FShow
|
||||
2026-06-26T18:38:26.909Z ::ffff:127.0.0.1: M114
|
||||
2026-06-26T18:38:26.979Z ::ffff:127.0.0.1: M114
|
||||
2026-06-26T18:38:26.991Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-26T18:38:27.132Z ::ffff:127.0.0.1: G1 X1 Y2 Z3
|
||||
2026-06-26T18:38:27.362Z ::ffff:127.0.0.1: G1 X1
|
||||
|
||||
@@ -14906,3 +14906,5 @@
|
||||
2026-06-26T14:27:29.207Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-26T14:27:33.132Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-26T14:27:33.857Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-26T18:38:26.680Z ::ffff:127.0.0.1 : Ping
|
||||
2026-06-26T18:38:26.965Z ::ffff:127.0.0.1 : Ping
|
||||
|
||||
@@ -130,5 +130,33 @@ describe("Robot G92", () => {
|
||||
// Konsistenz: identische Kopplung wie der reguläre Bewegungspfad (calculateAngles3D).
|
||||
expect(robot.eMotor).toBeCloseTo(robot.gripperMotorFromOpening(robot.e), 12);
|
||||
});
|
||||
|
||||
test("G92 E: Greifer-Port (y) geht real an den Hand-Controller raus (nicht nur ins Modell)", () => {
|
||||
// Regression: G92 mit E muss nicht nur robot.eMotor füllen, sondern den Greifer-Port
|
||||
// auch tatsächlich an FluidNC senden (Kalibrierung nach dem Foto-Homing). Hand-
|
||||
// Verkabelung x=c, y=e, z=b → Greifer liegt auf dem y-Port, gesendet wird eMotor·(180/π).
|
||||
// Schützt davor, dass das E-Senden bei G92 still deaktiviert wird (war zeitweise vermutet).
|
||||
const robot = new Robot(300, 300, 20);
|
||||
const D = 180 / Math.PI;
|
||||
|
||||
const base = new TenetSender("test.test", 2300, "x", "y", "z");
|
||||
const elbow = new TenetSender("test.test", 5000, "a", null, null);
|
||||
const hand = new TenetSender("test.test", 5000, "c", "e", "b");
|
||||
robot.cmdReceivers.push(base, elbow, hand);
|
||||
|
||||
GCode.receiveGCode(robot, "G92 B30 C-45 E10");
|
||||
|
||||
const handSent = hand.tSocket.written;
|
||||
|
||||
// 1) Greifer-Port muss überhaupt rausgehen (sonst wäre das E-Senden deaktiviert).
|
||||
const yMatch = handSent.match(/ y(-?\d+\.\d+)/);
|
||||
expect(yMatch).not.toBeNull();
|
||||
|
||||
// 2) Wert = eMotor·D (= (e − b − c)·D), konsistent mit dem G1/Gamepad-Pfad.
|
||||
expect(parseFloat(yMatch[1])).toBeCloseTo(robot.eMotor * D, 1);
|
||||
|
||||
// 3) Es ist ein Setz-Befehl (G92), keine Bewegung (G1).
|
||||
expect(handSent.startsWith("G92")).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user