[6.8.0]
[fea] [指挥底盘下载轨迹 变更]
This commit is contained in:
@@ -41,20 +41,18 @@ public class BusTrajectoryManager {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private AutopilotControlParameters.AutoPilotLine mAutoPilotLine = null;
|
||||
private AutopilotControlParameters mAutoPilotLine = null;
|
||||
private Disposable mSendReqDisposable = null;
|
||||
|
||||
public BusTrajectoryManager() {
|
||||
mAutoPilotLine = new AutopilotControlParameters.AutoPilotLine(-1, "",
|
||||
"", "", "", "", 0, "",
|
||||
"", "", "", "", 0);
|
||||
mAutoPilotLine = new AutopilotControlParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步Bus路线信息
|
||||
*/
|
||||
public void syncTrajectoryInfo() {
|
||||
OchChainLogManager.writeChainLog("轨迹监控","开始或者结束下发轨迹 轨迹id"+mAutoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
OchChainLogManager.writeChainLog("轨迹监控","开始或者结束下发轨迹 轨迹id"+mAutoPilotLine.autoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
if (LoginStatusManager.isLogin() && LineModel.INSTANCE.getCurrentTask() != null
|
||||
&& LineModel.getStartStationIndex() == 0
|
||||
&& !OrderModel.isGoingToNextStation()) {
|
||||
@@ -94,46 +92,17 @@ public class BusTrajectoryManager {
|
||||
"setupAutoPilotLine(): routesResult is null.");
|
||||
return;
|
||||
} else {
|
||||
if (mAutoPilotLine == null) {
|
||||
mAutoPilotLine = new AutopilotControlParameters.AutoPilotLine(
|
||||
lineInfos.getLineId(), lineInfos.getLineName(),
|
||||
contraiInfo.getCsvFileUrl(), contraiInfo.getCsvFileMd5(),
|
||||
contraiInfo.getTxtFileUrl(), contraiInfo.getTxtFileMd5(),
|
||||
contraiInfo.getContrailSaveTime(), "",
|
||||
"", "",
|
||||
"", "",
|
||||
0);
|
||||
} else {
|
||||
mAutoPilotLine.setLineId(lineInfos.getLineId());
|
||||
mAutoPilotLine.setLineName(lineInfos.getLineName());
|
||||
mAutoPilotLine.setTrajUrl(contraiInfo.getCsvFileUrl());
|
||||
mAutoPilotLine.setTrajMd5(contraiInfo.getCsvFileMd5());
|
||||
mAutoPilotLine.setStopUrl(contraiInfo.getTxtFileUrl());
|
||||
mAutoPilotLine.setStopMd5(contraiInfo.getTxtFileMd5());
|
||||
mAutoPilotLine.setTimestamp(contraiInfo.getContrailSaveTime());
|
||||
}
|
||||
mAutoPilotLine = LineManager.INSTANCE.initAutopilotControlParameters();
|
||||
}
|
||||
}
|
||||
|
||||
private void clearAutoPilotLine() {
|
||||
if (mAutoPilotLine == null) return;
|
||||
mAutoPilotLine.setLineId(-1);
|
||||
mAutoPilotLine.setLineName("");
|
||||
mAutoPilotLine.setTrajUrl("");
|
||||
mAutoPilotLine.setTrajMd5("");
|
||||
mAutoPilotLine.setStopUrl("");
|
||||
mAutoPilotLine.setStopMd5("");
|
||||
mAutoPilotLine.setTimestamp(0);
|
||||
mAutoPilotLine.setVehicleModel("");
|
||||
mAutoPilotLine.setTrajUrl_dpqp("");
|
||||
mAutoPilotLine.setTrajMd5_dpqp("");
|
||||
mAutoPilotLine.setStopUrl_dpqp("");
|
||||
mAutoPilotLine.setStopMd5_dpqp("");
|
||||
mAutoPilotLine.setTimestamp_dpqp(0);
|
||||
mAutoPilotLine = null;
|
||||
}
|
||||
|
||||
private void startTrajReqLoop() {
|
||||
OchChainLogManager.writeChainLog("轨迹监控","开始下发轨迹 轨迹id"+mAutoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
OchChainLogManager.writeChainLog("轨迹监控","开始下发轨迹 轨迹id"+mAutoPilotLine.autoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
if (mSendReqDisposable != null && !mSendReqDisposable.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
@@ -155,7 +124,7 @@ public class BusTrajectoryManager {
|
||||
}
|
||||
|
||||
public void stopTrajReqLoop() {
|
||||
OchChainLogManager.writeChainLog("轨迹监控","结束下发轨迹 轨迹id"+mAutoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
OchChainLogManager.writeChainLog("轨迹监控","结束下发轨迹 轨迹id"+mAutoPilotLine.autoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
if (mSendReqDisposable != null) {
|
||||
CallerLogger.d(M_BUS + TAG, "stopTrajReqLoop()");
|
||||
mSendReqDisposable.dispose();
|
||||
@@ -165,12 +134,12 @@ public class BusTrajectoryManager {
|
||||
}
|
||||
|
||||
private void sendTrajectoryReq() {
|
||||
if (mAutoPilotLine == null||mAutoPilotLine.getLineId()==-1) {
|
||||
if (mAutoPilotLine == null||mAutoPilotLine.autoPilotLine.getLineId()==-1) {
|
||||
CallerLogger.e(M_BUS + TAG, "sendTrajectoryReq(): mAutoPilotLine is null!!!");
|
||||
return;
|
||||
}
|
||||
OchChainLogManager.writeChainLog("轨迹监控","sendTrajectoryReq() 下发轨迹 轨迹id"+mAutoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
CallerAutoPilotControlManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine);
|
||||
OchChainLogManager.writeChainLog("轨迹监控","sendTrajectoryReq() 下发轨迹 轨迹id"+mAutoPilotLine.autoPilotLine.getLineId(), true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
CallerAutoPilotControlManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine,0);
|
||||
CallerLogger.d(M_BUS + TAG, "sendTrajectoryReq(): "
|
||||
+ GsonUtils.toJson(mAutoPilotLine));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user