|
|
@ -3,15 +3,15 @@ import { addTxnRecord } from "../txn"; |
|
|
|
|
|
|
|
type UpTrayStepStruct = { |
|
|
|
method: "upTray"; |
|
|
|
params: { |
|
|
|
heaterId: number; |
|
|
|
}; |
|
|
|
// params: {
|
|
|
|
// heaterId: number;
|
|
|
|
// };
|
|
|
|
}; |
|
|
|
type DownTrayStepStruct = { |
|
|
|
method: "downTray"; |
|
|
|
params: { |
|
|
|
heaterId: number; |
|
|
|
}; |
|
|
|
// params: {
|
|
|
|
// heaterId: number;
|
|
|
|
// };
|
|
|
|
}; |
|
|
|
export type TubeSolStruct = { |
|
|
|
tubeNum: number; |
|
|
@ -30,15 +30,15 @@ type AddLiquidStepStruct = { |
|
|
|
}; |
|
|
|
type MoveToSolStepStruct = { |
|
|
|
method: "moveToSol"; |
|
|
|
params: { |
|
|
|
heaterId: number; |
|
|
|
}; |
|
|
|
// params: {
|
|
|
|
// heaterId: number;
|
|
|
|
// };
|
|
|
|
}; |
|
|
|
type MoveToHeaterStepStruct = { |
|
|
|
method: "moveToHeater"; |
|
|
|
params: { |
|
|
|
heaterId: number; |
|
|
|
}; |
|
|
|
// params: {
|
|
|
|
// heaterId: number;
|
|
|
|
// };
|
|
|
|
}; |
|
|
|
type ShakingStepStruct = { |
|
|
|
method: "shaking"; |
|
|
@ -50,15 +50,15 @@ type ShakingStepStruct = { |
|
|
|
type StartHeatingStepStruct = { |
|
|
|
method: "startHeating"; |
|
|
|
params: { |
|
|
|
heaterId: number; |
|
|
|
// heaterId: number;
|
|
|
|
temperature: number; |
|
|
|
}; |
|
|
|
}; |
|
|
|
type StopHeatingStepStruct = { |
|
|
|
method: "stopHeating"; |
|
|
|
params: { |
|
|
|
heaterId: number; |
|
|
|
}; |
|
|
|
// params: {
|
|
|
|
// heaterId: number;
|
|
|
|
// };
|
|
|
|
}; |
|
|
|
type TakePhotoStepStruct = { |
|
|
|
method: "takePhoto"; |
|
|
@ -116,6 +116,8 @@ export const CmdDescMap: { [k in OperationCmd]: string } = { |
|
|
|
closeClaw: "收合夹爪", |
|
|
|
moveMachineArm: "移动机械臂", |
|
|
|
moveTube: "移动试管", |
|
|
|
openDoor: "开门", |
|
|
|
closeDoor: "关门", |
|
|
|
}; |
|
|
|
|
|
|
|
export type OperationCmd = |
|
|
@ -137,8 +139,8 @@ export type OperationCmd = |
|
|
|
| "closeClaw" // 收合夹爪
|
|
|
|
| "moveMachineArm" // 移动机械臂
|
|
|
|
| "moveTube" // 移动试管
|
|
|
|
| 'openDoor' //开门
|
|
|
|
| 'closeDoor' //关门
|
|
|
|
| "openDoor" //开门
|
|
|
|
| "closeDoor"; //关门
|
|
|
|
|
|
|
|
export function debugCmd(params: { command: OperationCmd; params: Record<string, any> }) { |
|
|
|
const commandId = addTxnRecord({ ...params, category: "debug" }); |
|
|
|