From 134f3719c82ef2162f49a82ebcb4ef186c7f5efd Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Tue, 16 May 2023 17:32:34 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=8F=8D=E9=A6=88agv=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java | 10 +++++----- .../java/org/nl/modules/quartz/task/ToAgvDevice.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 3b14cc0..b7c543e 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -455,19 +455,19 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } else if (phase == 0x67) {//agv异常 error = ikey; data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } else if (phase == 0x71) { + } else if (phase == 0x70) { //x坐标 x = ikey; - } else if (phase == 0x72) { + } else if (phase == 0x71) { //y坐标 y = ikey; - } else if (phase == 0x73) { + } else if (phase == 0x72) { //车辆角度 angle = ikey; - } else if (phase == 0x74) { + } else if (phase == 0x73) { //agv电量 electric_qty = ikey; - } else if (phase == 0x75) { + } else if (phase == 0x74) { //三色灯状态 status = ikey; } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java index 540726c..0611c34 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java @@ -52,17 +52,17 @@ public class ToAgvDevice { request.put("REQCODE", IdUtil.simpleUUID()); request.put("TASKCODE", IdUtil.simpleUUID()); //电量 - request.put("AGVBATTERY", "80"); + request.put("AGVBATTERY", agvNdcOneDeviceDriver.getElectric_qty()); //X - request.put("POSX", "60"); + request.put("POSX", agvNdcOneDeviceDriver.getX()); //Y - request.put("POSY", "80"); + request.put("POSY", agvNdcOneDeviceDriver.getY()); //ip - request.put("AGVIP", "127.0.0.1"); + request.put("AGVIP", ObjectUtil.isEmpty(agvNdcOneDeviceDriver.getDevice().getExtraValue()) ? "" : agvNdcOneDeviceDriver.getDevice().getExtraValue().get("ip_address")); //车号 request.put("AGVCODE", device.getDevice_code()); //角度 - request.put("AGVDIR", "90"); + request.put("AGVDIR", agvNdcOneDeviceDriver.getAngle()); request.put("REQTIME", DateUtil.now()); log.info("atrQueryAgvStatus 请求参数:"+request.toJSONString()); String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrQueryAgvStatus(request.toJSONString());