电梯交互fix

This commit is contained in:
psh
2024-01-09 17:32:23 +08:00
parent 96f9367553
commit cb0ab7cde8

View File

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