diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ColdStartView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ColdStartView.kt new file mode 100644 index 0000000000..21d71e9d08 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ColdStartView.kt @@ -0,0 +1,80 @@ +package com.mogo.eagle.core.function.hmi.ui.widget + +import android.content.Context +import android.util.AttributeSet +import android.view.LayoutInflater +import androidx.constraintlayout.widget.ConstraintLayout +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager +import com.mogo.eagle.core.function.hmi.R +import com.zhjt.mogo.adas.data.AdasConstants +import system_master.SsmInfo +import system_master.SystemStatusInfo + +/** + * 冷启动呈现二期 + * 前置展示冷启动过程和结果 + */ +class ColdStartView @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null, + defStyleAttr: Int = 0 +) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener { + + companion object { + const val TAG = "ColdStartView" + } + + init { + LayoutInflater.from(context).inflate(R.layout.view_cold_start, this, true) + initView() + } + + private fun initView(){ + + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + CallerAutoPilotStatusListenerManager.addListener(TAG, this) + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + CallerAutoPilotStatusListenerManager.removeListener(TAG) + } + + override fun onAutopilotIpcConnectStatusChanged( + status: AdasConstants.IpcConnectionStatus, + reason: String? + ){ + if(status == AdasConstants.IpcConnectionStatus.CONNECTED){ + //域控连接成功 + + }else{ + //域控连接失败 + + } + } + + /** + * 状态查询应答 + * @param status 数据 + * HQ、M1 MAP350开始弃用,其他车型MAP360开始弃用 + */ + override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) { + + } + + + /** + * 定频SSM接口 + * 1hz hq m1 MAP350开始支持,其他车型MAP360开始支持 + * 定频SSM接入后 onStatusQueryResp 状态查询应答接口将弃用 + * @param statusInf 数据 + */ + override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) { + + } + +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_fail.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_fail.png new file mode 100644 index 0000000000..e469e824d2 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_fail.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_process.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_process.png new file mode 100644 index 0000000000..7ea9bb0363 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_process.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_success.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_success.png new file mode 100644 index 0000000000..3c6cc6ebd9 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_cold_start_success.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_cold_start_divider.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_cold_start_divider.xml new file mode 100644 index 0000000000..c69acc630c --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_cold_start_divider.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_cold_start.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_cold_start.xml new file mode 100644 index 0000000000..1da924a954 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_cold_start.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml index 61244a3c46..a219598048 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml @@ -213,4 +213,7 @@ 红绿灯信号来源 已发起上报 + 域控连接状态图标 + SSM连接状态图标 + diff --git a/core/mogo-core-res/src/main/res/values/dimens.xml b/core/mogo-core-res/src/main/res/values/dimens.xml index aec6045a64..4bf0a083d8 100644 --- a/core/mogo-core-res/src/main/res/values/dimens.xml +++ b/core/mogo-core-res/src/main/res/values/dimens.xml @@ -1112,6 +1112,7 @@ 55dp 57dp 69dp + 70dp 72dp 76dp 80dp