[2.13.0-arch-opt] fix bug of thread problem and add new func obu fusion and warning union
This commit is contained in:
@@ -4,10 +4,13 @@ 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.data.traffic.TrafficData
|
||||
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.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
@@ -21,7 +24,7 @@ import mogo.yycp.api.proto.SocketDownData
|
||||
*/
|
||||
@Route(path = PATH_IDENTIFY)
|
||||
class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGoSubscriber,
|
||||
IMoGoAutopilotIdentifyListener {
|
||||
IMoGoAutopilotIdentifyListener, IMoGoObuStatusListener {
|
||||
|
||||
private val TAG = "MapIdentifySubscriber"
|
||||
|
||||
@@ -37,11 +40,12 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
|
||||
override fun onCrate() {
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
|
||||
CallerObuWarningListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
CallerObuWarningListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: List<TrackedObject>?) {
|
||||
@@ -62,7 +66,6 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
// aiCloudDataDrawer.renderAiCloudResult(cloudData)
|
||||
IdentifyFactory.renderAiCloudResult(cloudData)
|
||||
}
|
||||
} else {
|
||||
@@ -74,7 +77,6 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
}
|
||||
|
||||
fun clearAiCloudRoma() {
|
||||
// aiCloudDataDrawer.clearAiMarker()
|
||||
IdentifyFactory.clearAiMarker()
|
||||
}
|
||||
|
||||
@@ -92,6 +94,47 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateTrackerFusionData(trackObject: TrackedObject?) {
|
||||
super.updateTrackerFusionData(trackObject)
|
||||
try {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
//todo emArrow
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
try {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
IdentifyFactory.renderOBUWarningObj(true, trafficData)
|
||||
}
|
||||
} else {
|
||||
IdentifyFactory.renderOBUWarningObj(false, trafficData)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun removeTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.removeTrackerWarningInfo(trafficData)
|
||||
try {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
IdentifyFactory.renderOBUWarningObj(false, trafficData)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return IdentifyFactory.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user