From 49eaecb096e034c17b5d20be0e27f36f9fbb92a6 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Mon, 17 Apr 2023 12:32:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[dev=5Frobobus-d=5F230413=5F3.1.0]fix?= =?UTF-8?q?=E4=B8=8D=E5=A4=84=E4=BA=8E=E5=B9=B3=E8=A1=8C=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8B=E5=BC=B1=E7=BD=91=E4=B9=9F=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=B9=B3=E8=A1=8C=E9=A9=BE=E9=A9=B6=E6=8E=A5=E7=AE=A1?= =?UTF-8?q?=E8=A1=A5=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/hmi/ui/vehicle/TakeOverView.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt index b54aeaf049..179f964123 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt @@ -34,6 +34,8 @@ class TakeOverView @JvmOverloads constructor( } private var autopilotStatus: Int = 0 //自动驾驶状态 0代表不可自动驾驶,1代表可自动驾驶,2代表自动驾驶中,7:平行驾驶中 + private var isParallel: Boolean = false //是否是平行驾驶 + init { LayoutInflater.from(context).inflate(R.layout.view_take_over, this, true) @@ -53,6 +55,11 @@ class TakeOverView @JvmOverloads constructor( */ override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) { autopilotStatus = autoPilotStatusInfo.state + if(autoPilotStatusInfo.state == 7){ + isParallel = true + }else if(autoPilotStatusInfo.state == 2){ + isParallel = false + } Log.i(TAG,"自动驾驶状态${autopilotStatus}") } @@ -106,7 +113,7 @@ class TakeOverView @JvmOverloads constructor( MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_CONNECTION_ERROR -> { //如果是平行驾驶状态下,提示弱网接管 Log.i(TAG,"弱网时自动驾驶状态:${autopilotStatus}") - if(autopilotStatus == 7){ + if(autopilotStatus == 7 || isParallel){ CallerHmiManager.warningV2X( EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType, EventTypeEnumNew.NETWORK_WEAK_EVENT.content, From 2fcd217c04dde4e0fdabcb3d67306d98f871c712 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Mon, 17 Apr 2023 12:53:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[3.1.0]=20m2=E8=B7=AF=E7=BA=BFid=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=EF=BC=8C=E6=B8=85=E9=99=A4=E5=85=A8=E8=A7=88=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus/passenger/callback/DrivingInfoCallback.kt | 1 + .../och/bus/passenger/model/PM2DrivingModel.kt | 6 ++++++ .../passenger/presenter/PM2DrivingPresenter.kt | 8 ++++++++ .../bus/passenger/ui/PM2DrivingInfoFragment.kt | 15 ++++++--------- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt index 1b9c77b224..61589fce33 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt @@ -15,4 +15,5 @@ interface DrivingInfoCallback { fun showNoTaskView(isTrue : Boolean) fun updateLineStations(stations: MutableList) fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean) + fun clearCustomPolyline() } \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt index 977392b271..7682f74217 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt @@ -421,6 +421,12 @@ class PM2DrivingModel private constructor() { updateLocalOrder() return } + + if (routesResult != null && routesResult!!.lineId != result.lineId){ + d(SceneConstant.M_BUS_P+TAG, "lineId change= clearCustomPolyline") + mDrivingInfoCallback?.clearCustomPolyline() + } + d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update") routesResult = result diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt index a6d4f0add9..78c7fb65b6 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt @@ -116,6 +116,12 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) : } } + override fun clearCustomPolyline() { + ThreadUtils.runOnUiThread { + mView?.clearCustomPolyline() + } + } + override fun updateAutoStatus(isOpen: Boolean) { ThreadUtils.runOnUiThread { mView?.updateAutoStatus(isOpen) @@ -125,4 +131,6 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) : override fun updateAutoStatus(status: Int) { } + + } \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt index 8d12623b3f..1626263a0d 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt @@ -28,8 +28,6 @@ import kotlin.math.roundToInt class PM2DrivingInfoFragment : MvpFragment() { -// private var timeHandler: TimeHandler? = null - /** * 改变自动驾驶状态 * @@ -108,7 +106,6 @@ class PM2DrivingInfoFragment : } override fun onDestroy() { -// timeHandler?.removeCallbacksAndMessages(null) super.onDestroy() overMapView?.let{ it.onDestroy() @@ -142,9 +139,7 @@ class PM2DrivingInfoFragment : } private fun setLineInfoView(isShow: Boolean){ - if (isShow){ - - }else{ + if (!isShow){ updateNoOrderUI() } } @@ -155,11 +150,14 @@ class PM2DrivingInfoFragment : overMapView?.let { it.clearSiteMarkers() } + clearCustomPolyline() + } + + fun clearCustomPolyline(){ overMapView?.let { it.clearCustomPolyline() } } - private fun updateNoStationView(){ station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color)) station_name_tv.text = resources.getString(R.string.m2_p_empty_tv) @@ -259,7 +257,7 @@ class PM2DrivingInfoFragment : tv_arrived_notice.visibility = View.GONE } // 有线路到达站点 - fun haveLineAndArrivedStation(){ + private fun haveLineAndArrivedStation(){ group_not_select_line.visibility = View.GONE group_stationinfo.visibility = View.VISIBLE clg_distance_left_time.visibility = View.GONE @@ -268,6 +266,5 @@ class PM2DrivingInfoFragment : companion object { private val TAG = PM2DrivingInfoFragment::class.java.simpleName - const val LOOP_TIME_TEXT = 10 * 1000L } } \ No newline at end of file