diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt index 9849c55113..9b06a4edfb 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt @@ -619,6 +619,34 @@ class MoGoAutopilotControlProvider : } } + /** + * 会车开关 + * isEnable = true 开启 + * isEnable = false 关闭 + * @return boolean + */ + override fun sendParkVehCross(isEnable: Boolean): Boolean { + return if (isEnable) { + AdasManager.getInstance().sendParkVehCross(1) > -1 + } else { + AdasManager.getInstance().sendParkVehCross(0) > -1 + } + } + + /** + * 超车开关 + * isEnable = true 开启 + * isEnable = false 关闭 + * @return boolean + */ + override fun sendParkVehOvertake(isEnable: Boolean): Boolean { + return if (isEnable) { + AdasManager.getInstance().sendParkVehOvertake(1) > -1 + } else { + AdasManager.getInstance().sendParkVehOvertake(0) > -1 + } + } + /** * 变道绕障的目标障碍物速度阈值 * @param speed 速度阈值 m/s diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index 368e2d6a61..b0fa1c1e75 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -71,6 +71,8 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.scObstacleAvoidance import kotlinx.android.synthetic.main.view_sop_setting.view.scObu import kotlinx.android.synthetic.main.view_sop_setting.view.scObuV2vView import kotlinx.android.synthetic.main.view_sop_setting.view.scObuWeaknessTrafficSop +import kotlinx.android.synthetic.main.view_sop_setting.view.scParkVehCross +import kotlinx.android.synthetic.main.view_sop_setting.view.scParkVehOvertake import kotlinx.android.synthetic.main.view_sop_setting.view.scRainMode import kotlinx.android.synthetic.main.view_sop_setting.view.scRouteDynamicEffect import kotlinx.android.synthetic.main.view_sop_setting.view.scRunRedLightSop @@ -511,6 +513,22 @@ internal class SOPSettingView @JvmOverloads constructor( * 与车相关类设置 */ private fun vehicleSetting() { + //PNC-park-会车 + scParkVehCross.isChecked = FunctionBuildConfig.isOpenParkVehCross + scParkVehCross.setOnCheckedChangeListener { _, isChecked -> + hmiAction("SOP PNC-park-会车, ", isChecked) + CallerAutoPilotControlManager.sendParkVehCross(isChecked) + FunctionBuildConfig.isOpenParkVehCross = isChecked + } + //PNC-park-超车 + scParkVehOvertake.isChecked = FunctionBuildConfig.isOpenOvertake + scParkVehOvertake.setOnCheckedChangeListener { _, isChecked -> + hmiAction("SOP PNC-park-超车, ", isChecked) + CallerAutoPilotControlManager.sendParkVehOvertake(isChecked) + FunctionBuildConfig.isOpenOvertake = isChecked + } + + //绕障类功能 scObstacleAvoidance.isChecked = FunctionBuildConfig.isDetouring scObstacleAvoidance.setOnCheckedChangeListener { _, isChecked -> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml index c41a080f15..f94f9a8ae7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml @@ -410,6 +410,36 @@ app:layout_constraintGuide_percent="0.5" app:layout_constraintLeft_toLeftOf="@id/tvVehicleTitle" app:layout_constraintRight_toRightOf="parent" /> + + + + + + + + app:layout_constraintTop_toBottomOf="@id/scParkVehCross" /> + app:layout_constraintTop_toBottomOf="@id/scParkVehOvertake" />