opt: 新增上报AGV行走方向、路线行走距离。

This commit is contained in:
2025-01-22 16:18:26 +08:00
parent ac41c492e4
commit 5fa87742a9
3 changed files with 9 additions and 1 deletions

View File

@@ -220,7 +220,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} else {
//上报异常信息
//不需要WCS反馈
if (phase == 0x70 || phase == 0x71 || phase == 0x72 || phase == 0x73 || phase == 0x74 || phase == 0x75) {
if (phase == 0x70 || phase == 0x71 || phase == 0x72 || phase == 0x73 || phase == 0x74 || phase == 0x75 || phase == 0x76 || phase == 0x77) {
device = deviceAppService.findDeviceByCode(String.valueOf(agvaddr));
} else {
//todo NDC根据车辆编号123456进行查找特定车辆

View File

@@ -78,6 +78,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
int status = 0; //agv状态
int agv_status = 0; //车辆动作状态
int is_have = 0; //是否有货
int direction = 0;// agv行走方向
int distance = 0;// agv路线剩余距离
int error = 0; //车辆故障
int last_x = 0;
@@ -708,6 +710,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
status = ikey;
} else if (phase == 0x75) {
is_have = ikey;
} else if (phase == 0x76) {
direction = ikey;
} else if (phase == 0x77) {
distance = ikey;
}
if (!ObjectUtil.isEmpty(data)) {
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);

View File

@@ -77,6 +77,8 @@ public class SyncDeviceStatus {
json.put("positionAngle", agvNdcOneDeviceDriver.getAngle());
json.put("message", agvNdcOneDeviceDriver.getAgv_message());
json.put("isLaden", agvNdcOneDeviceDriver.getIs_have());
json.put("direction", agvNdcOneDeviceDriver.getDirection());
json.put("distance", agvNdcOneDeviceDriver.getDistance());
AGV.add(json);
}
}