opt: 新增上报AGV行走方向、路线行走距离。
This commit is contained in:
@@ -220,7 +220,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
} else {
|
} else {
|
||||||
//上报异常信息
|
//上报异常信息
|
||||||
//(不需要WCS反馈)
|
//(不需要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));
|
device = deviceAppService.findDeviceByCode(String.valueOf(agvaddr));
|
||||||
} else {
|
} else {
|
||||||
//todo NDC根据车辆编号123456进行查找特定车辆
|
//todo NDC根据车辆编号123456进行查找特定车辆
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
int status = 0; //agv状态
|
int status = 0; //agv状态
|
||||||
int agv_status = 0; //车辆动作状态
|
int agv_status = 0; //车辆动作状态
|
||||||
int is_have = 0; //是否有货
|
int is_have = 0; //是否有货
|
||||||
|
int direction = 0;// agv行走方向
|
||||||
|
int distance = 0;// agv路线剩余距离
|
||||||
int error = 0; //车辆故障
|
int error = 0; //车辆故障
|
||||||
|
|
||||||
int last_x = 0;
|
int last_x = 0;
|
||||||
@@ -708,6 +710,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
status = ikey;
|
status = ikey;
|
||||||
} else if (phase == 0x75) {
|
} else if (phase == 0x75) {
|
||||||
is_have = ikey;
|
is_have = ikey;
|
||||||
|
} else if (phase == 0x76) {
|
||||||
|
direction = ikey;
|
||||||
|
} else if (phase == 0x77) {
|
||||||
|
distance = ikey;
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isEmpty(data)) {
|
if (!ObjectUtil.isEmpty(data)) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ public class SyncDeviceStatus {
|
|||||||
json.put("positionAngle", agvNdcOneDeviceDriver.getAngle());
|
json.put("positionAngle", agvNdcOneDeviceDriver.getAngle());
|
||||||
json.put("message", agvNdcOneDeviceDriver.getAgv_message());
|
json.put("message", agvNdcOneDeviceDriver.getAgv_message());
|
||||||
json.put("isLaden", agvNdcOneDeviceDriver.getIs_have());
|
json.put("isLaden", agvNdcOneDeviceDriver.getIs_have());
|
||||||
|
json.put("direction", agvNdcOneDeviceDriver.getDirection());
|
||||||
|
json.put("distance", agvNdcOneDeviceDriver.getDistance());
|
||||||
AGV.add(json);
|
AGV.add(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user