From 9a2feb631a9e64a3207245ca1fd16230fdd52fa4 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Wed, 27 Sep 2023 19:19:02 +0800 Subject: [PATCH 1/6] =?UTF-8?q?[6.1.0]=E4=BF=AE=E5=A4=8D=E7=BA=A2=E7=BB=BF?= =?UTF-8?q?=E7=81=AFAI=E4=BA=91=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E8=87=AA=E8=BD=A6=E6=84=9F=E7=9F=A5?= =?UTF-8?q?=E9=97=AA=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/v2x/TrafficLightDispatcher.kt | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt index 902302fec5..9f5cc29ffa 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt @@ -66,6 +66,11 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight //obu数据 @Volatile private var hasObuLightStatus: Boolean = false + + //是否有自车感知红绿灯数据 + @Volatile + private var hasAutopilotPerception: Boolean = false + //红绿灯定时器,超时未更新隐藏红绿灯 @Volatile private var lightCountDownTimer: CountDownTimer? = null @@ -90,7 +95,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight ) if (!hasObuLightStatus) { if (!hasAiLightStatus) { - trafficLights?.let { it -> + trafficLights?.let { var light: TrafficLight? = null if (it.hasStraight()) { light = it.straight @@ -106,9 +111,13 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight "onAutopilotPerceptionTrafficLight light = $light " ) if (light == null) { + hasAutopilotPerception = false //隐藏红绿灯显示 hide("感知light为null隐藏", DataSourceType.TELEMATIC) } else { + if(!hasAutopilotPerception){ + hasAutopilotPerception = true + } onTrafficLightPlusSource(light.convert(), 0, DataSourceType.TELEMATIC) } } @@ -128,6 +137,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight } if (!hasObuLightStatus) { hasAiLightStatus = true + hasAutopilotPerception = false CallerLogger.d( "${SceneConstant.M_D_C}${TAG}", "onTrafficLightStatus trafficLightResult = $trafficLightResult " @@ -156,7 +166,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight //如果没有OBU灯态则进行隐藏,如果有OBU灯态,则交由OBU管理 if (!hasObuLightStatus) { CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus) - hide("云端离开路口隐藏", DataSourceType.AICLOUD) +// hide("云端离开路口隐藏", DataSourceType.AICLOUD) } } } @@ -165,15 +175,15 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight * 红绿灯接口请求失败 */ override fun onTrafficRequestError() { - hasAiLightStatus = false CallerLogger.d( "${SceneConstant.M_D_C}${TAG}", "onTrafficRequestError hasObuLightStatus = $hasObuLightStatus ------> " ) - CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus) - if (!hasObuLightStatus) { - hide("云端红绿灯接口请求失败隐藏", DataSourceType.AICLOUD) - } + CallerTrafficLightListenerManager.resetTrafficLightStatus(hasAiLightStatus) + hasAiLightStatus = false +// if (!hasObuLightStatus) { +// hide("云端红绿灯接口请求失败隐藏", DataSourceType.AICLOUD) +// } } /** @@ -186,14 +196,14 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight } /** - * 是否重置红绿灯数据,需要确保,在obu的红绿灯显示的时候,不执行。否则会闪屏 + * 是否重置红绿灯数据,需要确保,在obu的红绿灯显示或自车感知红绿灯显示的时候,不执行。否则会闪屏 */ override fun resetTrafficLight(isReset: Boolean) { CallerLogger.d( "${SceneConstant.M_D_C}${TAG}", "resetTrafficLight ------> isReset = $isReset ---hasObuLightStatus = $hasObuLightStatus" ) - if (!hasObuLightStatus) { + if (!hasObuLightStatus && !hasAutopilotPerception) { if (isReset) { hide("云端重置红绿灯数据", DataSourceType.AICLOUD) } @@ -228,6 +238,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight super.onTrafficLightPlusSource(light, remain, lightSource) if (lightSource == DataSourceType.OBU) { hasObuLightStatus = true + hasAutopilotPerception = false } CallerLogger.d( "${SceneConstant.M_D_C}${TAG}", From 328ca7a1197ffc0abdc4c2fef6256cfd9a73cff9 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Wed, 27 Sep 2023 19:36:07 +0800 Subject: [PATCH 2/6] =?UTF-8?q?[6.1.0]=E8=B0=83=E6=95=B4=E7=BA=A2=E7=BB=BF?= =?UTF-8?q?=E7=81=AF=E6=95=B0=E6=8D=AE=E5=88=86=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/function/datacenter/v2x/TrafficLightDispatcher.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt index 9f5cc29ffa..e0c8f7057e 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt @@ -136,8 +136,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight ) } if (!hasObuLightStatus) { - hasAiLightStatus = true - hasAutopilotPerception = false CallerLogger.d( "${SceneConstant.M_D_C}${TAG}", "onTrafficLightStatus trafficLightResult = $trafficLightResult " @@ -304,6 +302,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight "updateTrafficLight ----- currentTrafficLight = $currentTrafficLight" ) currentTrafficLight?.let { + hasAiLightStatus = true + hasAutopilotPerception = false val remain = if (it.time() > 99) { 99 } else { From 977de6be3b5b72b62374c57c95b6bc1bb6673560 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Wed, 27 Sep 2023 19:36:43 +0800 Subject: [PATCH 3/6] =?UTF-8?q?[6.1.0]=201=E3=80=81=E5=88=B0=E8=BE=BE?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=8F=96=E6=B6=88=E8=AE=A2=E5=8D=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=9A=90=E8=97=8F=202=E3=80=81=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E8=BF=90=E8=90=A5=E5=8D=95=E5=88=B0=E8=BE=BE=E7=AB=99=E7=82=B9?= =?UTF-8?q?,=20=E6=9A=82=E5=81=9C=E6=8E=A5=E5=8D=95->=20=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E6=8E=A5=E5=8D=95=20=E5=89=8D=E5=BE=80=E6=A0=87=E5=AE=9A?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=88=B0=E7=AB=99=E6=8E=A5=E5=8F=A3=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt | 4 +++- .../src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt index b9c0a1276a..1f7b1cf37a 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt @@ -493,7 +493,9 @@ class TaxiCurrentTaskFragment : BaseFragment(), } private fun updateOrderUI(order: OrderDetail) { - cancelOrder.visibility = View.VISIBLE + cancelOrder.visibility = if (order.orderStatus + == TaxiOrderStatusEnum.ArriveAtEnd.code + ) View.GONE else View.VISIBLE orderPhoneAndNum.visibility = View.VISIBLE taskClickBtn.visibility = View.VISIBLE taskTypeTv.visibility = View.VISIBLE diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index d6d6f7453f..c1d5857c2f 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -730,6 +730,7 @@ object TaxiTaskModel { //达到终点后查询全程里程和用时 if (QueryCurrentTaskRespBean.isOrderArriveAtEnd(result)) { d(TAG, "queryCurrentTaskOnce ArriveAtEnd") + mIsArrivedSiteStartTag = false mTaxiTaskWithOrderCallbackMap.forEach { val listener = it.value listener.onOrderArriveAtEnd(result.order!!.orderNo) From 636daf05d96ce79accb670edf8e60ef111699f3f Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 28 Sep 2023 12:17:11 +0800 Subject: [PATCH 4/6] =?UTF-8?q?[6.1.0]=201=E3=80=81=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=BC=94=E7=BB=83=E5=8D=95=E5=88=B0=E8=BE=BE=E7=AB=99=E7=82=B9?= =?UTF-8?q?,=20=E6=9A=82=E5=81=9C=E6=8E=A5=E5=8D=95->=20=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E6=8E=A5=E5=8D=95=20=E5=89=8D=E5=BE=80=E6=A0=87=E5=AE=9A?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=88=B0=E7=AB=99=E6=8E=A5=E5=8F=A3=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index c1d5857c2f..745dfa717b 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -1322,6 +1322,7 @@ object TaxiTaskModel { */ fun clearCurrentOCHOrder() { clearAutopilotControlParameters() + mIsArrivedSiteStartTag = false isRestartAutopilot = false if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 取消或订单已完成时,置false From e957b6b5d61dc732dbd52cdaf7a68d91a94a78df Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Thu, 28 Sep 2023 15:30:56 +0800 Subject: [PATCH 5/6] =?UTF-8?q?[6.1.0][Fix]=E8=A7=A3=E5=86=B3=E5=B9=B3?= =?UTF-8?q?=E8=A1=8C=E9=A9=BE=E9=A9=B6=E7=8A=B6=E6=80=81=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84UI=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmi/ui/widget/ParallelDriveView.kt | 64 ++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt index 84742609d3..fead1ec4c7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ParallelDriveView.kt @@ -93,16 +93,19 @@ class ParallelDriveView @JvmOverloads constructor( reqParaDrive() listener?.onReqClick() } + APP_REQUESTING -> { cancelParaDrive() Log.d(TAG, "Click-请求已取消") ToastUtils.showShort("请求已取消!") checkAvailableAndUpdateUI() } + AD_REQUESTING -> { Log.d(TAG, "Click-自动驾驶正在请求平行驾驶") ToastUtils.showShort("自动驾驶正在请求平行驾驶") } + UNAVAILABLE -> { Log.d(TAG, "Click-请P档驻车并松开油门刹车后请求") ToastUtils.showShort("请P档驻车并松开油门刹车后请求") @@ -118,41 +121,42 @@ class ParallelDriveView @JvmOverloads constructor( override fun onAutopilotStatusResponse(state: Int) { super.onAutopilotStatusResponse(state) - if (state != autopilotState) { - synchronized(this) { - when (state) { - 7 -> { - if (this.autopilotState != 7) { - isAutoDriving = false - Log.d(TAG, "onAutopilotStatusResponse-7") - ThreadUtils.runOnUiThread({ - updateUI(PARALLEL_DRIVING) - }, ThreadUtils.MODE.QUEUE) - } - } + when (state) { + 7 -> { + if (this.autopilotState != 7) { + isAutoDriving = false + Log.d(TAG, "onAutopilotStatusResponse-7") + ThreadUtils.runOnUiThread({ + updateUI(PARALLEL_DRIVING) + }, ThreadUtils.MODE.QUEUE) + } + } - 2 -> { - if (this.autopilotState != state) { - isAutoDriving = true - Log.d(TAG, "onAutopilotStatusResponse-2") - } - } - - else -> { - if (this.autopilotState != state) { - isAutoDriving = false - Log.d(TAG, "onAutopilotStatusResponse-else") - if (this.autopilotState == 7) { - ThreadUtils.runOnUiThread({ - checkAvailableAndUpdateUI() - }, ThreadUtils.MODE.QUEUE) - } - } + 2 -> { + if (this.autopilotState != state) { + isAutoDriving = true + Log.d(TAG, "onAutopilotStatusResponse-2") + if (this.autopilotState == 7) { + ThreadUtils.runOnUiThread({ + checkAvailableAndUpdateUI() + }, ThreadUtils.MODE.QUEUE) + } + } + } + + else -> { + if (this.autopilotState != state) { + isAutoDriving = false + Log.d(TAG, "onAutopilotStatusResponse-else") + if (this.autopilotState == 7) { + ThreadUtils.runOnUiThread({ + checkAvailableAndUpdateUI() + }, ThreadUtils.MODE.QUEUE) } } - this.autopilotState = state } } + this.autopilotState = state } override fun onParallelDrivingAbility( From e37d19d80c35090d29aa59f4860e141cf21405ec Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 28 Sep 2023 15:32:22 +0800 Subject: [PATCH 6/6] [6.1.0] add chain log --- .../datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt | 7 +++++++ .../com/mogo/eagle/core/data/deva/chain/ChainConstant.kt | 1 + 2 files changed, 8 insertions(+) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt index 48891547c5..0263d37654 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -17,6 +17,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_AD import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_VEHICLE import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_CAR_CONFIG import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_CAR_LOC +import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_PARALLEL import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_P_ACTIONS import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_P_OBJECTS import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_STATUS_QUERY_RESP @@ -771,6 +772,12 @@ class MoGoAdasListenerImpl : OnAdasListener { * @param sysTime 当前时间戳 * @param parallelTaskProcessNotice 数据 */ + @ChainLog( + linkChainLog = CHAIN_TYPE_SOCKET_AUTOPILOT, + linkCode = CHAIN_SOURCE_ADAS, + nodeAliasCode = CHAIN_CODE_ADAS_PARALLEL, + paramIndexes = [0, 1, 2, 4] + ) override fun onParallelDrivingResp( header: MessagePad.Header, messageType: AiCloudTask.MessageType, diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt index e393ead0aa..670ce998aa 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt @@ -70,6 +70,7 @@ class ChainConstant { const val CHAIN_CODE_ADAS_P_OBJECTS = "CHAIN_CODE_ADAS_P_OBJECTS" const val CHAIN_CODE_ADAS_P_ACTIONS = "CHAIN_CODE_ADAS_P_ACTIONS" const val CHAIN_CODE_ADAS_STATUS_QUERY_RESP = "CHAIN_CODE_ADAS_STATUS_QUERY_RESP" + const val CHAIN_CODE_ADAS_PARALLEL = "CHAIN_CODE_ADAS_PARALLEL" const val CHAIN_CODE_RECORD_NATIVE_LEAK = "CHAIN_CODE_RECORD_NATIVE_LEAK" const val CHAIN_CODE_RECORD_ANR = "CHAIN_CODE_RECORD_ANR"