「Change」

增加控制点云绘制的字段isDrawPointCloudData

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-05-23 19:59:47 +08:00
parent 2d62ffe44d
commit 2292651b14
2 changed files with 16 additions and 6 deletions

View File

@@ -1,9 +1,9 @@
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.CallerAutopilotPointCloudListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.zhidao.support.adas.high.common.PointCloudDecoder
import com.zhidaoauto.map.sdk.open.business.PointCloudHelper
import mogo.telematics.pad.MessagePad
@@ -36,13 +36,14 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto
override fun onDestroy() {
CallerAutopilotPointCloudListenerManager.removeListener(TAG)
}
override fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) {
val data = PointCloudDecoder.decode(header, pointCloud)
val result = PointCloudHelper.updatePointCloudData(data, false, true, true)
//Logger.d(TAG, "result=$result")
// 根据配置动态控制点云是否绘制
if (FunctionBuildConfig.isDrawPointCloudData) {
val data = PointCloudDecoder.decode(header, pointCloud)
val result = PointCloudHelper.updatePointCloudData(data, false, true, true)
//Logger.d(TAG, "result=$result")
}
}
}