[6.5.0] 僵尸车修改模型参数,提供路口统计能力,路口探查地图加自车容错及日志

This commit is contained in:
EmArrow
2024-07-11 16:52:36 +08:00
parent af30496b33
commit 67fc70f814
9 changed files with 72 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.datacenter.IDataCenterProvider
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.datacenter.location.MoGoLocationDispatcher
import com.mogo.eagle.core.function.datacenter.v2x.RoadLineEventManager
import com.mogo.eagle.core.function.datacenter.v2x.SpeedLimitDispatcher
import com.mogo.eagle.core.function.datacenter.v2x.TrafficLightDispatcher
@@ -24,6 +25,7 @@ class DataCenterProvider: IDataCenterProvider {
CallerMsgBoxManager.queryAllMessages(it)
TrafficLightDispatcher.INSTANCE.initServer(it)
SpeedLimitDispatcher.INSTANCE.initLimit(it)
RoadLineEventManager.INSTANCE.init()
}
}

View File

@@ -0,0 +1,47 @@
package com.mogo.eagle.core.function.datacenter.v2x
import android.util.Log
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
import com.zhidaoauto.map.data.road.RoadCross
/**
* 路线功能相关绑定路线id后业务控制数据变化均可以封装在这里实现
*/
class RoadLineEventManager : IMoGoMapRoadListener, IMoGoAutopilotStatusListener {
companion object{
private const val TAG = "RoadLineEventManager"
val INSTANCE by lazy(LazyThreadSafetyMode.SYNCHRONIZED){
RoadLineEventManager()
}
}
private var record = false
fun init() {
CallerMapRoadListenerManager.addListener(TAG, this)
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
}
override fun onAutopilotRouteLineId(lineId: Long) {
super.onAutopilotRouteLineId(lineId)
record = lineId != 0L
}
override fun onRoadChange(cross: Boolean, roadCross: RoadCross?) {
super.onRoadChange(cross, roadCross)
Log.e(TAG, "onRoadChange: $cross, $roadCross")
if(!record){
return
}
if(!cross){
CallerAutoPilotStatusListenerManager.updateRoadCount()
}
}
}