完善 LinuxCNC 对标矩阵与 gmoccapy TRT 仿真
This commit is contained in:
@@ -127,6 +127,13 @@ assert.equal(kinematicsState.rtcpFrame.sourceMode, "source-derived-kinematics-wa
|
||||
assert.equal(kinematicsState.rtcpFrame.semanticBoundary, "linuxcnc_kinematics_wasm_c_abi");
|
||||
assert.equal(kinematicsState.rtcpFrame.readiness.linuxCncKinematicsReady, true);
|
||||
|
||||
kinematicsStore.dispatch({ type: "SET_RTCP", enabled: true });
|
||||
kinematicsState = kinematicsStore.getState();
|
||||
assert.equal(kinematicsState.rtcpState, "off");
|
||||
assert.equal(kinematicsState.operatorMessage, "kinematics blocked: machine must be on");
|
||||
|
||||
kinematicsStore.dispatch({ type: "TOGGLE_POWER" });
|
||||
kinematicsStore.dispatch({ type: "HOME" });
|
||||
kinematicsStore.dispatch({ type: "SET_RTCP", enabled: true });
|
||||
kinematicsState = kinematicsStore.getState();
|
||||
assert.equal(kinematicsState.rtcpState, "on");
|
||||
@@ -134,8 +141,6 @@ assert.equal(kinematicsState.rtcpFrame.sourceMode, "source-derived-kinematics-wa
|
||||
assert.equal(kinematicsState.lastKinematicsResult.moduleId, "xyzac-trt");
|
||||
assert.equal(kinematicsState.dro.tcpX, kinematicsState.rtcpFrame.tcpPose.x);
|
||||
|
||||
kinematicsStore.dispatch({ type: "TOGGLE_POWER" });
|
||||
kinematicsStore.dispatch({ type: "HOME" });
|
||||
kinematicsStore.dispatch({ type: "SET_MODE", mode: "auto" });
|
||||
kinematicsStore.dispatch({ type: "STEP" });
|
||||
kinematicsState = kinematicsStore.getState();
|
||||
@@ -270,6 +275,8 @@ assert.equal(store.getState().machineProfile, "xyzbc-trt");
|
||||
assert.equal(store.getState().profile.traj.coordinates, "XYZBC");
|
||||
const xyzbcRuntime = await createLinuxCncKinematicsRuntime({ moduleId: "xyzbc-trt" });
|
||||
store.dispatch({ type: "ATTACH_KINEMATICS_RUNTIME", runtime: xyzbcRuntime });
|
||||
store.dispatch({ type: "TOGGLE_POWER" });
|
||||
store.dispatch({ type: "HOME" });
|
||||
store.dispatch({ type: "SET_RTCP", enabled: true });
|
||||
state = store.getState();
|
||||
assert.equal(state.kinsType, "tcp-xyzbc");
|
||||
@@ -277,6 +284,7 @@ assert.equal(state.rtcpFrame.kinematicsModuleId, "xyzbc-trt");
|
||||
assert.equal(state.rtcpFrame.jointPose[3].axis, "B");
|
||||
|
||||
store.dispatch({ type: "SET_PROFILE", profileId: "xyzac-trt" });
|
||||
store.dispatch({ type: "RESET" });
|
||||
store.dispatch({ type: "RUN" });
|
||||
assert.equal(store.getState().activeLine, 501);
|
||||
assert.equal(store.getState().operatorMessage, "run blocked: machine must be on");
|
||||
|
||||
Reference in New Issue
Block a user