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 72fc255bcd..19078e08ad 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,15 +8,18 @@ import android.view.View
import android.widget.FrameLayout
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
+import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
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.call.autopilot.CallerAutopilotCarConfigListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
import com.mogo.eagle.core.utilcode.kotlin.onClick
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 mogo.telematics.pad.MessagePad
/**
* @author ChenFufeng
@@ -26,7 +29,7 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
-) : FrameLayout(
+) : IMoGoAutopilotCarConfigListener, FrameLayout(
context,
attrs,
defStyleAttr
@@ -46,6 +49,7 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
@SuppressLint("ClickableViewAccessibility")
private fun initView() {
+ CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
if (keyBoardUtil == null) {
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)
}
@@ -187,4 +191,9 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
fun showDebugPanelView()
fun showFeedbackView()
}
+
+ override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
+ tvAcceleration.text = "加速度 ${carConfigResp.maxAcceleration} m/s²"
+ etInputSpeed.setText((carConfigResp.speedLimit * 3.6).toInt().toString())
+ }
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml
index 4d4bec61b1..c9c6fb2903 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml
@@ -187,6 +187,19 @@
+
+
+ app:layout_constraintTop_toBottomOf="@id/tvAcceleration" />
+ app:layout_constraintTop_toBottomOf="@id/tvAcceleration" />