接入 LinuxCNC TP 运行反馈
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import assert from "node:assert/strict";
|
||||
|
||||
import { xyzacTrtProfile } from "../../app/src/profiles/xyzac-trt.js";
|
||||
import { getFiveAxisProfile, fiveAxisProfiles } from "../../app/src/profiles/index.js";
|
||||
import { createPyvcpHalBindingSummary, xyzacTrtPyvcpPanelSchema } from "../../app/src/panel-schema/xyzac-trt-pyvcp.js";
|
||||
import { createLinuxCncBoundaryAdapter, createLinuxCncBoundaryReadiness } from "../../app/src/runtime/linuxcnc-boundary-adapter.js";
|
||||
import { createLinuxCncKinematicsRuntime } from "../../app/src/runtime/linuxcnc-kinematics-runtime.js";
|
||||
@@ -29,6 +30,20 @@ assert.equal(xyzacTrtProfile.halPins.includes("motion.switchkins-type"), true);
|
||||
assert.equal(xyzacTrtProfile.halPins.includes("xyzac-trt-kins.tool-offset"), true);
|
||||
assert.equal(xyzacTrtProfile.promotionAllowed, false);
|
||||
assert.equal(xyzacTrtProfile.linuxCncKinematicsReady, false);
|
||||
assert.deepEqual(fiveAxisProfiles.map(({ id }) => id), ["xyzac-trt", "xyzbc-trt"]);
|
||||
|
||||
const xyzbcTrtProfile = getFiveAxisProfile("xyzbc-trt");
|
||||
assert.equal(xyzbcTrtProfile.id, "xyzbc-trt");
|
||||
assert.equal(xyzbcTrtProfile.iniPath.endsWith("xyzbc-trt.ini"), true);
|
||||
assert.deepEqual(xyzbcTrtProfile.coordinates, ["X", "Y", "Z", "B", "C"]);
|
||||
assert.equal(xyzbcTrtProfile.kinematics, "xyzbc-trt-kins");
|
||||
assert.equal(xyzbcTrtProfile.kinematicsModuleId, "xyzbc-trt");
|
||||
assert.equal(xyzbcTrtProfile.machineName, "sim-xyzbc-trt-kins (switchkins)");
|
||||
assert.equal(xyzbcTrtProfile.traj.coordinates, "XYZBC");
|
||||
assert.equal(xyzbcTrtProfile.axisLimits.B.max, 36000);
|
||||
assert.equal(xyzbcTrtProfile.hal.halcmd.feedbackNets.some((net) => net.target === "xyzbc-trt-gui.tilt-b"), true);
|
||||
assert.equal(xyzbcTrtProfile.halPins.includes("xyzbc-trt-kins.x-offset"), true);
|
||||
assert.equal(xyzbcTrtProfile.panelSchema.id, "xyzbc-trt-switchkins-pyvcp");
|
||||
|
||||
const sourceSummary = createProfileSourceReferenceSummary("xyzac-trt");
|
||||
assert.equal(sourceSummary.referenceCount >= 8, true);
|
||||
@@ -39,6 +54,11 @@ assert.equal(sourceSummary.semanticBoundary, "profile_source_map_only_not_runtim
|
||||
assert.ok(sourceSummary.references.some((reference) => reference.path.endsWith("xyzac-trt.ini")));
|
||||
assert.ok(sourceSummary.references.some((reference) => reference.path.endsWith("trtfuncs.c")));
|
||||
|
||||
const xyzbcSourceSummary = createProfileSourceReferenceSummary("xyzbc-trt");
|
||||
assert.equal(xyzbcSourceSummary.referenceCount >= 7, true);
|
||||
assert.ok(xyzbcSourceSummary.references.some((reference) => reference.path.endsWith("xyzbc-trt.ini")));
|
||||
assert.ok(xyzbcSourceSummary.references.some((reference) => reference.path.endsWith("xyzbc-trt-kins.c")));
|
||||
|
||||
const panelSummary = createPyvcpHalBindingSummary(xyzacTrtPyvcpPanelSchema);
|
||||
assert.equal(panelSummary.schemaId, "xyzac-trt-switchkins-pyvcp");
|
||||
assert.equal(panelSummary.controlCount, 5);
|
||||
|
||||
Reference in New Issue
Block a user