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 c483eb95b3..92b4fa575b 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 @@ -19,6 +19,8 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto private val TAG = "MapPointCloudSubscriber" + private var isDrawPointCloud = false + init { onCrate() } @@ -41,10 +43,26 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto override fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) { // 根据配置动态控制点云是否绘制 if (FunctionBuildConfig.isDrawPointCloudData) { + if (!isDrawPointCloud) { + isDrawPointCloud = true + PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制 + } val data = PointCloudDecoder.decode(header, pointCloud) + + /** + * 更新点云数据 + * @param dataStr 点云数据 + * @param isTrasformer 是否需要转换坐标 + * @param isResidual 是否需要差量更新 + * @param isStrong 是否加粗显示 + * @return 是否执行 + */ val result = PointCloudHelper.updatePointCloudData(data, false, true, true) - }else{ - val result = PointCloudHelper.updatePointCloudData("", false, true, true) + } else { + if (isDrawPointCloud) { + isDrawPointCloud = false + PointCloudHelper.setIsDrawPointCloud(false)//停止点云绘制 + } } //Logger.d(TAG, "result=$result") } diff --git a/gradle.properties b/gradle.properties index c15874c78e..6e9a3f03c0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.3.59 MOGO_TELEMATIC_VERSION=1.3.59 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=2.2.0.6 +MAP_SDK_VERSION=2.2.0.7 MAP_SDK_OPERATION_VERSION=1.0.13 # websocket WEBSOCKET_VERSION=1.1.7