A、增加点云动态订阅功能

Signed-off-by: “donghongyu-mackbook” <donghongyu@zhidaoauto.com>
This commit is contained in:
“donghongyu-mackbook”
2022-08-25 15:29:48 +08:00
parent b6b77e8b02
commit cb054276b5
4 changed files with 33 additions and 6 deletions

View File

@@ -7,6 +7,9 @@ import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
import com.mogo.eagle.core.data.map.CenterLine
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
import com.mogo.eagle.core.function.call.base.CallerBase
import com.zhidao.support.adas.high.AdasManager
import com.zhidao.support.adas.high.common.Constants
import com.zhidao.support.adas.high.common.MessageType
/**
* @author xiaoyuzhou
@@ -67,6 +70,18 @@ object CallerHDMapManager : CallerBase() {
* @param isDrawPointCloud 是否绘制点云
*/
fun setIsDrawPointCloud(isDrawPointCloud: Boolean) {
if (isDrawPointCloud) {
AdasManager.getInstance().subscribeInterface(
Constants.TERMINAL_ROLE.DRIVER,
Constants.SUBSCRIBE_TYPE.SUBSCRIBE,
MessageType.TYPE_RECEIVE_POINT_CLOUD)
} else {
AdasManager.getInstance().subscribeInterface(
Constants.TERMINAL_ROLE.DRIVER,
Constants.SUBSCRIBE_TYPE.UNSUBSCRIBE,
MessageType.TYPE_RECEIVE_POINT_CLOUD)
}
FunctionBuildConfig.isDrawPointCloudData = isDrawPointCloud
return mapProviderApi.setIsDrawPointCloud(isDrawPointCloud)
}
@@ -92,7 +107,7 @@ object CallerHDMapManager : CallerBase() {
* 设置地图是否是Debug模式
* @param debugMode 是否开启Debug模式
*/
fun setDebugMode(debugMode: Boolean){
fun setDebugMode(debugMode: Boolean) {
return mapProviderApi.setDebugMode(debugMode)
}
}