From ae836ca84710d1b8b59925ee05e2be4dde506e45 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Mon, 16 Jun 2025 20:02:27 +0800 Subject: [PATCH] =?UTF-8?q?[8.1.0][feat]=E4=BC=98=E5=8C=96=E5=86=B3?= =?UTF-8?q?=E7=AD=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../passenger/presenter/PM2ADASPresenter.kt | 18 ++++ .../b2/layout/shuttle_p_m2_hpmap_fragment.xml | 16 ++-- .../passenger/ui/homepage/HomeViewModel.kt | 2 +- .../routeoverlay/DecisionDataManager.kt | 26 ++++-- .../routeoverlay/PredictionDataManager.kt | 25 +++-- .../function/view/CoordinateAnimationView.kt | 10 ++ .../core/function/view/DecisionLayout.kt | 23 ++++- .../eagle/core/function/view/MapBizView.kt | 5 + .../core/function/view/PredictionLayout.kt | 15 ++- .../layout/layout_b2_decision_container.xml | 93 +++++++++++++++++++ .../layout/layout_b2_prediction_container.xml | 35 +++++++ .../src/main/res/values/attrs.xml | 7 ++ 12 files changed, 249 insertions(+), 26 deletions(-) create mode 100644 core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_decision_container.xml create mode 100644 core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_prediction_container.xml diff --git a/OCH/shuttle/passenger_weaknet/src/main/java/b2/com/mogo/och/shuttle/weaknet/passenger/presenter/PM2ADASPresenter.kt b/OCH/shuttle/passenger_weaknet/src/main/java/b2/com/mogo/och/shuttle/weaknet/passenger/presenter/PM2ADASPresenter.kt index ae43e866a0..7781ff15d1 100644 --- a/OCH/shuttle/passenger_weaknet/src/main/java/b2/com/mogo/och/shuttle/weaknet/passenger/presenter/PM2ADASPresenter.kt +++ b/OCH/shuttle/passenger_weaknet/src/main/java/b2/com/mogo/och/shuttle/weaknet/passenger/presenter/PM2ADASPresenter.kt @@ -3,6 +3,7 @@ package com.mogo.och.shuttle.weaknet.passenger.presenter import androidx.lifecycle.LifecycleOwner import com.amap.api.maps.model.LatLng import com.mogo.commons.mvp.Presenter +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.och.common.module.biz.birdge.BridgeListener @@ -184,25 +185,30 @@ class PM2ADASPresenter(view: PM2HPMapFragment?) : if(haveLine){// 有订单 if(arrived){//展示高德地图 if(aiMessageShowmagic){ + updateMapFlag(false) // 展示高德地图+展示mogomind mView?.showAmap_mind() return@runInMainThread }else{ + updateMapFlag(false) // 展示高德地图 mView?.showAmap() return@runInMainThread } }else{// 展示高精地图 if(aiMessageShowmagic){ + updateMapFlag(false) // 展示高精地图 mView?.showHDMap_mind() return@runInMainThread }else{ if(havePredictionInfos&&haveTrajectoryInfos){ + updateMapFlag(true) // 展示高精地图+展示预测和决策 mView?.showHDMap_aip_prediction() return@runInMainThread }else{ + updateMapFlag(false) // 展示高精地图 mView?.showHDMap() return@runInMainThread @@ -212,13 +218,25 @@ class PM2ADASPresenter(view: PM2HPMapFragment?) : } }else{// 没有订单 if(aiMessageShowmagic){// 有mogomind 消息 + updateMapFlag(false) // 展示高精地图+mogoMind mView?.showHDMap_mind() }else{ + updateMapFlag(false) // 展示高精地图 mView?.showHDMap() } } } } + + private fun updateMapFlag(open: Boolean) { +// if (open) { +// FunctionBuildConfig.isDrawDecIdentifyData = true +// FunctionBuildConfig.isDrawPreIdentifyData = true +// } else { +// FunctionBuildConfig.isDrawDecIdentifyData = false +// FunctionBuildConfig.isDrawPreIdentifyData = false +// } + } } \ No newline at end of file diff --git a/OCH/shuttle/passenger_weaknet/src/main/res/b2/layout/shuttle_p_m2_hpmap_fragment.xml b/OCH/shuttle/passenger_weaknet/src/main/res/b2/layout/shuttle_p_m2_hpmap_fragment.xml index 1030224196..26ddd954ef 100644 --- a/OCH/shuttle/passenger_weaknet/src/main/res/b2/layout/shuttle_p_m2_hpmap_fragment.xml +++ b/OCH/shuttle/passenger_weaknet/src/main/res/b2/layout/shuttle_p_m2_hpmap_fragment.xml @@ -51,9 +51,8 @@ android:layout_width="@dimen/dp_430" android:layout_height="@dimen/dp_650"/> - - + android:layout_height="@dimen/dp_332" + app:car_type="B2" /> - + android:layout_height="@dimen/dp_332" + app:car_type="B2" + /> LayoutInflater.from(context).inflate(R.layout.layout_decision_container, this, true) + else -> LayoutInflater.from(context).inflate(R.layout.layout_b2_decision_container, this, true) + } + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() CallerAutopilotIdentifyListenerManager.addListener(TAG, this) } + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + CallerAutopilotIdentifyListenerManager.removeListener(TAG) + } + fun onCreate(savedInstanceState: Bundle?) { } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt index ccda7886ad..bb2c9ed3b9 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt @@ -3,15 +3,20 @@ package com.mogo.eagle.core.function.view import android.content.Context import android.os.Bundle import android.util.AttributeSet +import android.util.Log import androidx.lifecycle.LifecycleObserver import chassis.Chassis import com.mogo.eagle.core.data.config.FunctionBuildConfig.accThreshold import com.mogo.eagle.core.data.map.MogoLocation import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener +import com.mogo.eagle.core.function.business.routeoverlay.DecisionDataManager +import com.mogo.eagle.core.function.business.routeoverlay.PredictionDataManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager +import com.mogo.eagle.core.function.view.CoordinateAnimationView.Companion +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider import com.mogo.map.MogoMap import com.mogo.map.MogoMapView diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/PredictionLayout.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/PredictionLayout.kt index bcc2e5595a..92eb717fe6 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/PredictionLayout.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/PredictionLayout.kt @@ -12,13 +12,22 @@ class PredictionLayout @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null ) : ConstraintLayout(context, attrs) { + + private var carType = 0 + init { LayoutInflater.from(context).inflate(R.layout.layout_prediction_container, this, true) - initView() + initView(attrs) } - private fun initView() { - + private fun initView(attrs: AttributeSet?) { + val typedArray = context.obtainStyledAttributes(attrs, R.styleable.CarMapLayout) + carType = typedArray.getInt(R.styleable.CarMapLayout_car_type, 0) + typedArray.recycle() + when (carType) { + 0 -> LayoutInflater.from(context).inflate(R.layout.layout_prediction_container, this, true) + else -> LayoutInflater.from(context).inflate(R.layout.layout_b2_prediction_container, this, true) + } } fun onCreate(savedInstanceState: Bundle?) { diff --git a/core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_decision_container.xml b/core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_decision_container.xml new file mode 100644 index 0000000000..f0e085b467 --- /dev/null +++ b/core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_decision_container.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_prediction_container.xml b/core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_prediction_container.xml new file mode 100644 index 0000000000..1c2106bf51 --- /dev/null +++ b/core/function-impl/mogo-core-function-map/src/main/res/layout/layout_b2_prediction_container.xml @@ -0,0 +1,35 @@ + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/res/values/attrs.xml b/core/function-impl/mogo-core-function-map/src/main/res/values/attrs.xml index 245195f992..be76c98da4 100644 --- a/core/function-impl/mogo-core-function-map/src/main/res/values/attrs.xml +++ b/core/function-impl/mogo-core-function-map/src/main/res/values/attrs.xml @@ -80,4 +80,11 @@ + + + + + /> + + \ No newline at end of file