[Change]
优化调试面板功能排列 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -3,7 +3,6 @@ package com.mogo.module.common.drawer;
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
@@ -33,7 +32,10 @@ public class IdentifyDataDrawer {
|
||||
* 已经感知不到的脏数据
|
||||
*/
|
||||
private final ConcurrentHashMap<String, TrafficData> mDirtyPositions = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 记录每次实际绘制的交通元素UUID
|
||||
*/
|
||||
private final ArrayList<String> trafficDataUuidList = new ArrayList<>();
|
||||
/**
|
||||
* 过滤后的数据集合
|
||||
*/
|
||||
@@ -65,7 +67,7 @@ public class IdentifyDataDrawer {
|
||||
* @param resultList adas感知融合数据
|
||||
*/
|
||||
public void renderAdasRecognizedResult(ArrayList<TrafficData> resultList) {
|
||||
if (resultList == null || resultList.isEmpty() || !DebugConfig.isUseAdasRecognize()) {
|
||||
if (resultList == null || resultList.isEmpty()) {
|
||||
clearOldMarker();
|
||||
Logger.w(TAG, "感知数据为空无需渲染……");
|
||||
return;
|
||||
@@ -78,7 +80,7 @@ public class IdentifyDataDrawer {
|
||||
}
|
||||
|
||||
// 循环将集合中的数据提取记录
|
||||
ArrayList<String> trafficDataUuidList = new ArrayList<>();
|
||||
|
||||
for (TrafficData trafficData : resultList) {
|
||||
// 过滤掉未知感知数据
|
||||
if (trafficData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI) {
|
||||
@@ -132,9 +134,13 @@ public class IdentifyDataDrawer {
|
||||
* 清除旧的 marker 数据
|
||||
*/
|
||||
public void clearOldMarker() {
|
||||
if (mMarkersCaches != null) {
|
||||
mMarkersCaches.clear();
|
||||
for (String uuid : trafficDataUuidList) {
|
||||
MogoApisHandler.getInstance().getApis()
|
||||
.getMapServiceApi()
|
||||
.getMarkerManager(mContext)
|
||||
.removeMarker(uuid);
|
||||
}
|
||||
trafficDataUuidList.clear();
|
||||
}
|
||||
|
||||
private void addPreVehicleModel() {
|
||||
|
||||
Reference in New Issue
Block a user