A、修复点云乘客端docker版本获取失败的情况

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-09-13 20:37:09 +08:00
parent d9e8b63a37
commit b4bf35a192
4 changed files with 9 additions and 14 deletions

View File

@@ -1,11 +1,9 @@
package com.mogo.eagle.core.function.map
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
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
@@ -18,14 +16,12 @@ import java.math.BigDecimal
* @author donghongyu
*/
class MapPointCloudSubscriber private constructor()
: IMoGoSubscriber, IMoGoAutopilotPointCloudListener, IMoGoAutopilotStatusListener {
: IMoGoSubscriber, IMoGoAutopilotPointCloudListener {
private val TAG = "MapPointCloudSubscriber"
private var isDrawPointCloud = false
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
init {
onCrate()
}
@@ -38,13 +34,10 @@ class MapPointCloudSubscriber private constructor()
override fun onCrate() {
CallerAutopilotPointCloudListenerManager.addListener(TAG, this)
// 添加 ADAS状态 监听
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
}
override fun onDestroy() {
CallerAutopilotPointCloudListenerManager.removeListener(TAG)
CallerAutoPilotStatusListenerManager.removeListener(TAG)
}
override fun onAutopilotPointCloudDataUpdate(pointCloud: ByteArray?) {
@@ -80,17 +73,13 @@ class MapPointCloudSubscriber private constructor()
}
}
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
mAutoPilotStatusInfo = autoPilotStatusInfo
}
/**
* 判断是否是260之后但版本
*/
fun isDrawCloudPointDockerVersion(): Boolean {
// 由于Docker命名规则不统一但核心版本是统一但采用"."分割,如下
// MAP-taxi_RoboTaxi_Default_2.2.0_badcasetest_20220215_dev
val dockerVersionName = mAutoPilotStatusInfo?.dockVersion
val dockerVersionName = AppConfigInfo.dockerVersion
// "." 分割,取前两位
val dockerVersionNameArray = dockerVersionName?.split(".")