diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt index 8f7d97bdf1..587bac0de2 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt @@ -8,11 +8,13 @@ import android.view.View import android.widget.FrameLayout import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.util.ToastUtils import kotlinx.android.synthetic.main.view_auto_pilot_check.view.* import kotlinx.android.synthetic.main.view_check_system.view.* @@ -102,6 +104,7 @@ class AutoPilotAndCheckView @JvmOverloads constructor( return@setOnTouchListener false } } + updateSpeedSettingViews() // // 比如需要设置默认速度 // val speed = "30" // etInputSpeed.setText(speed) @@ -112,6 +115,22 @@ class AutoPilotAndCheckView @JvmOverloads constructor( this.clickListener = clickListener } + /** + * Bus不可设置自动驾驶速度,而Taxi可以 + */ + private fun updateSpeedSettingViews() { + when { + AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) -> { + tvSpeedTitle.visibility = View.GONE + llSpeedPosition.visibility = View.GONE + } + else -> { + tvSpeedTitle.visibility = View.VISIBLE + llSpeedPosition.visibility = View.VISIBLE + } + } + } + /** * 展示工控机下载、升级状态信息 * @param upgradeMode 升级模式(提示升级、静默升级)