From ecde707c81d1e5a84357b96109641fb8ad44009c Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Mon, 25 Apr 2022 15:04:11 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1、修改工控机协议版本获取方式 2、修改默认值显示 --- .../core/function/hmi/ui/setting/DebugSettingView.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 3ab3c27cc9..9eb94d9601 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 @@ -1408,7 +1408,11 @@ class DebugSettingView @JvmOverloads constructor( tvObuSdkVersion.text = "OBU-SDK版本:${AppConfigInfo.obuSdkVersion}" tvAutopilotProtocolVersionInfo.text = "Autopilot协议版本:${CallerAutoPilotManager.getProtocolVersion()}" - tvIpcProtocolVersionInfo.text = "工控机协议版本:${AppConfigInfo.protocolVersionNumber}" + if(AppConfigInfo.protocolVersionNumber==0){ + tvIpcProtocolVersionInfo.text="工控机协议版本:未知" + }else{ + tvIpcProtocolVersionInfo.text = "工控机协议版本:${AppConfigInfo.protocolVersionNumber}" + } tvMoGoMapVersion.text = "HD-Map版本:${MogoMap.getInstance().mogoMap.mapVersion}" tvGitBranchInfo.text = "Git分支:${AppConfigInfo.workingBranchName}" tvGitHashInfo.text = "Git-Hash:${AppConfigInfo.workingBranchHash}" @@ -1609,7 +1613,7 @@ class DebugSettingView @JvmOverloads constructor( carConfigResp.let { AppConfigInfo.plateNumber = it.plateNumber//车牌号 AppConfigInfo.iPCMacAddress = it.macAddress//工控机MAC地址 - AppConfigInfo.protocolVersionNumber = it.protocolVersion.number//工控机协议版本 + AppConfigInfo.protocolVersionNumber = it.protocolVersionValue//工控机协议版本 } } From 771c0f66d63466541a3bc5a034aaef62e0640db0 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Mon, 25 Apr 2022 15:07:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix=E5=B7=A5=E6=8E=A7=E6=9C=BA=E6=96=AD?= =?UTF-8?q?=E5=BC=80=E8=BF=9E=E6=8E=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改提示Toast,之前Toast最大提示文字为20,会出现显示不全问题 --- .../autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt index de71747d21..379e51d974 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt @@ -9,7 +9,7 @@ import com.mogo.eagle.core.function.autopilot.network.AdasServiceModel import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL -import com.mogo.eagle.core.utilcode.mogo.toast.TipToast +import com.mogo.eagle.core.utilcode.util.ToastUtils import com.zhidao.support.adas.high.AdasManager import com.zhidao.support.adas.high.OnAdasConnectStatusListener import com.zhidao.support.adas.high.common.Constants @@ -55,7 +55,7 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener, CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 连接失败 reason:$reason") if (connectStatus) { reason?.let { - TipToast.shortTip("工控机连接断开,原因:$it , 等待重连") + ToastUtils.showLong("工控机连接断开,原因:$it , 等待重连") } connectStatus = false } From 75a7f09a9e5a6173ef5940133deddc0d4ae94ed1 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Mon, 25 Apr 2022 15:23:51 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加OBU Log日志开关 --- .../core/function/hmi/ui/setting/DebugSettingView.kt | 8 ++++++++ .../src/main/res/layout/view_debug_setting.xml | 12 ++++++++++++ 2 files changed, 20 insertions(+) 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 9eb94d9601..e14efe0062 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 @@ -60,6 +60,7 @@ import com.mogo.eagle.core.utilcode.util.* import com.mogo.map.MogoMap import com.mogo.map.uicontroller.VisualAngleMode import com.mogo.map.uicontroller.VisualAngleMode.* +import com.zhidao.easysocket.utils.L import kotlinx.android.synthetic.main.view_debug_setting.view.* import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg @@ -1039,6 +1040,13 @@ class DebugSettingView @JvmOverloads constructor( MoGoAiCloudClientConfig.getInstance().isShowNetDebugLog = isChecked } + /** + * 设置是否输出OBU日志 true-打印日志,false-不打印日志 + */ + tbObuLog.setOnCheckedChangeListener { _, isChecked -> + L.setEnableLog(isChecked) + } + cbTraceLog.isChecked = CallerDevaToolsManager.getTraceLogStatus() //链路Log输出日志 cbTraceLog.setOnCheckedChangeListener { _, isChecked -> 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 7d24f05068..df3a586bdc 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 @@ -1432,6 +1432,18 @@ android:textSize="@dimen/dp_24" /> + + + Date: Mon, 25 Apr 2022 17:26:26 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对应用包列表进行倒序排序 --- .../eagle/core/function/hmi/ui/setting/DebugSettingView.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 e14efe0062..0c2d0e7e6a 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 @@ -1177,8 +1177,9 @@ class DebugSettingView @JvmOverloads constructor( it.iterator().forEach {map -> val name = if(map.key.contains("{")) map.key.replace("{","") else map.key val url = if(map.value.contains("}")) map.value.replace("}","") else map.value - upgradeVersionList.add(UpgradeVersionEntity(name,url)) + upgradeVersionList.add(UpgradeVersionEntity(name.trim(),url)) } + upgradeVersionList.sortByDescending { upgradeVersionEntity ->upgradeVersionEntity.name } upgradeListAdapter?.setDada(dataFilter(upgradeVersionList)) upgradeListAdapter?.notifyDataSetChanged() } From 6d76863ebade39ebfd0452d05a445c9bb4dfc073 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Mon, 25 Apr 2022 18:26:25 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 状态中心增加工控机连接异常原因 --- .../MoGoAdasMsgConnectStatusListenerImpl.kt | 5 ++-- .../hmi/ui/setting/DebugSettingView.kt | 26 ++++++++++++------- .../mogo/eagle/core/data/app/AppConfigInfo.kt | 3 +++ .../data/autopilot/AutopilotStatusInfo.kt | 4 +++ 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt index 379e51d974..bcf11f56ee 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt @@ -44,8 +44,6 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener, CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectPort = AdasManager.getInstance().ipcConnectedPort CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatus = true - CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus() - // 同步SN给工控机 syncBasicInfoToAutopilot() // 开启轮询上传自动驾驶状态 @@ -69,7 +67,6 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener, mCurrentAutopilotSpeed = 0.0f CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state = 0 CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().pilotmode = 0 - CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus() } else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTING) { CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 正在连接") } else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.SEARCH_ADDRESS) { @@ -77,6 +74,8 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener, } else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.NOT_FOUND_ADDRESS) { CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 找不到可用IP 传入的IP不可用或固定IP列表中所有IP不可用") } + CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatusDescribe=reason + CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus() } /** 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 0c2d0e7e6a..99fb82b0f5 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 @@ -1477,11 +1477,17 @@ class DebugSettingView @JvmOverloads constructor( ) tvAutopilotConnectStatus.text = Html.fromHtml( - "Autopilot系统连接状态:${ + "工控机连接状态:${ if (AppConfigInfo.isConnectAutopilot) { "正常" } else { - "异常" + "异常 原因:${ + if(AppConfigInfo.connectStatusDescribe.isNullOrEmpty()){ + "主动断开连接" + }else{ + AppConfigInfo.connectStatusDescribe + } + }" } }" ) @@ -1578,14 +1584,16 @@ class DebugSettingView @JvmOverloads constructor( override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) { mAutoPilotStatusInfo = autoPilotStatusInfo AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus - if (autoPilotStatusInfo.connectStatus) { - adasConnectStatus = true - } + AppConfigInfo.connectStatusDescribe = autoPilotStatusInfo.connectStatusDescribe + +// if (autoPilotStatusInfo.connectStatus) { +// adasConnectStatus = true +// } //ADAS断开连接,提示异常 - if (adasConnectStatus && !autoPilotStatusInfo.connectStatus) { - adasConnectStatus = false - toastMsg("Autopilot系统连接状态异常") - } +// if (adasConnectStatus && !autoPilotStatusInfo.connectStatus) { +// adasConnectStatus = false +// toastMsg("工控机连接断开") +// } } override fun onAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt index 22ac34dc37..399acdea7d 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt @@ -50,6 +50,9 @@ object AppConfigInfo { // 是否连接工控机 var isConnectAutopilot: Boolean = false + //连接工控机状态文字描述 + var connectStatusDescribe: String? = null + // 是否OBU var isConnectObu: Boolean = false diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt index 4057fa3bd1..bc280b0987 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt @@ -20,6 +20,10 @@ class AutopilotStatusInfo : Serializable { */ var connectPort: Int = 4110 var connectStatus = false + /** + * 工控机连接状态文字描述 + */ + var connectStatusDescribe: String? = null var version: String? = null /**