From 5e7fa7982833c98555d19f8731333aefa98f5136 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 13 Apr 2023 20:41:26 +0800 Subject: [PATCH] [2.15.0]code opt of roma and add trace --- .../core/function/hmi/ui/widget/RomaView.kt | 15 +++++++++++-- .../business/ai/AiCloudIdentifyDataManager.kt | 22 +++++-------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaView.kt index 22ea5ed7e3..b4b5867f90 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaView.kt @@ -6,8 +6,8 @@ import android.view.LayoutInflater import androidx.constraintlayout.widget.ConstraintLayout import com.mogo.eagle.core.data.multidisplay.TelematicConstant import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener -import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager.romaTrigger import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager +import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager import com.mogo.eagle.core.function.hmi.R import kotlinx.android.synthetic.main.view_roma_bg.view.* @@ -28,7 +28,18 @@ class RomaView @JvmOverloads constructor( LayoutInflater.from(context).inflate(R.layout.view_roma_bg, this, true) setOnClickListener { romaMode = !romaMode - romaTrigger(romaMode) + // 司机屏发送事件给乘客屏 + if (romaMode) { + CallerTelematicManager.sendMsgToAllClients( + TelematicConstant.OPEN_ROMA_STATUS, + "0".toByteArray() + ) + } else { + CallerTelematicManager.sendMsgToAllClients( + TelematicConstant.OPEN_ROMA_STATUS, + "1".toByteArray() + ) + } } } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt index a2ac34c741..b46f6fc633 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt @@ -19,7 +19,6 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.updateLongSightLevel import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager -import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.sendMsgToAllClients import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.sendMsgToServer import com.mogo.eagle.core.function.utils.MapBizTrace import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils @@ -96,22 +95,12 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo override fun trigger(romaStatus: Boolean) { MapBizTrace.log(TAG, "trigger") - // 司机屏发送事件给乘客屏 - if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - if (romaStatus) { - sendMsgToAllClients(TelematicConstant.OPEN_ROMA_STATUS, "0".toByteArray()) - } else { - sendMsgToAllClients(TelematicConstant.OPEN_ROMA_STATUS, "1".toByteArray()) - } - } // 乘客屏单独控制漫游 - if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { - if (romaStatus) { - // 开启roma,当前非漫游,开启 - openRoma() - } else { - closeRoma() - } + if (romaStatus) { + // 开启roma,当前非漫游,开启 + openRoma() + } else { + closeRoma() } } @@ -228,6 +217,7 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo } private fun updateRomaStyle(auto: Boolean, route: String? = null) { + MapBizTrace.log(TAG, "updateRomaStyle auto status:$auto, route:$route") CallerMapUIServiceManager.getMapUIController()?.setRoamTrajectory(route) if (auto) { FunctionBuildConfig.romaModeStyle = 0