rebase
This commit is contained in:
@@ -40,6 +40,9 @@ import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_AFFIR
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_MANUAL_CANCEL;
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_TIMER_CANCEL;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
//负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗
|
||||
public class DispatchAutoPilotManager implements IMogoOnMessageListener<DispatchAdasAutoPilotLocReceiverBean>
|
||||
, IDispatchRemindClickListener, IMogoCarLocationChangedListener2,
|
||||
@@ -282,11 +285,18 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(AutopilotRouteInfo autopilotRoute) {
|
||||
if (autopilotRoute == null || autopilotRoute.getModels() == null || autopilotRoute.getModels().size() == 0) {
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp globalPathResp) {
|
||||
if (globalPathResp == null || globalPathResp.getWayPointsList().size() == 0) {
|
||||
return;
|
||||
}
|
||||
DispatchServiceModel.getInstance().uploadAutopilotRoute(autopilotRoute.getModels());
|
||||
List<AutopilotRouteInfo.RouteModels> list = new ArrayList<>();
|
||||
for (MessagePad.Location location : globalPathResp.getWayPointsList()) {
|
||||
AutopilotRouteInfo.RouteModels routeModels = new AutopilotRouteInfo.RouteModels();
|
||||
routeModels.setLat(location.getLatitude());
|
||||
routeModels.setLon(location.getLongitude());
|
||||
list.add(routeModels);
|
||||
}
|
||||
DispatchServiceModel.getInstance().uploadAutopilotRoute(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -296,7 +306,7 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(@Nullable AutopilotStationInfo autopilotWayArrive) {
|
||||
public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification autopilotWayArrive) {
|
||||
if (!isDispatch) {
|
||||
return;
|
||||
}
|
||||
@@ -304,8 +314,11 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "onArriveAt data : " + autopilotWayArrive.toString());
|
||||
double endLat = autopilotWayArrive.getLat();
|
||||
double endLon = autopilotWayArrive.getLon();
|
||||
if (autopilotWayArrive.getEndLocation() == null) {
|
||||
return;
|
||||
}
|
||||
double endLat = autopilotWayArrive.getEndLocation().getLatitude();
|
||||
double endLon = autopilotWayArrive.getEndLocation().getLongitude();
|
||||
// 计算是不是到了终点
|
||||
float distanceFromSelf = CoordinateUtils.calculateLineDistance(receiverBean.getEndLon(), receiverBean.getEndLat()
|
||||
, endLon, endLat);
|
||||
@@ -323,7 +336,8 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(@Nullable AutopilotGuardianStatusInfo guardianInfo) {
|
||||
public void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user