|
|
@ -9,331 +9,404 @@ import com.iflytop.gd.common.enums.cmd.*; |
|
|
|
public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 门 打开 |
|
|
|
* 门 移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand doorOpen() { |
|
|
|
return controlMotorCmd(CmdDevice.door, CmdAction.open, null, "打开设备门"); |
|
|
|
public static DeviceCommand doorMove(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setPosition(position); |
|
|
|
return controlMotorCmd(CmdDevice.door_motor, CmdAction.move, params, "门 移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 门 关闭 |
|
|
|
* 门 停止动作 |
|
|
|
*/ |
|
|
|
public static DeviceCommand doorClose() { |
|
|
|
return controlMotorCmd(CmdDevice.door, CmdAction.close, null, "关闭设备门"); |
|
|
|
public static DeviceCommand doorStop() { |
|
|
|
return controlMotorCmd(CmdDevice.door_motor, CmdAction.stop, null, "门 停止"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 门 停止动作 |
|
|
|
* 门 回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand doorStop() { |
|
|
|
return controlMotorCmd(CmdDevice.door, CmdAction.stop, null, "停止门动作"); |
|
|
|
public static DeviceCommand doorOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.door_motor, CmdAction.origin, null, "门 回原点"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 摇匀电机 设置参数 |
|
|
|
* 门 设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand shakeMotorSet(Double current, Double speed) { |
|
|
|
public static DeviceCommand doorSet(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.shake_motor, CmdAction.set, params, "摇匀电机设置参数"); |
|
|
|
return setInfoCmd(CmdDevice.door_motor, CmdAction.set, null, "门 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 摇匀电机 开始摇匀 |
|
|
|
*/ |
|
|
|
public static DeviceCommand shakeMotorStart() { |
|
|
|
return controlMotorCmd(CmdDevice.shake_motor, CmdAction.start, null, "开始摇匀"); |
|
|
|
return controlMotorCmd(CmdDevice.shake_motor, CmdAction.start, null, "摇匀 开始"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 摇匀电机 结束摇匀 |
|
|
|
*/ |
|
|
|
public static DeviceCommand shakeMotorStop() { |
|
|
|
return controlMotorCmd(CmdDevice.shake_motor, CmdAction.stop, null, "结束摇匀"); |
|
|
|
return controlMotorCmd(CmdDevice.shake_motor, CmdAction.stop, null, "摇匀 结束"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 托盘电机 设置参数 |
|
|
|
* 摇匀电机 设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 r/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand trayMotorSet(Double current, Double speed) { |
|
|
|
public static DeviceCommand shakeMotorSet(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.tray_motor, CmdAction.set, params, "托盘电机设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 托盘电机 回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand trayMotorOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.tray_motor, CmdAction.origin, null, "托盘电机回原点"); |
|
|
|
return setInfoCmd(CmdDevice.shake_motor, CmdAction.set, params, "摇匀 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 托盘电机 移动 |
|
|
|
* 拍子升降电机 移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand trayMotorMove(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setPosition(position); |
|
|
|
return controlMotorCmd(CmdDevice.tray_motor, CmdAction.move, params, "托盘电机移动"); |
|
|
|
return controlMotorCmd(CmdDevice.tray_motor, CmdAction.move, params, "拍子升降电机 移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 托盘电机 停止移动 |
|
|
|
* 拍子升降电机 停止移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand trayMotorStop() { |
|
|
|
return controlMotorCmd(CmdDevice.tray_motor, CmdAction.stop, null, "托盘电机停止移动"); |
|
|
|
return controlMotorCmd(CmdDevice.tray_motor, CmdAction.stop, null, "拍子升降电机 停止移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 拍子升降电机 回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand trayMotorOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.tray_motor, CmdAction.origin, null, "拍子升降电机 回原点"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 设置参数 |
|
|
|
* 拍子升降电机 设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotSet(CmdAxis axis, Double speed) { |
|
|
|
public static DeviceCommand trayMotorSet(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(axis); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.dual_robot, CmdAction.set, params, "双轴械臂设置参数"); |
|
|
|
return setInfoCmd(CmdDevice.tray_motor, CmdAction.set, params, "拍子升降电机 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 回原点 |
|
|
|
* 双轴械臂 移动关节1 |
|
|
|
* |
|
|
|
* @param position 位置 单位° |
|
|
|
* @param speed 速度 单位 °/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotOrigin(CmdAxis axis) { |
|
|
|
public static DeviceCommand dualRobotJoint1Move(Double position, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(axis); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.origin, params, "双轴械臂回原点"); |
|
|
|
params.setAxis(CmdAxis.joint1); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.move_joint, params, "双轴械臂 移动关节1"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 移动关节 |
|
|
|
* 双轴械臂 移动关节2 |
|
|
|
* |
|
|
|
* @param position 位置 单位° |
|
|
|
* @param speed 速度 单位 °/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotMoveJoint(CmdAxis axis, CmdDirection direction, Double angle, Double speed) { |
|
|
|
public static DeviceCommand dualRobotJoint2Move(Double position, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(axis); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setAngle(angle); |
|
|
|
params.setAxis(CmdAxis.joint2); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.move_x_joint, params, "双轴械臂移动关节"); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.move_joint, params, "双轴械臂 移动关节2"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 x移动位置 |
|
|
|
* 双轴械臂 移动至指定点 |
|
|
|
* |
|
|
|
* @param speed 速度 单位 °/s |
|
|
|
* @param x 位置x |
|
|
|
* @param y 位置y |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotXMovePos(CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand dualRobotMovePoint(Double speed, Double x, Double y) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.move_x_joint, params, "双轴械臂移动x"); |
|
|
|
params.setX(x); |
|
|
|
params.setY(y); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.move_point, params, "双轴械臂 移动至指定点"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 y移动位置 |
|
|
|
* 双轴械臂 轴1停止移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotYMovePos(CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand dualRobotJoint1Stop() { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.move_y_joint, params, "双轴械臂移动y"); |
|
|
|
params.setAxis(CmdAxis.joint1); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.stop, params, "双轴械臂 轴1停止移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 轴2停止移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotJoint2Stop() { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(CmdAxis.joint2); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.stop, params, "双轴械臂 轴2停止移动"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 轴1回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotJoint1Origin() { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(CmdAxis.joint1); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.origin, params, "双轴械臂 轴1回原点"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 轴2回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotJoint2Origin() { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(CmdAxis.joint2); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.origin, params, "双轴械臂 轴2回原点"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 轴1设置参数 |
|
|
|
* |
|
|
|
* @param speed 速度 单位 °/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotJoint1Set(Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(CmdAxis.joint1); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.dual_robot, CmdAction.set, params, "双轴械臂 轴1设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 双轴械臂 停止移动 |
|
|
|
* 双轴械臂 轴2设置参数 |
|
|
|
* |
|
|
|
* @param speed 速度 单位 °/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand dualRobotStop(CmdAxis axis) { |
|
|
|
public static DeviceCommand dualRobotJoint2Set(Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setAxis(axis); |
|
|
|
return controlCmd(CmdDevice.dual_robot, CmdAction.stop, params, "双轴械臂停止移动"); |
|
|
|
params.setAxis(CmdAxis.joint1); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.dual_robot, CmdAction.set, params, "双轴械臂 轴2设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 x轴设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotXSet(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand gantryXSet(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.hbot_x, CmdAction.set, params, "龙门架x轴设置参数"); |
|
|
|
return setInfoCmd(CmdDevice.gantry_x, CmdAction.set, params, "龙门架 x轴设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 y轴设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotYSet(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand gantryYSet(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.hbot_y, CmdAction.set, params, "龙门架y轴设置参数"); |
|
|
|
return setInfoCmd(CmdDevice.gantry_y, CmdAction.set, params, "龙门架 y轴设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 z轴设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotZSet(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand gantryZSet(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.hbot_z, CmdAction.set, params, "龙门架z轴设置参数"); |
|
|
|
return setInfoCmd(CmdDevice.gantry_z, CmdAction.set, params, "龙门架 z轴设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 x轴回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotXOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.hbot_x, CmdAction.origin, null, "龙门架x轴回原点"); |
|
|
|
public static DeviceCommand gantryXOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.gantry_x, CmdAction.origin, null, "龙门架 x轴回原点"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 y轴回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotYOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.hbot_y, CmdAction.origin, null, "龙门架y轴回原点"); |
|
|
|
public static DeviceCommand gantryYOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.gantry_y, CmdAction.origin, null, "龙门架 y轴回原点"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 z轴回原点 |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotZOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.hbot_z, CmdAction.origin, null, "龙门架z轴回原点"); |
|
|
|
public static DeviceCommand gantryZOrigin() { |
|
|
|
return controlMotorCmd(CmdDevice.gantry_z, CmdAction.origin, null, "龙门架 z轴回原点"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 x轴移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotXMove(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand gantryXMove(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.hbot_z, CmdAction.move, params, "龙门架x轴移动"); |
|
|
|
return controlMotorCmd(CmdDevice.gantry_z, CmdAction.move, params, "龙门架 x轴移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 y轴移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotYMove(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand gantryYMove(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.hbot_y, CmdAction.move, params, "龙门架y轴移动"); |
|
|
|
return controlMotorCmd(CmdDevice.gantry_y, CmdAction.move, params, "龙门架 y轴移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 z轴移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotZMove(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand gantryZMove(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.hbot_z, CmdAction.move, params, "龙门架z轴移动"); |
|
|
|
return controlMotorCmd(CmdDevice.gantry_z, CmdAction.move, params, "龙门架 z轴移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 x轴停止 |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotXStop() { |
|
|
|
return controlMotorCmd(CmdDevice.hbot_x, CmdAction.stop, null, "龙门架x轴停止"); |
|
|
|
public static DeviceCommand gantryXStop() { |
|
|
|
return controlMotorCmd(CmdDevice.gantry_x, CmdAction.stop, null, "龙门架 x轴停止"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 y轴停止 |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotYStop() { |
|
|
|
return controlMotorCmd(CmdDevice.hbot_y, CmdAction.stop, null, "龙门架y轴停止"); |
|
|
|
public static DeviceCommand gantryYStop() { |
|
|
|
return controlMotorCmd(CmdDevice.gantry_y, CmdAction.stop, null, "龙门架 y轴停止"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 龙门架 z轴停止 |
|
|
|
*/ |
|
|
|
public static DeviceCommand hBotZStop() { |
|
|
|
return controlMotorCmd(CmdDevice.hbot_z, CmdAction.stop, null, "龙门架z轴停止"); |
|
|
|
public static DeviceCommand gantryZStop() { |
|
|
|
return controlMotorCmd(CmdDevice.gantry_z, CmdAction.stop, null, "龙门架 z轴停止"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位1设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor1Set(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor1Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.heater_motor_1, CmdAction.set, params, "加热区顶升电机 加热位1设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位2设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor2Set(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor2Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.heater_motor_2, CmdAction.set, params, "加热区顶升电机 加热位2设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位3设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor3Set(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor3Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.heater_motor_3, CmdAction.set, params, "加热区顶升电机 加热位3设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位4设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor4Set(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor4Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.heater_motor_4, CmdAction.set, params, "加热区顶升电机 加热位4设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位5设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor5Set(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor5Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.heater_motor_5, CmdAction.set, params, "加热区顶升电机 加热位5设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位6设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor6Set(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor6Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.heater_motor_6, CmdAction.set, params, "加热区顶升电机 加热位6设置参数"); |
|
|
|
} |
|
|
@ -382,73 +455,67 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位1移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor1Move(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor1Move(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.heater_motor_1, CmdAction.move, params, "加热区顶升电机 加热位1移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位2移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor2Move(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor2Move(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.heater_motor_2, CmdAction.move, params, "加热区顶升电机 加热位2移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位3移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor3Move(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor3Move(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.heater_motor_3, CmdAction.move, params, "加热区顶升电机 加热位3移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位4移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor4Move(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor4Move(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.heater_motor_4, CmdAction.move, params, "加热区顶升电机 加热位4移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位5移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor5Move(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor5Move(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.heater_motor_5, CmdAction.move, params, "加热区顶升电机 加热位5移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热区顶升电机 加热位6移动 |
|
|
|
* |
|
|
|
* @param position 位置 单位 mm |
|
|
|
*/ |
|
|
|
public static DeviceCommand heaterMotor6Move(Double current, CmdDirection direction, Double position, Double speed) { |
|
|
|
public static DeviceCommand heaterMotor6Move(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setPosition(position); |
|
|
|
params.setSpeed(speed); |
|
|
|
return controlMotorCmd(CmdDevice.heater_motor_6, CmdAction.move, params, "加热区顶升电机 加热位6移动"); |
|
|
|
} |
|
|
|
|
|
|
@ -498,99 +565,117 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵1设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump1Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump1Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump1, CmdAction.set, params, "加液泵1 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵2设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump2Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump2Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump2, CmdAction.set, params, "加液泵2 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵3设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump3Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump3Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump3, CmdAction.set, params, "加液泵3 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵4设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump4Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump4Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump4, CmdAction.set, params, "加液泵4 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵5设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump5Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump5Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump5, CmdAction.set, params, "加液泵5 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵6设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump6Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump6Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump6, CmdAction.set, params, "加液泵6 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵7设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump7Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump7Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump7, CmdAction.set, params, "加液泵7 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵8设置参数 |
|
|
|
* |
|
|
|
* @param current 电流 [0-31] |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump8Set(Double current, CmdDirection direction, Double speed) { |
|
|
|
public static DeviceCommand acidPump8Set(Integer current, Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setCurrent(current); |
|
|
|
params.setSpeed(speed); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump8, CmdAction.set, params, "加液泵8 设置参数"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加液泵 泵1移动 |
|
|
|
* |
|
|
|
* @param direction 方向 forward | backward |
|
|
|
* @param volume 加液量 单位mL |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump1Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump1Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump1, CmdAction.move, params, "加液泵1 移动"); |
|
|
|
} |
|
|
@ -598,10 +683,9 @@ public class DeviceCommandGenerator { |
|
|
|
/** |
|
|
|
* 加液泵 泵2移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump2Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump2Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump2, CmdAction.move, params, "加液泵2 移动"); |
|
|
|
} |
|
|
@ -609,10 +693,9 @@ public class DeviceCommandGenerator { |
|
|
|
/** |
|
|
|
* 加液泵 泵3移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump3Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump3Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump3, CmdAction.move, params, "加液泵3 移动"); |
|
|
|
} |
|
|
@ -620,10 +703,9 @@ public class DeviceCommandGenerator { |
|
|
|
/** |
|
|
|
* 加液泵 泵4移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump4Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump4Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump4, CmdAction.move, params, "加液泵4 移动"); |
|
|
|
} |
|
|
@ -631,10 +713,9 @@ public class DeviceCommandGenerator { |
|
|
|
/** |
|
|
|
* 加液泵 泵5移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump5Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump5Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump5, CmdAction.move, params, "加液泵5 移动"); |
|
|
|
} |
|
|
@ -642,10 +723,9 @@ public class DeviceCommandGenerator { |
|
|
|
/** |
|
|
|
* 加液泵 泵6移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump6Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump6Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump6, CmdAction.move, params, "加液泵6 移动"); |
|
|
|
} |
|
|
@ -653,10 +733,9 @@ public class DeviceCommandGenerator { |
|
|
|
/** |
|
|
|
* 加液泵 泵7移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump7Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump7Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump7, CmdAction.move, params, "加液泵7 移动"); |
|
|
|
} |
|
|
@ -664,10 +743,9 @@ public class DeviceCommandGenerator { |
|
|
|
/** |
|
|
|
* 加液泵 泵8移动 |
|
|
|
*/ |
|
|
|
public static DeviceCommand acidPump8Move(CmdDirection direction, Double volume, Double speed) { |
|
|
|
public static DeviceCommand acidPump8Move(CmdDirection direction, Double volume) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDirection(direction); |
|
|
|
params.setSpeed(speed); |
|
|
|
params.setVolume(volume); |
|
|
|
return setInfoCmd(CmdDevice.acid_pump8, CmdAction.move, params, "加液泵8 移动"); |
|
|
|
} |
|
|
@ -731,6 +809,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 夹爪 设置参数 |
|
|
|
* |
|
|
|
* @param speed 速度 单位 mm/s |
|
|
|
*/ |
|
|
|
public static DeviceCommand clawSet(Double speed) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -739,26 +819,21 @@ public class DeviceCommandGenerator { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 夹爪 夹紧 |
|
|
|
* 夹爪 移动 |
|
|
|
* |
|
|
|
* @param position 位置 0-100 |
|
|
|
*/ |
|
|
|
public static DeviceCommand clawTight(Double distance) { |
|
|
|
public static DeviceCommand clawMove(Double position) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setDistance(distance); |
|
|
|
return controlCmd(CmdDevice.claw, CmdAction.tight, params, "夹爪夹紧"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 夹爪 松开 |
|
|
|
*/ |
|
|
|
public static DeviceCommand clawTight() { |
|
|
|
return controlCmd(CmdDevice.claw, CmdAction.loose, null, "夹爪松开"); |
|
|
|
params.setPosition(position); |
|
|
|
return controlCmd(CmdDevice.claw, CmdAction.tight, params, "夹爪 移动"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 夹爪 停止 |
|
|
|
*/ |
|
|
|
public static DeviceCommand clawStop() { |
|
|
|
return controlCmd(CmdDevice.claw, CmdAction.stop, null, "夹爪松开"); |
|
|
|
return controlCmd(CmdDevice.claw, CmdAction.stop, null, "夹爪停止"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -918,6 +993,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热棒1 开启加热 |
|
|
|
* |
|
|
|
* @param temperature 目标温度 |
|
|
|
*/ |
|
|
|
public static DeviceCommand heatRod1Open(Double temperature) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -927,6 +1004,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热棒2 开启加热 |
|
|
|
* |
|
|
|
* @param temperature 目标温度 |
|
|
|
*/ |
|
|
|
public static DeviceCommand heatRod2Open(Double temperature) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -936,6 +1015,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热棒3 开启加热 |
|
|
|
* |
|
|
|
* @param temperature 目标温度 |
|
|
|
*/ |
|
|
|
public static DeviceCommand heatRod3Open(Double temperature) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -945,6 +1026,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热棒4 开启加热 |
|
|
|
* |
|
|
|
* @param temperature 目标温度 |
|
|
|
*/ |
|
|
|
public static DeviceCommand heatRod4Open(Double temperature) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -954,6 +1037,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热棒5 开启加热 |
|
|
|
* |
|
|
|
* @param temperature 目标温度 |
|
|
|
*/ |
|
|
|
public static DeviceCommand heatRod5Open(Double temperature) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -963,6 +1048,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 加热棒6 开启加热 |
|
|
|
* |
|
|
|
* @param temperature 目标温度 |
|
|
|
*/ |
|
|
|
public static DeviceCommand heatRod6Open(Double temperature) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -1015,6 +1102,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 三色灯开启 |
|
|
|
* |
|
|
|
* @param color red | green | blue |
|
|
|
*/ |
|
|
|
public static DeviceCommand tricolorLightOpen(CmdColor color) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -1031,21 +1120,22 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 相机补灯光 开启 |
|
|
|
* |
|
|
|
* @param brightness 亮度 0-100 |
|
|
|
*/ |
|
|
|
public static DeviceCommand fillLightOpen(Double brightness) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
|
params.setBrightness(brightness); |
|
|
|
return controlCmd(CmdDevice.fill_light, CmdAction.open, params, "相机补灯光开启"); |
|
|
|
return controlCmd(CmdDevice.fill_light, CmdAction.open, params, "相机补光灯 开启"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 相机补灯光关闭 |
|
|
|
* 相机补光灯 关闭 |
|
|
|
*/ |
|
|
|
public static DeviceCommand fillLightClose() { |
|
|
|
return controlCmd(CmdDevice.fill_light, CmdAction.close, null, "相机补灯光关闭"); |
|
|
|
return controlCmd(CmdDevice.fill_light, CmdAction.close, null, "相机补光灯 关闭"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 冷阱开启电源 |
|
|
|
*/ |
|
|
@ -1062,6 +1152,8 @@ public class DeviceCommandGenerator { |
|
|
|
|
|
|
|
/** |
|
|
|
* 冷阱设置温度 |
|
|
|
* |
|
|
|
* @param temperature 温度 |
|
|
|
*/ |
|
|
|
public static DeviceCommand coldTrapSet(Double temperature) { |
|
|
|
DeviceCommandParams params = new DeviceCommandParams(); |
|
|
@ -1084,6 +1176,21 @@ public class DeviceCommandGenerator { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 冷阱开启制冷 |
|
|
|
*/ |
|
|
|
public static DeviceCommand coldTrapOpenCool() { |
|
|
|
return controlCmd(CmdDevice.cold_trap, CmdAction.open_cool, null, "冷阱 开启制冷"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 冷阱关闭制冷 |
|
|
|
*/ |
|
|
|
public static DeviceCommand coldTrapCloseCool() { |
|
|
|
return controlCmd(CmdDevice.cold_trap, CmdAction.close_cool, null, "冷阱 关闭制冷"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 冷阱开启加热 |
|
|
|
*/ |
|
|
|
public static DeviceCommand coldTrapOpenHeart() { |
|
|
@ -1101,7 +1208,7 @@ public class DeviceCommandGenerator { |
|
|
|
* 拍照 |
|
|
|
*/ |
|
|
|
public static DeviceCommand takePhoto() { |
|
|
|
return controlCmd(CmdDevice.photo, CmdAction.take_photo, null, "冷阱关闭加热"); |
|
|
|
return controlCmd(CmdDevice.photo, CmdAction.take_photo, null, "拍照"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|