[2.13.0-arch-opt] cherry pick evey single file from 2.13.2,plus it's exhausted
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.view">
|
||||
package="com.mogo.eagle.core.function.map">
|
||||
|
||||
<application>
|
||||
|
||||
<receiver android:name="com.mogo.eagle.core.function.business.ai.AiCloudRangeBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.map.aiCloud.notification" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -2,10 +2,12 @@ package com.mogo.eagle.core.function
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber
|
||||
import com.mogo.eagle.core.function.business.SpeedLimitDataManager
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.aiCloudIdentifyDataManager
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager
|
||||
|
||||
@@ -20,6 +22,7 @@ class MapBizProvider :IMoGoFunctionServerProvider{
|
||||
MogoRouteOverlayManager.getInstance().init()
|
||||
MapPointCloudSubscriber.instance
|
||||
SpeedLimitDataManager.getInstance().start()
|
||||
aiCloudIdentifyDataManager.init(AbsMogoApplication.getApp())
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.mogo.eagle.core.function.business.ai
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.business.ai.net.AiCloudIdentifyNetWorkModel
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
class AiCloudIdentifyDataManager : IMogoMapListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AiCloudIdentifyData"
|
||||
|
||||
var START_METRE = 200
|
||||
var END_METRE = 2000
|
||||
|
||||
@JvmStatic
|
||||
val aiCloudIdentifyDataManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
AiCloudIdentifyDataManager()
|
||||
}
|
||||
}
|
||||
|
||||
private val aiCloudIdentifyNetWorkModel = AiCloudIdentifyNetWorkModel()
|
||||
private var showAiCloud = false
|
||||
|
||||
fun init(mContext: Context) {
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.registerOnMessageListener(
|
||||
0x040003, //低频数据
|
||||
object : IMogoOnMessageListener<SocketDownData.SocketDownDataProto> {
|
||||
override fun target(): Class<SocketDownData.SocketDownDataProto> {
|
||||
return SocketDownData.SocketDownDataProto::class.java
|
||||
}
|
||||
|
||||
override fun onMsgReceived(obj: SocketDownData.SocketDownDataProto?) {
|
||||
if (!FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
}
|
||||
obj?.let {
|
||||
obj.data?.let {
|
||||
if (showAiCloud) {
|
||||
if (it.allListList == null || it.allListList.size == 0) {
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
}
|
||||
MapIdentifySubscriber.instance.renderAiCloudResult(it.allListList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
requestRangeOfIdentify()
|
||||
}
|
||||
|
||||
fun requestRangeOfIdentify() {
|
||||
aiCloudIdentifyNetWorkModel.requestIdentifyRange({
|
||||
CallerLogger.d(
|
||||
M_MAP + TAG,
|
||||
"requestIdentifyRange ok startRange:$START_METRE, endRange:$END_METRE"
|
||||
)
|
||||
}, {
|
||||
CallerLogger.d(
|
||||
M_MAP + TAG,
|
||||
"requestIdentifyRange error : $it , startRange:$START_METRE, endRange:$END_METRE"
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
override fun onMapVisualAngleChanged(visualAngleMode: VisualAngleMode) {
|
||||
super.onMapVisualAngleChanged(visualAngleMode)
|
||||
when {
|
||||
visualAngleMode.isRoma -> {
|
||||
showAiCloud = true
|
||||
FunctionBuildConfig.isDrawIdentifyData = false
|
||||
}
|
||||
else -> {
|
||||
showAiCloud = false
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mogo.eagle.core.function.business.ai
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.START_METRE
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.aiCloudIdentifyDataManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
|
||||
class AiCloudRangeBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AiCloudRangeBroadcastReceiver"
|
||||
private const val START_RANGE = "startRange"
|
||||
private const val END_RANGE = "endRange"
|
||||
|
||||
// adb shell am broadcast -a com.map.aiCloud.notification --ei startRange 140 --ei endRange 2000
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val startRange = intent.getIntExtra(START_RANGE, START_METRE)
|
||||
val endRange = intent.getIntExtra(END_RANGE, END_METRE)
|
||||
START_METRE = startRange
|
||||
END_METRE = endRange
|
||||
CallerLogger.d("$M_MAP$TAG", "startRange:$startRange, endRange:$endRange")
|
||||
aiCloudIdentifyDataManager.requestRangeOfIdentify()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.mogo.eagle.core.function.business.ai.net
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.START_METRE
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.apiCall
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.zhjt.service_biz.FuncConfig
|
||||
|
||||
class AiCloudIdentifyNetWorkModel {
|
||||
|
||||
companion object {
|
||||
val aiCloudIdentifyNetWorkModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
AiCloudIdentifyNetWorkModel()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getHost(): String {
|
||||
var host = "http://dzt-city.zhidaozhixing.com"
|
||||
when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV,
|
||||
DebugConfig.NET_MODE_QA -> host = "http://dzt-qa-city.zhidaozhixing.com"
|
||||
}
|
||||
return host
|
||||
}
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = getHost()): IAiCloudIdentifyApiService {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
|
||||
.create(IAiCloudIdentifyApiService::class.java)
|
||||
}
|
||||
|
||||
fun requestIdentifyRange(
|
||||
onSuccess: (() -> Unit),
|
||||
onError: ((String) -> Unit)
|
||||
) {
|
||||
request<BaseResponse<Any>> {
|
||||
val map = mutableMapOf<String, Any>()
|
||||
start {
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["status"] = true
|
||||
map["startMetre"] = START_METRE
|
||||
map["endMetre"] = END_METRE
|
||||
map["type"] = 1
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
getNetWorkApi().identifyRange(map)
|
||||
}
|
||||
}
|
||||
onSuccess {
|
||||
onSuccess.invoke()
|
||||
}
|
||||
onError {
|
||||
it.message?.let { errorMsg ->
|
||||
onError.invoke(errorMsg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.eagle.core.function.business.ai.net
|
||||
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.Headers
|
||||
import retrofit2.http.POST
|
||||
|
||||
interface IAiCloudIdentifyApiService {
|
||||
|
||||
@Headers("Content-type:application/json;charset=UTF-8")
|
||||
@POST("yycp-c-v2x-service/dataFusion/remoteDrivingSet")
|
||||
suspend fun identifyRange(@Body map: MutableMap<String, Any>): BaseResponse<Any>
|
||||
}
|
||||
@@ -3,16 +3,35 @@ package com.mogo.eagle.core.function.business.identify
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
interface Identify {
|
||||
|
||||
fun renderAdasRecognizedResult(resultList: List<TrackedObject>?)
|
||||
fun renderAdasRecognizedResult(resultList: List<TrackedObject>?) {
|
||||
|
||||
fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?)
|
||||
}
|
||||
|
||||
fun renderAiCloudResult(resultList: List<SocketDownData.CloudRoadDataProto>) {
|
||||
|
||||
}
|
||||
|
||||
fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?) {
|
||||
|
||||
}
|
||||
|
||||
fun renderOBUWarningObj(exist: Boolean, obuTrafficData: TrafficData) {
|
||||
|
||||
}
|
||||
|
||||
fun clearOldMarker()
|
||||
fun clearOldMarker() {
|
||||
|
||||
}
|
||||
|
||||
fun clearAiMarker() {
|
||||
|
||||
}
|
||||
|
||||
fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.collection.ArraySet
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.w
|
||||
import com.mogo.map.MogoMarkerManager
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
class IdentifyAiCloudDataDrawer : Identify {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "IdentifyDataDrawer"
|
||||
}
|
||||
|
||||
/**
|
||||
* 上一帧数据的缓存
|
||||
*/
|
||||
private val mMarkersCaches = ConcurrentHashMap<String, SocketDownData.CloudRoadDataProto>()
|
||||
|
||||
/**
|
||||
* 记录每次实际绘制的交通元素UUID
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
private val trafficDataUuidList = ArraySet<String>()
|
||||
|
||||
/**
|
||||
* 过滤后的数据集合
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
private val mFilterTrafficData = HashMap<String, SocketDownData.CloudRoadDataProto>()
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun renderAiCloudResult(resultList: List<SocketDownData.CloudRoadDataProto>) {
|
||||
if (resultList.isEmpty()) {
|
||||
clearOldMarker()
|
||||
w(TAG, "感知数据为空无需渲染……")
|
||||
return
|
||||
}
|
||||
if (!MogoStatusManager.getInstance().isVrMode) {
|
||||
clearOldMarker()
|
||||
w(TAG, "渲染 adas 识别的数据 当前不是VR模式")
|
||||
return
|
||||
}
|
||||
|
||||
//清除缓存
|
||||
for (data in resultList) {
|
||||
if (trafficDataUuidList.size > 0 && trafficDataUuidList.contains("" + data.uuid)) {
|
||||
trafficDataUuidList.remove("" + data.uuid)
|
||||
}
|
||||
}
|
||||
|
||||
//清除缓存,删除marker
|
||||
val it: MutableIterator<*> = trafficDataUuidList.iterator()
|
||||
while (it.hasNext()) {
|
||||
val key = it.next() as String
|
||||
it.remove()
|
||||
mMarkersCaches.remove(key)
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.removeMarker(key.hashCode().toString())
|
||||
}
|
||||
|
||||
val filterList = filterTrafficData(resultList)
|
||||
if (filterList.size > 0) {
|
||||
// 绘制新数据
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.updateBatchAiMarkerPosition(filterList)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据过滤器
|
||||
*
|
||||
* @return 过滤后的数据集合
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
private fun filterTrafficData(trafficData: List<SocketDownData.CloudRoadDataProto>): HashMap<String, SocketDownData.CloudRoadDataProto> {
|
||||
mFilterTrafficData.clear()
|
||||
trafficDataUuidList.clear()
|
||||
for (data in trafficData) {
|
||||
val uuid = "" + data.uuid
|
||||
mMarkersCaches[uuid] = data
|
||||
trafficDataUuidList.add(uuid)
|
||||
mFilterTrafficData[uuid] = data
|
||||
}
|
||||
return mFilterTrafficData
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun clearAiMarker() {
|
||||
trafficDataUuidList.clear()
|
||||
mMarkersCaches.forEach { (uuid, _) ->
|
||||
mMarkersCaches.remove(uuid)
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.removeMarker(uuid.hashCode().toString())
|
||||
}
|
||||
mFilterTrafficData.clear()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
|
||||
@@ -22,7 +23,12 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
internal val beautifyDataDrawer = IdentifyBeautifyDataDrawer()
|
||||
}
|
||||
|
||||
object AiIdentify {
|
||||
internal val aiCloudDataDrawer = IdentifyAiCloudDataDrawer()
|
||||
}
|
||||
|
||||
private var identify: Identify? = null
|
||||
private var aiCloudIdentify: Identify? = null
|
||||
|
||||
init {
|
||||
identify = if (FunctionBuildConfig.isBeautyMode) {
|
||||
@@ -30,14 +36,17 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
} else {
|
||||
DriverIdentify.originDataDrawer
|
||||
}
|
||||
aiCloudIdentify = AiIdentify.aiCloudDataDrawer
|
||||
CallerObuWarningListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
private const val MSG_DATA_TRACK = 0
|
||||
private const val MSG_DATA_WARNING = 1
|
||||
private const val MSG_DATA_OBU_WARNING_UPDATE = 2
|
||||
private const val MSG_DATA_OBU_WARNING_REMOVE = 3
|
||||
private const val MSG_DATA_CLEAR = 4
|
||||
private const val MSG_DATA_AI_TRACK = 1
|
||||
private const val MSG_DATA_WARNING = 2
|
||||
private const val MSG_DATA_OBU_WARNING_UPDATE = 3
|
||||
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 val mDrawerHandler: Handler =
|
||||
@@ -63,6 +72,11 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
identify!!.renderAdasRecognizedResult(msg.obj as List<TrackedObject>?)
|
||||
}
|
||||
}
|
||||
MSG_DATA_AI_TRACK -> {
|
||||
if (msg.obj is List<*>) {
|
||||
aiCloudIdentify!!.renderAiCloudResult(msg.obj as List<SocketDownData.CloudRoadDataProto>)
|
||||
}
|
||||
}
|
||||
MSG_DATA_WARNING -> {
|
||||
if (msg.obj is List<*>) {
|
||||
identify!!.renderPlanningWarningObj(msg.obj as List<MessagePad.PlanningObject>?)
|
||||
@@ -81,6 +95,9 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
MSG_DATA_CLEAR -> {
|
||||
identify!!.clearOldMarker()
|
||||
}
|
||||
MSG_DATA_AI_CLEAR -> {
|
||||
aiCloudIdentify!!.clearAiMarker()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,6 +109,13 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun renderAiCloudResult(resultList: List<SocketDownData.CloudRoadDataProto>) {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_AI_TRACK
|
||||
message.obj = resultList
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?) {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_WARNING
|
||||
@@ -105,6 +129,16 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun clearAiMarker() {
|
||||
val message = Message.obtain()
|
||||
message.what = MSG_DATA_AI_CLEAR
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return identify?.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
val message = Message.obtain()
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_IDENTIFY
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMoGoIdentifyListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
/**
|
||||
* 订阅感知数据的订阅者
|
||||
@@ -14,7 +19,8 @@ import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
@Route(path = PATH_IDENTIFY)
|
||||
class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGoSubscriber,
|
||||
IMoGoAutopilotIdentifyListener {
|
||||
|
||||
private val TAG = "MapIdentifySubscriber"
|
||||
@@ -36,7 +42,6 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: List<TrackedObject>?) {
|
||||
@@ -53,6 +58,26 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
}
|
||||
}
|
||||
|
||||
fun renderAiCloudResult(cloudData: List<SocketDownData.CloudRoadDataProto>) {
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
// aiCloudDataDrawer.renderAiCloudResult(cloudData)
|
||||
IdentifyFactory.renderAiCloudResult(cloudData)
|
||||
}
|
||||
} else {
|
||||
clearAiCloudRoma()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
fun clearAiCloudRoma() {
|
||||
// aiCloudDataDrawer.clearAiMarker()
|
||||
IdentifyFactory.clearAiMarker()
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyPlanningObj(planningObjects: List<MessagePad.PlanningObject>?) {
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawIdentifyData && FunctionBuildConfig.debugTrackerProvider == 0) {
|
||||
@@ -67,7 +92,12 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotWarnMessage(warn: MessagePad.Warn?) {
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return IdentifyFactory.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,8 @@ object TrackerSourceColorHelper {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun filterData(data: TrackedObject): Boolean {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type
|
||||
) {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && (data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type)) {
|
||||
return true
|
||||
}
|
||||
var trackIPCFilter = true
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.function.impl.marker.AdasRecognizedType;
|
||||
import com.mogo.eagle.core.function.view.R;
|
||||
import com.mogo.eagle.core.function.map.R;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
|
||||
@@ -9,7 +9,7 @@ import android.widget.ImageView;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
|
||||
import com.mogo.eagle.core.function.view.R;
|
||||
import com.mogo.eagle.core.function.map.R;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@ import android.widget.LinearLayout;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
|
||||
import com.mogo.eagle.core.function.view.R;
|
||||
import com.mogo.eagle.core.function.map.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideImageLoader;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.eagle.core.utilcode.util.ViewUtils;
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.eagle.core.data.map.PoiWrapper;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
|
||||
import com.mogo.eagle.core.function.view.R;
|
||||
import com.mogo.eagle.core.function.map.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.eagle.core.data.config.CloudPoiManager;
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.graphics.BitmapFactory;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.function.view.R;
|
||||
import com.mogo.eagle.core.function.map.R;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.amap.api.maps.model.Marker;
|
||||
import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.Polyline;
|
||||
import com.autonavi.amap.mapcore.IPoint;
|
||||
import com.mogo.eagle.core.function.view.R;
|
||||
import com.mogo.eagle.core.function.map.R;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.view.R
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import kotlinx.android.synthetic.main.view_maker_with_count.view.*
|
||||
|
||||
class MakerWithCount @JvmOverloads constructor(
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.view.LayoutInflater
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.view.R
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
|
||||
class V2XMarkerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.view.R
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.MapAssetStyleUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02Lis
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showVideoDialog
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import com.mogo.eagle.core.function.smp.MakerWithCount
|
||||
import com.mogo.eagle.core.function.smp.MarkerDrawerManager
|
||||
import com.mogo.eagle.core.function.smp.MarkerDrawerManager.callback
|
||||
|
||||
Reference in New Issue
Block a user