add func of tracker select of origin and obu sourve

This commit is contained in:
zhongchao
2022-08-29 14:26:06 +08:00
parent 4c86968e3e
commit 12a925fcbd
5 changed files with 83 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import android.os.Handler
import android.os.Message
import android.text.TextUtils
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.data.traffic.threatLevelColor
@@ -46,8 +47,9 @@ object TrafficMarkerDrawer {
object : Handler(WorkThreadHandler.newInstance("other_traffic_drawer").looper) {
override fun handleMessage(msg: Message) {
super.handleMessage(msg)
// TODO 因为与自动驾驶的感知重合临时关掉OBU车辆绘制
// drawerTrafficInfo()
if (FunctionBuildConfig.debugTrackerProvider == 1) {
drawerTrafficInfo()
}
// 延时50毫秒重复发送自己定时轮询进行车辆绘制可以及时将已经不存在车辆删除
sendEmptyMessageDelayed(0, 50L)
}
@@ -71,6 +73,9 @@ object TrafficMarkerDrawer {
* 更新识别数据位置
*/
fun updateITrafficLocationInfo(trafficData: TrafficData) {
if (FunctionBuildConfig.debugTrackerProvider != 1) {
return
}
val tempTraffic = mTrafficMap[trafficData.uuid]
if (tempTraffic != null) {
tempTraffic.lat = trafficData.lat
@@ -90,6 +95,9 @@ object TrafficMarkerDrawer {
* 更新识别数据颜色
*/
fun updateITrafficThreatLevelInfo(trafficData: TrafficData) {
if (FunctionBuildConfig.debugTrackerProvider != 1) {
return
}
if (trafficData != null && !TextUtils.isEmpty(trafficData.uuid)) {
val tempTraffic = mTrafficMap[trafficData.uuid]
if (tempTraffic != null) {