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 c3912d7216..d7817aab5b 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 @@ -265,13 +265,31 @@ class DebugSettingView @JvmOverloads constructor( if (isChecked) { buttonView.setCompoundDrawables(null, null, iconDown, null) //展示控制中心 - controlCenterLayout.visibility = View.VISIBLE +// controlCenterLayout.visibility = View.VISIBLE + commonLayout.visibility = View.VISIBLE + swDevelopMode.visibility = View.VISIBLE + swDevelopMode.isChecked = false } else { buttonView.setCompoundDrawables(null, null, iconRight, null) //隐藏控制中心 controlCenterLayout.visibility = View.GONE + commonLayout.visibility = View.GONE + swDevelopMode.visibility = View.GONE } } + /** + * 开发者模式 + */ + swDevelopMode.setOnCheckedChangeListener { _, isChecked -> + if(isChecked){ + controlCenterLayout.visibility = View.VISIBLE + commonLayout.visibility = View.GONE + }else{ + controlCenterLayout.visibility = View.GONE + commonLayout.visibility = View.VISIBLE + } + + } /** * 鹰眼参数配置 @@ -311,14 +329,16 @@ class DebugSettingView @JvmOverloads constructor( buttonView.setCompoundDrawables(null, null, iconDown, null) //展示OBU控制中心 obuControllerLayout.visibility = View.VISIBLE - + tbVehicleStateController.isChecked = true } else { buttonView.setCompoundDrawables(null, null, iconRight, null) //隐藏OBU控制中心 obuControllerLayout.visibility = View.GONE + tbVehicleStateController.isChecked = false } } + /** * 车辆状态控制中心 */ @@ -476,6 +496,7 @@ class DebugSettingView @JvmOverloads constructor( //工控机配置信息 tvAutopilotInfo.text = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString() + tvIpcInfo.text = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString() // 绘制应用基本信息 drawAppInfo() @@ -682,6 +703,23 @@ class DebugSettingView @JvmOverloads constructor( CallerAutoPilotManager.recordPackage() } } + btnRecordBag.onClick { + val recordTimeStr = etInputRecordBagTime.text?.toString() + try { + if (recordTimeStr.isNullOrEmpty()) { + CallerAutoPilotManager.recordPackage() + } + val recordTime = recordTimeStr?.toInt() + if (recordTime != null && recordTime > 0) { + CallerAutoPilotManager.recordPackage(recordTime) + } else { + CallerAutoPilotManager.recordPackage() + } + } catch (e: Exception) { + CallerAutoPilotManager.recordPackage() + } + } + } @@ -1350,6 +1388,22 @@ class DebugSettingView @JvmOverloads constructor( }" ) + tvIpcConnectStatus.text = Html.fromHtml( + "工控机连接状态:${ + if (AppConfigInfo.isConnectAutopilot) { + "正常" + } else { + "异常 原因:${ + if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) { + "主动断开连接" + } else { + AppConfigInfo.connectStatusDescribe + } + }" + } + }" + ) + tvObuConnectStatus.text = Html.fromHtml( "OBU连接状态:${ if (AppConfigInfo.isConnectObu) { @@ -1396,18 +1450,31 @@ class DebugSettingView @JvmOverloads constructor( tvAutopilotInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo) + tvIpcInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo) tvCarInfo.text = "GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" + "自车经纬度:\n${mGnssInfo?.longitude}\n${mGnssInfo?.latitude}\n" + tvCarInfoCopy.text = + "GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" + + "自车经纬度:\n${mGnssInfo?.longitude}\n${mGnssInfo?.latitude}\n" tvIdentifyInfo.text = "「有效类型」感知数据个数:${mIdentifyDataSize}\n" + "「未知类型」感知数据个数:${mUnknownIdentifyDataSize}\n" + tvIdentifyInfoCopy.text = + "「有效类型」感知数据个数:${mIdentifyDataSize}\n" + + "「未知类型」感知数据个数:${mUnknownIdentifyDataSize}\n" + tvTrajectoryInfoSize.text = "引导线点个数:${mTrajectoryInfoSize}" + tvTrajectoryInfoSizeCopy.text = + "引导线点个数:${mTrajectoryInfoSize}" + tvRouteInfoSize.text = "全局路径规划点个数:${mRouteInfoSize}" + tvRouteInfoSizeCopy.text = + "全局路径规划点个数:${mRouteInfoSize}" // 用完之后重制为0,防止节点回掉突然没数据,导致页面显示还是之前的数据情况 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 7205050429..2e426d215d 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 @@ -166,6 +166,29 @@ android:layout_height="match_parent" android:orientation="vertical"> + + + + + + + + + + + + + + +