diff --git a/.idea/misc.xml b/.idea/misc.xml index 37fc2ab8e9..e73cf5868e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -16,7 +16,7 @@ - + diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutoPilotProvider.java b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutoPilotProvider.java index dd0bf443e9..23e8734979 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutoPilotProvider.java +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutoPilotProvider.java @@ -5,7 +5,6 @@ import android.content.Context; import com.mogo.eagle.core.data.autopilot.AdasControlCommandParameter; import com.mogo.eagle.core.data.autopilot.RemoteControlAutoPilotParameters; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotProvider; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener; import com.mogo.eagle.core.utilcode.util.GsonUtils; import com.mogo.eagle.core.utilcode.util.LogUtils; import com.zhidao.support.adas.high.AdasManager; 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 c2ab39e8e8..dcbd2d555a 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 @@ -6,9 +6,13 @@ import android.view.LayoutInflater import androidx.constraintlayout.widget.ConstraintLayout import com.mogo.cloud.passport.MoGoAiCloudClient import com.mogo.eagle.core.data.app.AppConfigInfo +import com.mogo.eagle.core.data.autopilot.AdasOCHData +import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.data.constants.MoGoConfig import com.mogo.eagle.core.data.obu.ObuStatusInfo +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.obu.CallerOBUManager import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager import com.mogo.eagle.core.function.hmi.R @@ -30,7 +34,8 @@ class DebugSettingView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener { +) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener, + IMoGoAutoPilotStatusListener { private val TAG = "DebugSettingView" @@ -42,16 +47,19 @@ class DebugSettingView @JvmOverloads constructor( override fun onAttachedToWindow() { super.onAttachedToWindow() CallerObuListenerManager.addListener(TAG, this) + CallerAutoPilotStatusListenerManager.addListener(TAG, this) } override fun onDetachedFromWindow() { super.onDetachedFromWindow() CallerObuListenerManager.removeListener(TAG) - + CallerAutoPilotStatusListenerManager.removeListener(TAG) } private fun initView() { - tvObuInfo.text = CallerObuListenerManager.getObuStatusInfo() + tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString() + tvAutopilotInfo.text = + CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString() // 初始化App 配置信息 val appConfigInfo = AppConfigInfo() @@ -89,4 +97,19 @@ class DebugSettingView @JvmOverloads constructor( tvObuInfo.text = GsonUtils.toJson(obuStatusInfo) } + /** + * 自动驾驶相关回调 + */ + override fun onAutoPilotArriveAtStation(data: AdasOCHData?) { + + } + + override fun onAutoPilotStateChanged(state: Int, reason: String?) { + + } + + override fun onAutoPilotStatusResponse(autopilotStatusInfo: AutopilotStatusInfo?) { + tvAutopilotInfo.text = GsonUtils.toJson(autopilotStatusInfo) + } + } \ No newline at end of file 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 ccfc505233..9fabf69347 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 @@ -1,7 +1,7 @@ - +