Make machine configuration authoritative and restore native checkpoints exactly

This commit is contained in:
2026-09-18 09:09:41 +08:00
parent 6a69511276
commit 4a568f1f4c
94 changed files with 10882 additions and 301 deletions

View File

@@ -12,7 +12,7 @@ export function readTrtGeometry({ entrypoint, files }) {
const machine = machineDefinition(entrypoint);
if (!machine) fail("trt_geometry_machine", entrypoint);
const parsed = parseIni({ workspace: new WorkspaceRuntime({ files }), entrypoint });
if (parsed.sections.TRAJ?.COORDINATES?.toUpperCase() !== machine.coordinates || parsed.sections.KINS?.KINEMATICS?.split(/\s+/)[0] !== `${machine.id}-kins`) fail("trt_geometry_machine_mismatch", entrypoint);
if (parsed.sections.TRAJ?.COORDINATES?.replace(/\s/g, "").toUpperCase() !== machine.coordinates || parsed.sections.KINS?.KINEMATICS?.split(/\s+/)[0] !== `${machine.id}-kins`) fail("trt_geometry_machine_mismatch", entrypoint);
const commands = parsed.entries.filter((e) => e.section.toUpperCase() === "HAL" && e.key.toUpperCase() === "HALCMD")
.map((entry) => ({ entry, record: parseHalLine(entry.value, entry.line, parsed.sections) }));
const unsupported = machine.coordinates === "XYZAC" ? "x_offset" : "y_offset";