diff --git a/app_ipc_monitoring/src/main/java/com/zhidao/adas/client/ui/MainActivity.java b/app_ipc_monitoring/src/main/java/com/zhidao/adas/client/ui/MainActivity.java index 48d520686a..e2521d2633 100644 --- a/app_ipc_monitoring/src/main/java/com/zhidao/adas/client/ui/MainActivity.java +++ b/app_ipc_monitoring/src/main/java/com/zhidao/adas/client/ui/MainActivity.java @@ -973,7 +973,8 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas /*—————————————作为司机端———————————*/ int mode = Constants.getIpcConnectionMode(this); Set messageTypes = new HashSet<>(); - messageTypes.add(MessageType.TYPE_RECEIVE_POINT_CLOUD); + // 注释掉下面代码,默认开启点云订阅 + //messageTypes.add(MessageType.TYPE_RECEIVE_POINT_CLOUD); SubscribeInterfaceOptions subscribeInterfaceOptions = SubscribeInterfaceOptions.newBuilder() .setRole(com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.DEBUG) .setType(com.zhidao.support.adas.high.common.Constants.SUBSCRIBE_TYPE.UNSUBSCRIBE) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt index 969611d706..77c13167a1 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt @@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.map import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener import com.mogo.eagle.core.function.api.base.IMoGoSubscriber -import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.zhidaoauto.map.sdk.open.business.PointCloudHelper @@ -43,32 +42,35 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto } override fun onAutopilotPointCloudDataUpdate(pointCloud: ByteArray?) { - // 根据配置动态控制点云是否绘制 - if (FunctionBuildConfig.isDrawPointCloudData) { - if (!isDrawPointCloud) { - Logger.d(TAG, "====开启点云渲染====") - isDrawPointCloud = true + try {// 根据配置动态控制点云是否绘制 + if (FunctionBuildConfig.isDrawPointCloudData) { + if (!isDrawPointCloud) { + Logger.d(TAG, "====开启点云渲染====") + isDrawPointCloud = true + PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制 + } PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制 - } - PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制 - /** - * 更新点云数据 - * @param dataStr 点云数据 - * @param isTrasformer 是否需要转换坐标 - * @param isResidual 是否需要差量更新 - * @param isStrong 是否加粗显示 - * @return 是否执行 - */ - Logger.d(TAG, "====开始传入地图点云数据====") - val result = PointCloudHelper.updatePointCloudDataByPb(pointCloud, true, false, false) - Logger.d(TAG, "====结束传入地图点云数据=====$result") - } else { - if (isDrawPointCloud) { - Logger.d(TAG, "====停止点云绘制====") - isDrawPointCloud = false - PointCloudHelper.setIsDrawPointCloud(false)//停止点云绘制 + /** + * 更新点云数据 + * @param dataStr 点云数据 + * @param isTrasformer 是否需要转换坐标 + * @param isResidual 是否需要差量更新 + * @param isStrong 是否加粗显示 + * @return 是否执行 + */ + Logger.d(TAG, "====开始传入地图点云数据====") + val result = PointCloudHelper.updatePointCloudDataByPb(pointCloud, true, false, false) + Logger.d(TAG, "====结束传入地图点云数据=====$result") + } else { + if (isDrawPointCloud) { + Logger.d(TAG, "====停止点云绘制====") + isDrawPointCloud = false + PointCloudHelper.setIsDrawPointCloud(false)//停止点云绘制 + } } + } catch (e: Exception) { + e.printStackTrace() } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt index 1eb6414dc1..1a50cabba3 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt @@ -120,7 +120,7 @@ object FunctionBuildConfig { */ @Volatile @JvmField - var isDrawPointCloudData = false + var isDrawPointCloudData = true /** * 地图是否忽略判断条件直接绘制工控机引导线数据&全局路径规划