[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()
}
}
}

View File

@@ -146,7 +146,7 @@ object TrackerSourceFilterHelper {
.longitude(data.longitude)
.isUseGps(true)
.rotate(data.heading.toFloat())
.icon3DRes(R.raw.yujingguangquan)
.icon3DRes(R.raw.testguangquan)
.scale(scale)
.set3DMode(true)
.build()

View File

@@ -33,7 +33,7 @@ class RoadCrossCameraManager : IMoGoMapRoadListener {
private const val TAG = "RoadCrossCameraManager"
private const val REQUEST_CAMERA_MSG = 0
private const val REMOVE_MARKER_DELAY_TIME = 10_000L
private const val REMOVE_MARKER_DELAY_TIME = 10000L
val instance: RoadCrossCameraManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
RoadCrossCameraManager()
@@ -53,6 +53,7 @@ class RoadCrossCameraManager : IMoGoMapRoadListener {
private val handler = object :Handler(Looper.getMainLooper()){
override fun handleMessage(msg: Message) {
super.handleMessage(msg)
CallerLogger.d("$M_MAP$TAG", "remove marker")
overlayManager?.removeAllPointsInOwner(TAG)
}
}
@@ -169,7 +170,7 @@ class RoadCrossCameraManager : IMoGoMapRoadListener {
// 停止请求摄像头数据
ndeRoadCameraNetWorkModel.cancelRequest("roadCross")
// 清除marker
CallerLogger.d("$M_MAP$TAG", "remove marker")
CallerLogger.d("$M_MAP$TAG", "remove marker handler")
handler.sendEmptyMessageDelayed(REQUEST_CAMERA_MSG, REMOVE_MARKER_DELAY_TIME)
// 释放控制
isCameraRequest = false

View File

@@ -77,6 +77,7 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context
fun openRoam() {
this.onResume()
getUI()?.setVisible(true)
getUI()?.showMyLocation(false)
CallerMapAiCloudDataManager.addListener(RoadCrossRoamView.TAG, this)
// 更新地图视角 - 高视角
getUI()?.changeMapVisualAngle(VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP, null)