diff --git a/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml b/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml index 77eca5b889..253a4c832d 100644 --- a/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml +++ b/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml @@ -26,8 +26,8 @@ android:layout_height="wrap_content" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" - android:layout_marginTop="@dimen/dp_350" - android:layout_marginRight="@dimen/dp_50" + android:layout_marginTop="@dimen/dp_115" + android:layout_marginEnd="@dimen/dp_23" app:explorationUser="driver" android:visibility="gone" /> diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/PNCActionsViewModel.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/PNCActionsViewModel.kt index 65d52298e2..b906723e24 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/PNCActionsViewModel.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/PNCActionsViewModel.kt @@ -7,6 +7,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import com.mogo.och.unmanned.passenger.model.TaxiPassengerModel import com.mogo.och.unmanned.passenger.ui.aiview.bean.AIMessage import mogo.telematics.pad.MessagePad @@ -47,8 +48,12 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener { actions?.let { if(it.isNotEmpty() && it != currentAction){ currentAction = it - val action = AIMessage.PNCAction(it+System.currentTimeMillis(),it) - AIMessageManager.post(action) + val title = getActionTitle(it) + if(title.isNotEmpty()){ + val desc = getActionDesc(title) + val action = AIMessage.PNCAction(it+System.currentTimeMillis(),title,desc,System.currentTimeMillis()) + AIMessageManager.post(action) + } } } @@ -59,4 +64,163 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener { } } + private fun getActionTitle(pncAction: String): String{ + return when(pncAction){ + "正在进站"->{ + "车辆进站" + } + "等待进站"->{ + "车辆等待进站" + } + "正在出站"->{ + "车辆出站" + } + "等待出站"->{ + "车辆等待出站" + } + "正在向左变道"->{ + "车辆向左变道" + } + "正在向右变道"->{ + "车辆向右变道" + } + "正在完成变道"->{ + "车辆完成变道" + } + "正在绕过障碍物"->{ + "车辆正在绕过前方障碍物" + } + "正在向左绕行避让前方静止障碍物"->{ + "车辆正在绕过前方障碍物" + } + "正在向右绕行避让前方静止障碍物"->{ + "车辆正在绕过前方障碍物" + } + "正在避让障碍物"->{ + "车辆正在避让前方障碍物" + } + "正在向左变道避让前方静止障碍物"->{ + "车辆正在避让前方障碍物" + } + "正在向右变道避让前方静止障碍物"->{ + "车辆正在避让前方障碍物" + } + "正在等红灯"->{ + "路口等红灯" + } + "正在向左变道避让前方道路施工"->{ + "车辆正在变道避让前方道路施工" + } + "正在向右变道避让前方道路施工"->{ + "车辆正在变道避让前方道路施工" + } + "正在向左绕行避让前方道路施工"->{ + "车辆正在绕行避让前方道路施工" + } + "正在向右绕行避让前方道路施工"->{ + "车辆正在绕行避让前方道路施工" + } + + "正在向左变道避让前方道路事故"->{ + "车辆正在变道避让前方道路事故" + } + "正在向右变道避让前方道路事故"->{ + "车辆正在变道避让前方道路事故" + } + "正在向左绕行避让前方道路事故"->{ + "车辆正在绕行避让前方道路事故" + } + "正在向右绕行避让前方道路事故"->{ + "车辆正在绕行避让前方道路事故" + } + "正在跟随车辆行驶"->{ + "车辆正在跟车通行" + } + "正在跟车行驶"->{ + "车辆正在跟车通行" + } + "正在向左变道避让前方车龙"->{ + "车辆正在绕行前方车龙" + } + "正在向右变道避让前方车龙"->{ + "车辆正在绕行前方车龙" + } + "正在使用云端规划通过路口"->{ + "车辆正在使用云端轨迹通行" + } + "正在避让后方来车"->{ + "车辆正在避让后方来车" + } + else->{ + "" + } + } + } + + private fun getActionDesc(action: String): String{ + return when(action){ + "车辆进站"->{ + "前方即将到达${TaxiPassengerModel.currentOCHOrder!!.orderEndSite.siteName}," + + "车辆正在规划减速并进站停靠,请安心等待车辆停稳再下车哦~" + } + "车辆等待进站"->{ + "车辆待环境安全后进站,耐心等几秒,安全比赶路更重要~" + } + "车辆出站"->{ + "欢迎乘坐MOGO RoboTaxi~车辆正在规划出站,坐稳扶好哦,我们出发啦!小智持续守护您的行程。" + } + "车辆等待出站"->{ + "车辆待环境安全后出站,耐心等几秒,安全比赶路更重要~" + } + "车辆向左变道"->{ + "确认环境安全,车辆正在规划平稳向左/向右变道,同时持续监测周边交通参与者动向,放心交给我们吧!" + } + "车辆向右变道"->{ + "确认环境安全,车辆正在规划平稳向左/向右变道,同时持续监测周边交通参与者动向,放心交给我们吧!" + } + "车辆完成变道"->{ + "变道完成啦,继续前进!小智持续守护您的行程。" + } + "车辆正在绕过前方障碍物"->{ + "发现前方障碍物,车辆正在规划平稳变道,即将画出一条完美弧线~" + } + "车辆正在避让前方障碍物"->{ + "发现前方障碍物,车辆正在规划平稳避让,诠释优雅与丝滑~" + } + "车辆完成绕障"->{ + "绕障完成啦,继续前进!小智持续守护您的行程。" + } + "路口等红灯"->{ + "车辆正在路口等红灯,可以安心放空望望窗外~小智一直在您身边哦!" + } + "车辆正在变道避让前方道路施工"->{ + "车辆正在提前规划向左/右变道避让前方道路施工,稳稳的很安心~您已体验到车路云一体化协同应用场景,是当之无愧的先锋体验官!" + } + "车辆正在绕行避让前方道路施工"->{ + "车辆正在提前规划向左/右绕行避让前方道路施工,稳稳的很安心~您已体验到车路云一体化协同应用场景,是当之无愧的先锋体验官!" + } + "车辆正在变道避让前方道路事故"->{ + "车辆正在提前规划向左/右变道避让前方道路事故,放心看我表现吧!您已体验到车路云一体化协同应用场景,小智为您欢呼!" + } + "车辆正在绕行避让前方道路事故"->{ + "车辆正在提前规划向左/右绕行避让前方道路事故,放心看我表现吧!您已体验到车路云一体化协同应用场景,小智为您欢呼!" + } + "车辆正在跟车通行"->{ + "车辆正在跟随前车通行,舒适度MAX~您已体验到车路云一体化协同应用场景,超越全国99%的乘客!" + } + "车辆正在绕行前方车龙"->{ + "车辆正在提前规划向左/右变道避让路口车龙,舒适度MAX~。您已体验到车路云一体化协同应用场景,超越全国99%的乘客!" + } + "车辆正在使用云端轨迹通行"->{ + "前方智慧路口内有障碍物,车辆正在使用云端规划轨迹通行。您已体验到车路云一体化协同应用场景,超越全国99%的乘客!" + } + "车辆正在避让后方来车"->{ + "车辆正在避让后方来车,耐心等几秒,安全比赶路更重要~" + } + else->{ + "" + } + } + } + } \ No newline at end of file diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt index 99f87adb19..61283e46aa 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt @@ -186,9 +186,15 @@ class QAViewHolder(val binding: View) : MessageViewHolder(binding) { class PNCActionViewHolder(binding: View) : MessageViewHolder(binding){ private var tvPncAction: TextView = binding.findViewById(R.id.tvPncAction) + private var tvPncActionDesc: TextView = binding.findViewById(R.id.tvPncActionDesc) + private var tvPncActionTime: TextView = binding.findViewById(R.id.tvPncActionTime) override fun bind(item: AIMessage, onItemClickListener: OnItemClickListener?) { - tvPncAction.text = item.title + if(item is AIMessage.PNCAction){ + tvPncAction.text = item.title + tvPncActionDesc.text = item.actionDesc + tvPncActionTime.text = DateTimeUtils.getTimeText(item.timeStamp, DateTimeUtils.HH_mm_ss) + } } } diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AssistantMessage.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AssistantMessage.kt index d6d00d5861..2b7ca9a3e4 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AssistantMessage.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AssistantMessage.kt @@ -135,7 +135,9 @@ sealed class AIMessage( data class PNCAction( override val id: String, - override val title: String + override val title: String, + var actionDesc: String, + var timeStamp: Long = 0, //事件发生事件戳 ): AIMessage(id,title) data class RoadV2NEvent( diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt index 6a7e480c80..4060c0e58e 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt @@ -19,9 +19,7 @@ import com.mogo.och.unmanned.passenger.ui.bar.LeftBarView import com.mogo.och.unmanned.taxi.passenger.R import kotlinx.android.synthetic.main.taxi_p_home.view.acbtn_show_all import kotlinx.android.synthetic.main.taxi_p_home.view.acbtn_show_hdmap -import kotlinx.android.synthetic.main.taxi_p_home.view.decContainer import kotlinx.android.synthetic.main.taxi_p_home.view.hdMapView -import kotlinx.android.synthetic.main.taxi_p_home.view.preContainer import kotlinx.android.synthetic.main.taxi_p_home.view.lbv_go2_center import kotlinx.android.synthetic.main.taxi_p_home.view.leftEndGuideline import kotlinx.android.synthetic.main.taxi_p_home.view.midContainer @@ -54,12 +52,12 @@ class HomeView @JvmOverloads constructor( private fun initlistener() { lbv_go2_center.setOrderIdCallback(object : LeftBarView.LeftBarCallback{ override fun setGo2CenterClick() { - //切换到地图中间 + //切换到地图中间 hdMapView.getUI()?.let { val wgs02Location = OchLocationManager.getWgs02Location() it.moveToCenter(MogoLatLng(wgs02Location.latitude, wgs02Location.longitude)) } - //overMapView.displayCustomOverView() + //overMapView.displayCustomOverView() } }) @@ -89,38 +87,38 @@ class HomeView @JvmOverloads constructor( fun onCreate(savedInstanceState: Bundle?) { hdMapView.onCreate(savedInstanceState) - preContainer.onCreate(savedInstanceState) - decContainer.onCreate(savedInstanceState) +// preContainer.onCreate(savedInstanceState) +// decContainer.onCreate(savedInstanceState) } fun onSaveInstanceState(outState: Bundle) { hdMapView.onSaveInstanceState(outState) - preContainer.onSaveInstanceState(outState) - decContainer.onSaveInstanceState(outState) +// preContainer.onSaveInstanceState(outState) +// decContainer.onSaveInstanceState(outState) } fun onResume() { hdMapView.onResume() - preContainer.onResume() - decContainer.onResume() +// preContainer.onResume() +// decContainer.onResume() } fun onLowMemory() { hdMapView.onLowMemory() - preContainer.onLowMemory() - decContainer.onLowMemory() +// preContainer.onLowMemory() +// decContainer.onLowMemory() } fun onPause() { hdMapView.onPause() - preContainer.onPause() - decContainer.onPause() +// preContainer.onPause() +// decContainer.onPause() } fun onDestroy() { hdMapView.onDestroy() - preContainer.onDestroy() - decContainer.onDestroy() +// preContainer.onDestroy() +// decContainer.onDestroy() } override fun onAttachedToWindow() { diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeViewModel.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeViewModel.kt index 355b465fd2..57a84256d6 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeViewModel.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeViewModel.kt @@ -41,35 +41,35 @@ class HomeViewModel : ViewModel(), BridgeListener, OrderListener { override fun onTrajectoryHaveData(haveTrajectoryInfos: Boolean) { this.haveTrajectoryInfos = haveTrajectoryInfos - checkScreenChange() +// checkScreenChange() } override fun onPredictionHavaData(havePredictionInfos: Boolean) { this.havePredictionInfos = havePredictionInfos - checkScreenChange() +// checkScreenChange() } override fun onCurrentOrderStatusChanged(order: BaseOrderBean?) { this.order = order - checkScreenChange() +// checkScreenChange() } fun checkScreenChange(){ - CallerLogger.d(TAG,"havePredictionInfos:${havePredictionInfos}--haveTrajectoryInfos:${haveTrajectoryInfos}--order:${order}") - if(order!=null&&havePredictionInfos&&havePredictionInfos){ - FunctionBuildConfig.isDrawDecIdentifyData = true - FunctionBuildConfig.isDrawPreIdentifyData = true - // 展示三联屏 - BizLoopManager.runInMainThread{ - this.viewCallback?.showThreeScreen() - } - }else{ - FunctionBuildConfig.isDrawDecIdentifyData = false - FunctionBuildConfig.isDrawPreIdentifyData = false - // 展示二联屏幕 - BizLoopManager.runInMainThread{ - this.viewCallback?.showTwoScreen() - } - } +// CallerLogger.d(TAG,"havePredictionInfos:${havePredictionInfos}--haveTrajectoryInfos:${haveTrajectoryInfos}--order:${order}") +// if(order!=null&&havePredictionInfos&&havePredictionInfos){ +// FunctionBuildConfig.isDrawDecIdentifyData = true +// FunctionBuildConfig.isDrawPreIdentifyData = true +// // 展示三联屏 +// BizLoopManager.runInMainThread{ +// this.viewCallback?.showThreeScreen() +// } +// }else{ +// FunctionBuildConfig.isDrawDecIdentifyData = false +// FunctionBuildConfig.isDrawPreIdentifyData = false +// // 展示二联屏幕 +// BizLoopManager.runInMainThread{ +// this.viewCallback?.showTwoScreen() +// } +// } } } \ No newline at end of file diff --git a/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_pnc_action.xml b/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_pnc_action.xml index 3d1864bf9a..701ab43851 100644 --- a/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_pnc_action.xml +++ b/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_pnc_action.xml @@ -9,18 +9,53 @@ app:yOffset="0dp" app:blurRadius="@dimen/dp_26"> - + android:layout_height="wrap_content"> + + + + + + + + + \ No newline at end of file diff --git a/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml b/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml index 10dd33baef..1616971d6f 100644 --- a/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml +++ b/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml @@ -34,24 +34,24 @@ app:layout_constraintStart_toEndOf="@+id/midStartGuideline" app:layout_constraintEnd_toStartOf="@id/rightStartGuideline"> - + + + + + + + + - + + + + + + + + + @@ -162,5 +162,5 @@ android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" /> - + \ No newline at end of file diff --git a/OCH/taxi/unmanned-passenger/src/main/res/values/ids.xml b/OCH/taxi/unmanned-passenger/src/main/res/values/ids.xml new file mode 100644 index 0000000000..b9a90c85af --- /dev/null +++ b/OCH/taxi/unmanned-passenger/src/main/res/values/ids.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/config/urlConfig.json b/app/config/urlConfig.json index b7eac342c5..1ff2715885 100644 --- a/app/config/urlConfig.json +++ b/app/config/urlConfig.json @@ -11,7 +11,7 @@ "eagle_dns_url": "", "bind_driver_qr_url": "", "chart_socket_url":"", - "nde_url":"", + "nde_url":"https://nde-qa-city.zhidaozhixing.com", "secure_active_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/active", "secure_refresh_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/refresh", "secure_auth_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/auth", @@ -29,7 +29,7 @@ "eagle_dns_url": "", "bind_driver_qr_url": "", "chart_socket_url":"", - "nde_url":"", + "nde_url":"https://nde-qa-city.zhidaozhixing.com", "secure_active_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/active", "secure_refresh_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/refresh", "secure_auth_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/auth", @@ -49,7 +49,7 @@ "eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/", "bind_driver_qr_url": "https://och-mini-eh.zhidaozhixing.com?pipe=ehsafety&sn=%1$s", "chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws", - "nde_url":"", + "nde_url":"https://nde-qa-city.zhidaozhixing.com", "secure_active_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/active", "secure_refresh_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/refresh", "secure_auth_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/auth", @@ -67,7 +67,7 @@ "eagle_dns_url": "https://och-hailing-eh.zhidaozhixing.com/", "bind_driver_qr_url": "https://och-mini-eh.zhidaozhixing.com?pipe=ehsafety&sn=%1$s", "chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws", - "nde_url":"", + "nde_url":"https://nde-qa-city.zhidaozhixing.com", "secure_active_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/active", "secure_refresh_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/refresh", "secure_auth_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/auth", @@ -87,7 +87,7 @@ "eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/", "bind_driver_qr_url": "https://och-mini-yt.zhidaozhixing.com?pipe=ytsafety&sn=%1$s", "chart_socket_url":"", - "nde_url":"", + "nde_url":"https://nde-qa-city.zhidaozhixing.com", "secure_active_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/active", "secure_refresh_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/refresh", "secure_auth_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/auth", @@ -105,7 +105,7 @@ "eagle_dns_url": "https://och-hailing-yt.zhidaozhixing.com/", "bind_driver_qr_url": "https://och-mini-yt.zhidaozhixing.com?pipe=ytsafety&sn=%1$s", "chart_socket_url":"", - "nde_url":"", + "nde_url":"https://nde-qa-city.zhidaozhixing.com", "secure_active_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/active", "secure_refresh_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/refresh", "secure_auth_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/auth", diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ota/OTAUpgradeManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ota/OTAUpgradeManager.kt index b3acf79a22..0976b77e33 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ota/OTAUpgradeManager.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ota/OTAUpgradeManager.kt @@ -230,6 +230,13 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener, if(OTAUpgradeConfig.isQuery){ ToastUtils.showLong("暂无待升级任务!") OTAUpgradeConfig.isQuery = false + }else{ + //没有升级任务,取消查询,关掉弹窗 + responseTimeoutNum = 0 + handler.removeMessages(1) + CallerHmiManager.showOTAUpgradeDialog(false) + CallerHmiManager.showOTADownloadStatusDialog(false, emptyList()) + CallerOTAManager.invokeOtaDownloadStatus(false) } return } @@ -303,6 +310,7 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener, } if(productStatus == 4){ upgradeResult = false + upgradeComplete = true } if(productName.contains(":")){ productName = productName.trim().substringAfterLast(":") diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt index f6d0297c58..d039924888 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt @@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener import com.mogo.eagle.core.function.api.devatools.IOTAListener import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener +import com.mogo.eagle.core.function.api.setting.IMapShowNameListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager @@ -25,6 +26,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.och.CallerOchCustomViewManager +import com.mogo.eagle.core.function.call.setting.CallerMapShowNameManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.tools.OfflineMapDialog import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog @@ -68,7 +70,8 @@ class CarInfoTabView @JvmOverloads constructor( attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoCheckAutoPilotBtnListener, - IMoGoAutopilotStatusListener, IMoGoDevaToolsListener, IDataCenterBizListener, IOTAListener { + IMoGoAutopilotStatusListener, IMoGoDevaToolsListener, IDataCenterBizListener, IOTAListener, + IMapShowNameListener { companion object { private const val TAG = "CarInfoTabView" @@ -91,6 +94,7 @@ class CarInfoTabView @JvmOverloads constructor( CallerAutoPilotStatusListenerManager.addListener(TAG, this) CallerDevaToolsListenerManager.addListener(TAG, this) CallerDataCenterBizListener.addListener(TAG, this) + CallerMapShowNameManager.addListener(TAG, this) } override fun onDetachedFromWindow() { @@ -99,6 +103,7 @@ class CarInfoTabView @JvmOverloads constructor( CallerAutoPilotStatusListenerManager.removeListener(TAG) CallerDevaToolsListenerManager.removeListener(TAG) CallerDataCenterBizListener.removeListener(TAG) + CallerMapShowNameManager.removeListener(TAG) } private fun initView() { @@ -248,8 +253,12 @@ class CarInfoTabView @JvmOverloads constructor( private fun showCurrentAdVersion() { UiThreadHandler.post { - CallerAutoPilotStatusListenerManager.getDockerVersion()?.let { - tvADVersionName.text = it + if(AppConfigInfo.mapShowName.isNotEmpty()){ + tvADVersionName.text = AppConfigInfo.mapShowName + }else{ + CallerAutoPilotStatusListenerManager.getDockerVersion()?.let { + tvADVersionName.text = it + } } } } @@ -356,4 +365,9 @@ class CarInfoTabView @JvmOverloads constructor( } } + override fun changeMapShowName(showName: String) { + super.changeMapShowName(showName) + showCurrentAdVersion() + } + } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 24319ddce9..abcca5fe3c 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -96,6 +96,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager import com.mogo.eagle.core.function.call.obu.CallerObuApiManager import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager import com.mogo.eagle.core.function.call.obu.CallerObuInfoListenerManager +import com.mogo.eagle.core.function.call.setting.CallerMapShowNameManager import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager @@ -337,6 +338,8 @@ import kotlin.collections.set import kotlin.math.abs import kotlin.system.exitProcess import com.mogo.eagle.core.function.hmi.ui.tools.ShowDevicesManagerStateDialog +import kotlinx.android.synthetic.main.view_debug_setting.view.btnEnsureMap +import kotlinx.android.synthetic.main.view_debug_setting.view.etMapShowName import kotlinx.android.synthetic.main.view_debug_setting.view.tbTileFileLog @@ -597,6 +600,18 @@ internal class DebugSettingView @JvmOverloads constructor( appVersionInfoLayout.visibility = View.GONE } } + //动态配置鹰眼显示MAP版本 + if(AppConfigInfo.mapShowName.isEmpty()){ + AppConfigInfo.mapShowName = CallerAutoPilotStatusListenerManager.getDockerVersion()+"" + } + etMapShowName.setText(AppConfigInfo.mapShowName) + etMapShowName.text?.let { etMapShowName.setSelection(it.length) } + btnEnsureMap.setOnClickListener { + AppConfigInfo.mapShowName = etMapShowName.text.toString() + tvIpcVersionInfo.text = "MAP:${AppConfigInfo.mapShowName}" + tvIpcVersionInfoKey.text = "MAP:${AppConfigInfo.mapShowName}" + CallerMapShowNameManager.invokeMapShowName(AppConfigInfo.mapShowName) + } /** * 状态中心 @@ -2108,7 +2123,11 @@ internal class DebugSettingView @JvmOverloads constructor( } else { tvIpcProtocolVersionInfo.text = "工控机协议版本:${AppConfigInfo.protocolVersionNumber}" } - val dockerVersion = CallerAutoPilotStatusListenerManager.getDockerVersion() + val dockerVersion = if(AppConfigInfo.mapShowName.isNotEmpty() && AppConfigInfo.mapShowName!=CallerAutoPilotStatusListenerManager.getDockerVersion()){ + AppConfigInfo.mapShowName + }else{ + CallerAutoPilotStatusListenerManager.getDockerVersion() + } tvIpcVersionInfo.text = "MAP:$dockerVersion" tvIpcVersionInfoKey.text = "MAP:$dockerVersion" tvMoGoMapVersion.text = "HD-Map版本:${DebugConfig.getMapVersion()}" diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt index 922c5c7fa1..36882a73d0 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt @@ -3,11 +3,15 @@ package com.mogo.eagle.core.function.hmi.ui.widget import android.annotation.SuppressLint import android.content.Context import android.util.AttributeSet +import android.util.Log import android.view.LayoutInflater import android.widget.LinearLayout +import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener +import com.mogo.eagle.core.function.api.setting.IMapShowNameListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager +import com.mogo.eagle.core.function.call.setting.CallerMapShowNameManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.utilcode.kotlin.* import com.mogo.eagle.core.utilcode.util.AppUtils @@ -23,7 +27,7 @@ class VersionNameView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : LinearLayout(context, attrs, defStyleAttr),IMoGoAutopilotStatusListener { +) : LinearLayout(context, attrs, defStyleAttr),IMoGoAutopilotStatusListener, IMapShowNameListener { companion object { const val TAG = "VersionNameView" @@ -64,7 +68,9 @@ class VersionNameView @JvmOverloads constructor( @SuppressLint("SetTextI18n") private fun showCurrentMapVersion() { val old = tvMapVersionName?.text - val version = dockerVersion + val version = AppConfigInfo.mapShowName.ifEmpty { + dockerVersion + } if (!version.isNullOrEmpty() && old != version) { scope.launch { tvMapVersionName?.also { @@ -78,11 +84,13 @@ class VersionNameView @JvmOverloads constructor( override fun onAttachedToWindow() { super.onAttachedToWindow() CallerAutoPilotStatusListenerManager.addListener(TAG, this) + CallerMapShowNameManager.addListener(TAG,this) } override fun onDetachedFromWindow() { super.onDetachedFromWindow() CallerAutoPilotStatusListenerManager.removeListener(TAG) + CallerMapShowNameManager.removeListener(TAG) } override fun onAutopilotDockerInfo(dockerVersion: String) { @@ -93,4 +101,9 @@ class VersionNameView @JvmOverloads constructor( CallerDevaToolsManager.dockerVersion(dockerVersion) } + override fun changeMapShowName(showName: String) { + super.changeMapShowName(showName) + showCurrentMapVersion() + } + } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_nde_road_recommend.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_nde_road_recommend.xml index b2ea52f057..6cdfd89974 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_nde_road_recommend.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_nde_road_recommend.xml @@ -1,7 +1,7 @@ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index 06b854a1a6..6c391cab89 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml @@ -543,6 +543,45 @@ android:layout_height="1dp" android:background="#F0F0F0" /> + + + + +