..
This commit is contained in:
@@ -69,7 +69,7 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
//清除缓存
|
||||
for (data in resultList) {
|
||||
if (trafficDataUuidList.size > 0 && trafficDataUuidList.contains("" + data.uuid)) {
|
||||
if (TrackerSourceHelper.filterData(data)) {
|
||||
if (TrackerSourceColorHelper.filterData(data)) {
|
||||
continue
|
||||
}
|
||||
trafficDataUuidList.remove("" + data.uuid)
|
||||
@@ -105,7 +105,7 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
trafficDataUuidList.clear()
|
||||
for (data in trafficData) {
|
||||
// 过滤掉未知感知数据
|
||||
if (TrackerSourceHelper.filterData(data)) {
|
||||
if (TrackerSourceColorHelper.filterData(data)) {
|
||||
continue
|
||||
}
|
||||
var temp: TrackedObject = data
|
||||
@@ -113,7 +113,7 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
//首次过来的数据不添加,首次未添加的感知物在调用完绘制方法后再塞入cache map
|
||||
val cacheData = mMarkersCaches[uuid]
|
||||
if (cacheData != null) {
|
||||
val color = TrackerSourceHelper.getDefaultColor(data)
|
||||
val color = TrackerSourceColorHelper.getDefaultColor(data)
|
||||
temp = data.toBuilder().setColor(color).build()
|
||||
mFilterTrafficData[uuid] = temp
|
||||
}
|
||||
|
||||
@@ -76,13 +76,13 @@ public class TrackManager {
|
||||
mFilterTrafficData.clear();
|
||||
//进入过滤机制的感知物体,首先从缓存队列中进行查找 uuid
|
||||
for (MessagePad.TrackedObject data : trafficData) {
|
||||
if (TrackerSourceHelper.INSTANCE.filterData(data)) {
|
||||
if (TrackerSourceColorHelper.INSTANCE.filterData(data)) {
|
||||
continue;
|
||||
}
|
||||
String uuid = "" + data.getUuid();
|
||||
TrackObj trackObj = mMarkersCaches.get(uuid);
|
||||
|
||||
String color = TrackerSourceHelper.INSTANCE.getDefaultColor(data);
|
||||
String color = TrackerSourceColorHelper.INSTANCE.getDefaultColor(data);
|
||||
data = data.toBuilder().setColor(color).build();
|
||||
|
||||
if (trackObj != null) {
|
||||
@@ -131,7 +131,7 @@ public class TrackManager {
|
||||
//过滤现有元素
|
||||
for (MessagePad.TrackedObject data : resultList) {
|
||||
String uuid = "" + data.getUuid();
|
||||
if (TrackerSourceHelper.INSTANCE.filterData(data)) {
|
||||
if (TrackerSourceColorHelper.INSTANCE.filterData(data)) {
|
||||
continue;
|
||||
}
|
||||
if (trafficDataUuid.size() > 0) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import mogo.telematics.pad.MessagePad.*
|
||||
|
||||
object TrackerSourceHelper {
|
||||
object TrackerSourceColorHelper {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun filterData(data: TrackedObject): Boolean {
|
||||
Reference in New Issue
Block a user