「Change」

升级地图
2.2.0.7
修改崩溃
添加绘制点云开关接口

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-06-06 17:54:34 +08:00
parent 5cdb57ae80
commit b92b60e9c0
2 changed files with 21 additions and 3 deletions

View File

@@ -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")
}