[缓存下载成功的lineId]
This commit is contained in:
yangyakun
2024-04-19 16:45:05 +08:00
parent fb2abb828b
commit d4bf056b95
3 changed files with 21 additions and 1 deletions

View File

@@ -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

View File

@@ -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)
}
}
}

View File

@@ -285,7 +285,6 @@ object TaxiTaskModel {
}
override fun onAutopilotGuardian(guardianInfo: MogoReportMessage?, lineId: Long) {
super.onAutopilotGuardian(guardianInfo, lineId)
TaxiTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo,lineId)
}