Ver código fonte

调整开关锁响应时长

liubo 3 anos atrás
pai
commit
8db203e2a8

+ 3 - 3
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/device/DeviceRemoteController.java

@@ -51,11 +51,11 @@ public class DeviceRemoteController {
         try {
             ops.write(ReUtil.hexStringToByteArray(instruct));
 
-            Thread.sleep(300);
+            Thread.sleep(1800);
 
             ops.write(ReUtil.hexStringToByteArray(CRCCHECK.getReadLockOrder(Integer.parseInt(cabinetV2Lock.getLockId()))));
 
-            Thread.sleep(100);
+            Thread.sleep(300);
             Integer status = redisService.getCacheObject(relayCode + ":" + cabinetV2Lock.getLockId());
             if(status != null && status == 1){
                 return R.ok("开锁成功");
@@ -81,7 +81,7 @@ public class DeviceRemoteController {
         try {
             ops.write(ReUtil.hexStringToByteArray(instruct));
 
-            Thread.sleep(100);
+            Thread.sleep(1800);
 
             ops.write(ReUtil.hexStringToByteArray(CRCCHECK.getReadLockOrder(Integer.parseInt(cabinetV2Lock.getLockId()))));