[8.0.0][Opt]回退到上一个版本的它车渲染的代码
This commit is contained in:
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
@@ -10,12 +9,10 @@ import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
|
||||
import com.mogo.map.MogoMap
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
import prediction2025.Prediction2025
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConfigListener {
|
||||
@@ -31,36 +28,9 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
internal val aiCloudDataDrawer = IdentifyAiCloudDataDrawer()
|
||||
}
|
||||
|
||||
// 预测
|
||||
object PreDriverIdentify {
|
||||
internal val preDataDrawer = IdentifyOriginDataDrawer()
|
||||
|
||||
// internal val preDataDrawer2 = IdentifyPredictionDataDrawer()
|
||||
// internal val preDataDrawer3 = IdentifyPredictionDataDrawer()
|
||||
internal val preDataDrawer2 = IdentifyOriginDataDrawer()
|
||||
internal val preDataDrawer3 = IdentifyOriginDataDrawer()
|
||||
}
|
||||
|
||||
// 决策
|
||||
object DesDriverIdentify {
|
||||
internal val desDataDrawer = IdentifyOriginDataDrawer()
|
||||
}
|
||||
|
||||
private var identify: Identify = DriverIdentify.originDataDrawer
|
||||
private var aiCloudIdentify: Identify? = null
|
||||
|
||||
// 预测
|
||||
private var preIdentify: Identify = PreDriverIdentify.preDataDrawer
|
||||
|
||||
// private var preIdentify2: Identify = PreDriverIdentify.preDataDrawer2
|
||||
// private var preIdentify3: Identify = PreDriverIdentify.preDataDrawer3
|
||||
// 决策
|
||||
private var desIdentify: Identify = DesDriverIdentify.desDataDrawer
|
||||
|
||||
private var startTime: Long = 0L
|
||||
|
||||
// private var preStartTime: Long = 0L
|
||||
// private var desStartTime: Long = 0L
|
||||
private var dockerVersion: String? = null
|
||||
|
||||
fun initType() {
|
||||
@@ -81,8 +51,6 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
private const val MSG_DATA_OBU_WARNING_REMOVE = 4
|
||||
private const val MSG_DATA_CLEAR = 5
|
||||
private const val MSG_DATA_AI_CLEAR = 6
|
||||
private const val MSG_DATA_PRE_TRACK = 7
|
||||
private const val MSG_DATA_PRE_CLEAR = 8
|
||||
|
||||
// 维护一个线程定时轮询数据进行地图绘制
|
||||
private val mDrawerHandler: Handler =
|
||||
@@ -100,23 +68,13 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
if (internal >= 1000) {
|
||||
lostFrame(internal.toString())
|
||||
identify.clearOldMarker()
|
||||
preIdentify.clearOldMarker()
|
||||
}
|
||||
sendEmptyMessageDelayed(MSG_CHECK, 1000L)
|
||||
}
|
||||
|
||||
MSG_DATA_TRACK -> {
|
||||
if (msg.obj is List<*>) {
|
||||
val objectList = msg.obj as List<TrackedObject>?
|
||||
val mapInstanceList = ArrayList<String>()
|
||||
mapInstanceList.add(MogoMap.DEFAULT)
|
||||
// if (FunctionBuildConfig.isDrawDecIdentifyData) {
|
||||
// mapInstanceList.add(MogoMap.SMALL_DES_MAP)
|
||||
// }
|
||||
if (FunctionBuildConfig.isDrawPreIdentifyData) {
|
||||
mapInstanceList.add(MogoMap.SMALL_PRED_MAP)
|
||||
}
|
||||
identify.renderAdasRegResults(objectList, mapInstanceList)
|
||||
identify.renderAdasRecognizedResult(msg.obj as List<TrackedObject>?)
|
||||
startTime = System.nanoTime()
|
||||
}
|
||||
}
|
||||
@@ -130,15 +88,6 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
}
|
||||
}
|
||||
|
||||
MSG_DATA_PRE_TRACK -> {
|
||||
if (msg.obj is List<*>) {
|
||||
val objectList = msg.obj as List<Prediction2025.mPredictionObjectApp>
|
||||
// preIdentify.renderPredictionResult(objectList, MogoMap.SMALL_PRED_MAP)
|
||||
// preIdentify2.renderPredictionResult(objectList, MogoMap.SMALL_PRED_MAP2)
|
||||
// preIdentify3.renderPredictionResult(objectList, MogoMap.SMALL_PRED_MAP3)
|
||||
}
|
||||
}
|
||||
|
||||
MSG_DATA_WARNING -> {
|
||||
if (msg.obj is List<*>) {
|
||||
identify.renderPlanningWarningObj(msg.obj as List<MessagePad.PlanningObject>?)
|
||||
@@ -158,21 +107,12 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
}
|
||||
|
||||
MSG_DATA_CLEAR -> {
|
||||
val mapInstanceList = ArrayList<String>()
|
||||
mapInstanceList.add(MogoMap.DEFAULT)
|
||||
mapInstanceList.add(MogoMap.SMALL_PRED_MAP)
|
||||
identify.clearOldMarkers(mapInstanceList)
|
||||
identify.clearOldMarker()
|
||||
}
|
||||
|
||||
MSG_DATA_AI_CLEAR -> {
|
||||
aiCloudIdentify!!.clearAiMarker(msg.data.getString("mapInstance")!!)
|
||||
}
|
||||
|
||||
MSG_DATA_PRE_CLEAR -> {
|
||||
preIdentify.clearPredictionMarker(MogoMap.SMALL_PRED_MAP)
|
||||
// preIdentify2.clearPredictionMarker(MogoMap.SMALL_PRED_MAP2)
|
||||
// preIdentify3.clearPredictionMarker(MogoMap.SMALL_PRED_MAP3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,13 +124,6 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun renderPredictionResult(predictionObjectList: List<Prediction2025.mPredictionObjectApp>?) {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_PRE_TRACK
|
||||
message.obj = predictionObjectList
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun renderAiCloudResult(
|
||||
resultList: List<SocketDownData.CloudRoadDataProto>,
|
||||
mapInstance: String
|
||||
@@ -222,12 +155,6 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun clearPredictionMarker(mapInstance: String) {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_PRE_CLEAR
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
val message = Message.obtain()
|
||||
|
||||
Reference in New Issue
Block a user