diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 32b025d9a3..15936d38ab 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -176,6 +176,8 @@ class MoGoAutopilotProvider : AsyncDataToAutopilotServer.INSTANCE.initServer() // 同步是否开启美化模式 setDemoMode(FunctionBuildConfig.isDemoMode) + // 同步是否开启雨天模式 + setRainMode(FunctionBuildConfig.isRainMode) } /** @@ -356,6 +358,19 @@ class MoGoAutopilotProvider : } } + /** + * 雨天模式 + * isEnable = true 开启 + * isEnable = false 关闭 + */ + override fun setRainMode(isEnable: Boolean) { + if(isEnable){ + AdasManager.getInstance().sendRainModeReq(1) + }else{ + AdasManager.getInstance().sendRainModeReq(0) + } + } + /** * 办公室调试使用,强制开启自动驾驶,将 status,pilotMode,control_pilotMode,强追设置为 1 * isEnable = true 开启 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 b9b23b9417..cc1686d7f7 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 @@ -54,6 +54,8 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener, updateDriveStatusTask() //每次工控机连接成功后,需同步当前设置的美化模式状态 CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) + //每次工控机连接成功后,需同步当前设置的雨天模式状态 + CallerAutoPilotManager.setRainMode(FunctionBuildConfig.isRainMode) } else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.DISCONNECTED) { CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 连接失败 reason:$reason") if (connectStatus) { 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 6807ab3408..4c27d10957 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 @@ -541,6 +541,17 @@ class DebugSettingView @JvmOverloads constructor( } } + // 雨天模式,上一次勾选的数据 + tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode + //雨天模式 + tbIsRainMode.setOnCheckedChangeListener { _, isChecked -> + CallerAutoPilotManager.setRainMode(isChecked) + FunctionBuildConfig.isRainMode = isChecked + } + //雨天模式按钮只在司机屏生效,乘客屏不显示 + if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){ + tbIsRainMode.visibility = View.GONE + } // 强制绘制引导线 tbIsDrawAutopilotTrajectoryData.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 c6a7b0628d..9b56b57e6a 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 @@ -221,6 +221,17 @@ android:textSize="@dimen/dp_24" android:background="@drawable/radio_button_normal_background_right"/> + +