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 cabb837e8e..4aab1e39e6 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 @@ -21,6 +21,7 @@ import androidx.core.view.MenuCompat import androidx.core.view.isVisible import androidx.lifecycle.lifecycleScope import chassis.Chassis +import com.mogo.cloud.network.cronet.QuicConfig import com.mogo.cloud.passport.MoGoAiCloudClient import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.commons.constants.SharedPrefsConstants @@ -762,6 +763,9 @@ internal class DebugSettingView @JvmOverloads constructor( tbObuWarningFusionUnion.setOnCheckedChangeListener { _, isChecked -> FunctionBuildConfig.isObuWarningFusionUnion = isChecked } + tbCronet.setOnCheckedChangeListener { _, isChecked -> + QuicConfig.setEnable(context, isChecked) + } //重启工控机所有节点 btnIpcReboot.onClick { @@ -813,6 +817,7 @@ internal class DebugSettingView @JvmOverloads constructor( // update tracker provider view trackerIPCProvider.visibility = View.VISIBLE } + R.id.trackerProviderObu -> { FunctionBuildConfig.debugTrackerProvider = 1 // update tracker provider view @@ -859,16 +864,16 @@ internal class DebugSettingView @JvmOverloads constructor( ToastUtils.showShort("功能开发中") } - if(FunctionBuildConfig.isDrawPointCloudData){ + if (FunctionBuildConfig.isDrawPointCloudData) { //如果点云效果是打开的,则自车光圈也跟随打开 tbCarAperture.isChecked = true - }else{ + } else { tbCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable } tbCarAperture.setOnCheckedChangeListener { compoundButton, isChecked -> CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(isChecked) CallerSopSettingManager.invokeCarApertureListener(isChecked) - if(!compoundButton.isPressed){ + if (!compoundButton.isPressed) { return@setOnCheckedChangeListener } FunctionBuildConfig.isDisplayAnimEnable = isChecked @@ -882,9 +887,9 @@ internal class DebugSettingView @JvmOverloads constructor( return@setOnCheckedChangeListener } //打开点云效果时,如果自车光圈是关闭状态,则自动打开自车光圈(点云是跟随光圈的 默认没有光圈就不显示点云的) - if(isChecked && !FunctionBuildConfig.isDisplayAnimEnable){ + if (isChecked && !FunctionBuildConfig.isDisplayAnimEnable) { tbCarAperture.isChecked = true - }else{ + } else { tbCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable } CallerAutoPilotControlManager.setIsDrawPointCloud(isChecked) @@ -932,6 +937,7 @@ internal class DebugSettingView @JvmOverloads constructor( btnConnectServerIp.visibility = View.GONE etConnectServerIp.visibility = View.GONE } + else -> { brakeThresholdDivider.visibility = View.VISIBLE btnConnectServerIp.visibility = View.VISIBLE @@ -1112,32 +1118,41 @@ internal class DebugSettingView @JvmOverloads constructor( R.id.group_hy -> { return@setOnMenuItemClickListener false } + R.id.group_bj -> { return@setOnMenuItemClickListener false } + R.id.env_reset -> CallerDevaToolsManager.envConfigReset() + R.id.hy_product -> CallerDevaToolsManager.envConfigChange( "0734", DebugConfig.NET_MODE_RELEASE ) + R.id.hy_qa -> CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_QA) + R.id.hy_demo -> CallerDevaToolsManager.envConfigChange( "0734", DebugConfig.NET_MODE_DEMO ) + R.id.bj_product -> CallerDevaToolsManager.envConfigChange( "010", DebugConfig.NET_MODE_RELEASE ) + R.id.bj_qa -> CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_QA) + R.id.bj_demo -> CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_DEMO) + else -> throw AssertionError("invalid item: $item") } @@ -1594,11 +1609,13 @@ internal class DebugSettingView @JvmOverloads constructor( AppConfigInfo.isDriver = true AppConfigInfo.isConnectedNetty = CallerTelematicManager.getServerStarted() } + AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) -> { AppConfigInfo.isDriver = false AppConfigInfo.isConnectedNetty = CallerTelematicManager.getClientConnStatus() AppConfigInfo.serverSn = CallerTelematicManager.getServerToken() } + else -> { } } @@ -1654,12 +1671,15 @@ internal class DebugSettingView @JvmOverloads constructor( 2 -> { "测试环境" } + 3 -> { "生产环境" } + 4 -> { "演示环境" } + else -> { "未知环境" } @@ -1710,6 +1730,7 @@ internal class DebugSettingView @JvmOverloads constructor( AppConfigInfo.isDriver -> { "司机端Server启动" } + else -> { "乘客端${"(司机屏SN是:${AppConfigInfo.serverSn})"}连接" } @@ -1729,6 +1750,7 @@ internal class DebugSettingView @JvmOverloads constructor( AppConfigInfo.isDriver -> { "司机屏发送数据" } + else -> "乘客屏接收数据" } }的最新时间为:${simpleDateFormat.format(AppConfigInfo.teleTimeStamp)}" @@ -1904,6 +1926,7 @@ internal class DebugSettingView @JvmOverloads constructor( } tbIsDemoMode.setPadding(left, top, right, bottom) } + BIZ_RAIN_MODE -> { tbIsRainMode.isClickable = !lock val (left, top, right, bottom) = tbIsRainMode.currentPadding() @@ -1916,6 +1939,7 @@ internal class DebugSettingView @JvmOverloads constructor( } tbIsRainMode.setPadding(left, top, right, bottom) } + BIZ_WARNING_UPLOAD -> { tbReportWarning.isClickable = !lock val (left, top, right, bottom) = tbReportWarning.currentPadding() @@ -1927,6 +1951,7 @@ internal class DebugSettingView @JvmOverloads constructor( } tbReportWarning.setPadding(left, top, right, bottom) } + BIZ_BAG_RECORD -> { val (left, top, right, bottom) = btnRecordBag.currentPadding() if (lock) { @@ -1940,6 +1965,7 @@ internal class DebugSettingView @JvmOverloads constructor( } btnRecordBag.setPadding(left, top, right, bottom) } + BIZ_FULL_LOG -> { val (left, top, right, bottom) = tbLogCatch.currentPadding() if (lock) { 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 aa979a2730..041a3b4f91 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 @@ -290,6 +290,18 @@ android:textOn="关闭obu预警融合" android:textSize="@dimen/dp_24" /> + +