Browse Source

电梯交互fix

master
psh 1 year ago
parent
commit
cb0ab7cde8
  1. 8
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/utils/SocketUtil.java

8
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/utils/SocketUtil.java

@ -72,15 +72,15 @@ public class SocketUtil {
write(b); write(b);
int[] arr = packageResult(); int[] arr = packageResult();
if (arr[7] == 0x00) { if (arr[7] == 0x00) {
if ((arr[8] == 0x01 && agvaddr==2421)|| if ((arr[9] == 0x01 && agvaddr==2421)||
(arr[8] == 0x02 && agvaddr==2422)) { (arr[9] == 0x02 && agvaddr==2422)) {
log.info("电梯已就位,下发开门指令"); log.info("电梯已就位,下发开门指令");
write(move); write(move);
packageResult(); packageResult();
if (arr[10] == 0x11 && action == 0X10) { if (arr[11] == 0x11 && action == 0X0A) {
log.info("电梯已开门就位,反馈NDC允许进入"); log.info("电梯已开门就位,反馈NDC允许进入");
return true; return true;
} else if (arr[10] == 0x21 && action == 0X00) { } else if (arr[11] == 0x21 && action == 0X00) {
log.info("电梯已关门就位,反馈NDC"); log.info("电梯已关门就位,反馈NDC");
return true; return true;
} }

Loading…
Cancel
Save