[6.0.0/5.0.0]MessagePad.Line新增lineName字段:各业务更新接口

This commit is contained in:
pangfan
2023-08-15 15:36:14 +08:00
committed by zhongchao
parent 56d9025875
commit 770360edf0
12 changed files with 64 additions and 106 deletions

View File

@@ -143,34 +143,35 @@ public abstract class BaseSweeperTabFragment<V extends IView, P extends Presente
ToastUtils.showLong("解析失败=" + err);
}
@Override
public void onParse(MessagePad.SetAutopilotModeReq bean) {
ToastUtils.showLong("下发命令\n" + TextFormat.printer().escapingNonAscii(false).printToString(bean));
AutopilotControlParameters parameters = new AutopilotControlParameters();
MessagePad.RouteInfo routeInfo = bean.getRouteInfo();
if (routeInfo.getRouteID() > 0) {
parameters.routeID = routeInfo.getRouteID();
@Override
public void onParse(MessagePad.SetAutopilotModeReq bean) {
ToastUtils.showLong("下发命令\n" + TextFormat.printer().escapingNonAscii(false).printToString(bean));
AutopilotControlParameters parameters = new AutopilotControlParameters();
MessagePad.RouteInfo routeInfo = bean.getRouteInfo();
if (routeInfo.getRouteID() > 0) {
parameters.routeID = routeInfo.getRouteID();
}
parameters.routeName = routeInfo.getRouteName();
parameters.startName = routeInfo.getStartName();//拼音
parameters.endName = routeInfo.getEndName();//拼音
parameters.startLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getStartLocation().getLatitude(), routeInfo.getStartLocation().getLongitude());
parameters.endLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getEndLocation().getLatitude(), routeInfo.getEndLocation().getLongitude());
parameters.vehicleType = 10;
MessagePad.Line line = routeInfo.getLine();
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
line.getLineId(), line.getLineName(),
line.getTrajUrl(), line.getTrajMd5(),
line.getStopUrl(), line.getStopMd5(),
line.getTimestamp(), line.getVehicleModel(),
line.getTrajUrlDpqp(), line.getTrajMd5Dpqp(),
line.getStopUrlDpqp(), line.getStopMd5Dpqp(),
line.getTimestampDpqp());
CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
}
parameters.routeName = routeInfo.getRouteName();
parameters.startName = routeInfo.getStartName();//拼音
parameters.endName = routeInfo.getEndName();//拼音
parameters.startLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getStartLocation().getLatitude(), routeInfo.getStartLocation().getLongitude());
parameters.endLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getEndLocation().getLatitude(), routeInfo.getEndLocation().getLongitude());
parameters.vehicleType = 10;
MessagePad.Line line = routeInfo.getLine();
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
line.getLineId(),
line.getTrajUrl(), line.getTrajMd5(),
line.getStopUrl(), line.getStopMd5(),
line.getTimestamp(), line.getVehicleModel(),
line.getTrajUrlDpqp(), line.getTrajMd5Dpqp(),
line.getStopUrlDpqp(), line.getStopMd5Dpqp(),
line.getTimestampDpqp());
CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
}
}).read();
}).read();
}
});
// 模拟 查询当前任务
findViewById(R.id.btnQueryCurrentTask).setOnClickListener(view ->