[6.4.0]
[缓存下载成功的lineId]
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.och.common.module.manager.autopilot.autopilot
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.och.common.module.manager.autopilot.trajectory.TrajectoryManager
|
||||
import com.mogo.och.common.module.utils.CallerBase
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo.adas.data.bean.MogoReport
|
||||
@@ -94,6 +95,13 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
|
||||
|
||||
}
|
||||
}
|
||||
if (MogoReport.Code.Info.ISYS.INIT_TRAJECTORY_SUCCESS == guardianInfo?.code){
|
||||
TrajectoryManager.addDownLoadSuccessLine(lineId)
|
||||
}
|
||||
if (MogoReport.Code.Info.ISYS.INIT_TRAJECTORY_FAILURE == guardianInfo?.code){
|
||||
// 更新轨迹没有更新lineId 第二次下载失败 删除App成功缓存(概率很低)
|
||||
TrajectoryManager.removeDownLoadSuccessLine(lineId)
|
||||
}
|
||||
}
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
|
||||
@@ -17,6 +17,8 @@ object TrajectoryManager : IMoGoPlanningRottingListener {
|
||||
private val distanceListeners: ConcurrentHashMap<String, ITrajectoryListListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
private val downLoadSuccessLineIds = mutableListOf<Long>()
|
||||
|
||||
/**
|
||||
* 所有轨迹点
|
||||
*/
|
||||
@@ -99,4 +101,15 @@ object TrajectoryManager : IMoGoPlanningRottingListener {
|
||||
distanceListeners[tag] = listener
|
||||
}
|
||||
|
||||
fun addDownLoadSuccessLine(lineId:Long){
|
||||
if(lineId>0){
|
||||
downLoadSuccessLineIds.add(lineId)
|
||||
}
|
||||
}
|
||||
fun removeDownLoadSuccessLine(lineId:Long){
|
||||
if(lineId>0&& downLoadSuccessLineIds.contains(lineId)){
|
||||
downLoadSuccessLineIds.remove(lineId)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -285,7 +285,6 @@ object TaxiTaskModel {
|
||||
}
|
||||
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMessage?, lineId: Long) {
|
||||
super.onAutopilotGuardian(guardianInfo, lineId)
|
||||
TaxiTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo,lineId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user