From b4bf35a1922536c45b78fd3b39dcc2e1285fe31b Mon Sep 17 00:00:00 2001 From: donghongyu Date: Tue, 13 Sep 2022 20:37:09 +0800 Subject: [PATCH] =?UTF-8?q?[Change]=20A=E3=80=81=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=82=B9=E4=BA=91=E4=B9=98=E5=AE=A2=E7=AB=AFdocker=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../autopilot/adapter/MoGoAdasListenerImpl.kt | 2 ++ .../autopilot/telematic/TeleMsgHandler.kt | 1 + .../function/map/MapPointCloudSubscriber.kt | 17 +++-------------- .../mogo/eagle/core/data/app/AppConfigInfo.kt | 3 +++ 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt index 133eddb235..1a1d52ec09 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -1,6 +1,7 @@ package com.mogo.eagle.core.function.autopilot.adapter import chassis.VehicleStateOuterClass +import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.HdMapBuildConfig import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE @@ -203,6 +204,7 @@ class MoGoAdasListenerImpl : OnAdasListener { } AdasManager.getInstance().carConfig?.let { autopilotStatusInfo.dockVersion = it.dockVersion + AppConfigInfo.dockerVersion = it.dockVersion } invokeAutoPilotStatus() } diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt index 392c350bd2..758f6e6cd6 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt @@ -66,6 +66,7 @@ class TeleMsgHandler : IMsgHandler { val carConfig = MessagePad.CarConfigResp.parseFrom(msg.body) AppConfigInfo.plateNumber = carConfig.plateNumber AppConfigInfo.iPCMacAddress = carConfig.macAddress + AppConfigInfo.dockerVersion = carConfig.dockVersion invokeNettyConnResult( "司机屏发送给乘客屏配置信息为:${ TextFormat.printer().escapingNonAscii(false).printToString(carConfig) 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 0066ee8c2a..7617da5cc4 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 @@ -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(".") diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt index 67ca33e189..0f7c242877 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt @@ -33,6 +33,9 @@ object AppConfigInfo { //工控机MAC地址 @Volatile var iPCMacAddress: String? = null + //工控机DockerVersion + @Volatile + var dockerVersion: String? = null //工控机协议版本 var protocolVersionNumber: Int = 0