|
|
|
@ -3,6 +3,7 @@ package com.galaxis.rcs.ptr; |
|
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException; |
|
|
|
import com.fasterxml.jackson.core.type.TypeReference; |
|
|
|
import com.galaxis.rcs.plan.path.PathUtils; |
|
|
|
import com.galaxis.rcs.ptr.receiveEntity.*; |
|
|
|
import com.galaxis.rcs.ptr.receiveEntity.base.*; |
|
|
|
import com.galaxis.rcs.ptr.sendEntity.*; |
|
|
|
@ -432,7 +433,7 @@ public class AmrMessageHandler { |
|
|
|
agvItem.x = message.X; |
|
|
|
agvItem.y = message.Y; |
|
|
|
agvItem.orientation = message.CurOrientation; |
|
|
|
|
|
|
|
agvItem.direction = PathUtils.amrAngleToDirection(message.CurOrientation); |
|
|
|
agvItem.updatePosition(message.CurLogicX, message.CurLogicY, message.CurDirection); |
|
|
|
} |
|
|
|
|
|
|
|
@ -448,26 +449,12 @@ public class AmrMessageHandler { |
|
|
|
agvItem.orientation = message.CurOrientation; |
|
|
|
agvItem.logicX = message.CurLogicX; |
|
|
|
agvItem.logicY = message.CurLogicY; |
|
|
|
|
|
|
|
agvItem.direction = PathUtils.amrAngleToDirection(message.CurOrientation); |
|
|
|
// 更新Redis
|
|
|
|
agvItem.updateRedisStatus(); |
|
|
|
} |
|
|
|
|
|
|
|
private void handleTaskStatusMessage(PtrAgvItem agvItem, JsonWrapper jw, String json) throws MqttException, JsonProcessingException { |
|
|
|
// int eventId = jw.asInt("content", "EventId");
|
|
|
|
// int seqNo = jw.asInt("content", "SeqNo");
|
|
|
|
//
|
|
|
|
// switch (eventId) {
|
|
|
|
// case 4: // 任务完成
|
|
|
|
// int curLogicX = jw.asInt("content", "Info", "CurLogicX");
|
|
|
|
// int curLogicY = jw.asInt("content", "Info", "CurLogicY");
|
|
|
|
// agvItem.updateDeviceTaskStatus(seqNo, curLogicX, curLogicY, eventId);
|
|
|
|
// break;
|
|
|
|
// default:
|
|
|
|
// agvItem.updateDeviceTaskStatus(seqNo, 0, 0, eventId);
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
int EventId = jw.asInt("content", "EventId"); |
|
|
|
// log.info("1-Received message: " + json);
|
|
|
|
|