[6.8.0]
[fea] [指挥底盘下载轨迹 变更]
This commit is contained in:
@@ -75,37 +75,18 @@ public class BusTrajectoryManager {
|
||||
if (guardianInfo == null || !guardianInfo.hasCode()) return;
|
||||
if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.getCode())) {
|
||||
// 1. 轨迹管理_轨迹开始下载(本地已有对应轨迹也触发)
|
||||
CallerLogger.d(M_BUS + TAG, "onAutopilotGuardian() 轨迹开始下载");
|
||||
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 轨迹开始下载", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
// ToastUtils.showShort("轨迹开始下载");
|
||||
stopTrajReqLoop();
|
||||
} else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.getCode())) {
|
||||
// 2. 轨迹管理_轨迹下载成功(本地已有对应轨迹也触发)
|
||||
CallerLogger.d(M_BUS + TAG, "onAutopilotGuardian() 轨迹下载成功");
|
||||
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 轨迹下载成功", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
// ToastUtils.showShort("轨迹下载成功");
|
||||
stopTrajReqLoop();
|
||||
} else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.getCode())) {
|
||||
// 3. 轨迹管理_轨迹下载失败,本地无对应轨迹
|
||||
CallerLogger.d(M_BUS + TAG, "onAutopilotGuardian() " +
|
||||
"轨迹下载失败,本地无对应轨迹");
|
||||
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 轨迹下载失败,本地无对应轨迹", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
// ToastUtils.showShort("轨迹下载失败,本地无对应轨迹");
|
||||
} else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.getCode())) {
|
||||
// 4. 轨迹管理_轨迹下载失败,本地有对应轨迹,认为成功
|
||||
CallerLogger.d(M_BUS + TAG, "onAutopilotGuardian() " +
|
||||
"轨迹下载失败,本地有对应轨迹,认为成功");
|
||||
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 轨迹下载失败,本地有对应轨迹,认为成功", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
// ToastUtils.showShort("轨迹下载失败,本地有对应轨迹,认为成功");
|
||||
} else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.getCode())) {
|
||||
// 5. 轨迹管理_轨迹下载超时
|
||||
CallerLogger.d(M_BUS + TAG, "onAutopilotGuardian() 轨迹下载超时");
|
||||
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 轨迹下载超时", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
// ToastUtils.showShort("轨迹下载超时");
|
||||
} else if ("ISSM_FUNC_AUTO_PILOT_READY".equals(guardianInfo.getCode())) {
|
||||
// 收到ssm的自动驾驶变为ready,再次下发轨迹下载.解决:域控重启,或者102域控启动太早,107节点初始化未完成导致的轨迹未进行下载。
|
||||
CallerLogger.d(M_BUS + TAG, "onAutopilotGuardian() ssm ready,再次发起下载");
|
||||
OchChainLogManager.writeChainLog("轨迹监控","onAutopilotGuardian() 再次发起下载", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY);
|
||||
syncTrajectoryInfo();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.och.unmanned.taxi.utils
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLine
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendTrajectoryDownloadReq
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -250,14 +250,14 @@ object TaxiTrajectoryManager {
|
||||
true,
|
||||
OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY
|
||||
)
|
||||
sendTrajectoryDownloadReq(mAutoPilotLine!!, COMMON_LOADING)
|
||||
CallerAutoPilotControlManager.sendTrajectoryDownloadReq(mAutoPilotLine!!, COMMON_LOADING)
|
||||
} else {
|
||||
e(SceneConstant.M_TAXI + TAG, "sendTrajectoryReq(): mAutoPilotLine is null!!!")
|
||||
}
|
||||
|
||||
if (mPreAutoPilotLine != null) {
|
||||
printInfoMsg("[下发预加载轨迹] sendTrajectoryDownloadReq, lindId=" + mPreAutoPilotLine?.autoPilotLine?.lineId + ", lineName=" + mPreAutoPilotLine?.autoPilotLine?.lineName)
|
||||
sendTrajectoryDownloadReq(mPreAutoPilotLine!!, PRE_LOADING)
|
||||
CallerAutoPilotControlManager.sendTrajectoryDownloadReq(mPreAutoPilotLine!!, PRE_LOADING)
|
||||
} else {
|
||||
e(SceneConstant.M_TAXI + TAG, "sendTrajectoryReq(): mPreAutoPilotLine is null!!!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user