|
|
@ -22,7 +22,7 @@ public class DeviceService { |
|
|
|
* |
|
|
|
* @param distance 移动距离 |
|
|
|
*/ |
|
|
|
public boolean moveRailArmRail(double distance) { |
|
|
|
public synchronized boolean moveRailArmRail(double distance) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("distance", distance); |
|
|
|
DeviceFeedback deviceFeedback = tcpClient.sendCommand("moveRailArmRail", params); |
|
|
@ -40,7 +40,7 @@ public class DeviceService { |
|
|
|
* @param joint2 关节2角度 |
|
|
|
* @param distance 移动距离 |
|
|
|
*/ |
|
|
|
public boolean moveRailArmJoint(double joint1, double joint2, double distance) { |
|
|
|
public synchronized boolean moveRailArmJoint(double joint1, double joint2, double distance) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("joint1", joint1); |
|
|
|
params.put("joint2", joint2); |
|
|
@ -60,7 +60,7 @@ public class DeviceService { |
|
|
|
* @param y 坐标y |
|
|
|
* @param z 坐标z |
|
|
|
*/ |
|
|
|
public boolean moveRailArmToPoint(int x, int y, int z) { |
|
|
|
public synchronized boolean moveRailArmToPoint(int x, int y, int z) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("x", x); |
|
|
|
params.put("y", y); |
|
|
@ -143,7 +143,7 @@ public class DeviceService { |
|
|
|
* @param joint1 关节1角度 |
|
|
|
* @param joint2 关节2角度 |
|
|
|
*/ |
|
|
|
public boolean moveLiquidArmJoint(double joint1, double joint2) { |
|
|
|
public synchronized boolean moveLiquidArmJoint(double joint1, double joint2) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("joint1", joint1); |
|
|
|
params.put("joint2", joint2); |
|
|
@ -162,7 +162,7 @@ public class DeviceService { |
|
|
|
* @param y 坐标y |
|
|
|
* @param z 坐标z |
|
|
|
*/ |
|
|
|
public boolean moveLiquidArmToPoint(int x, int y, int z) { |
|
|
|
public synchronized boolean moveLiquidArmToPoint(int x, int y, int z) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("x", x); |
|
|
|
params.put("y", y); |
|
|
@ -197,7 +197,7 @@ public class DeviceService { |
|
|
|
* @param pumpId 泵id |
|
|
|
* @param volume 液体体积 |
|
|
|
*/ |
|
|
|
public boolean addLiquid(String pumpId, int volume) { |
|
|
|
public synchronized boolean addLiquid(String pumpId, int volume) { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("pumpId", pumpId); |
|
|
|
params.put("volume", volume); |
|
|
|