[6.7.0]冷启动
This commit is contained in:
@@ -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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 939 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_2"/>
|
||||
<solid android:color="#4CFFFFFF" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSystemStartupTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_70"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIpcConnectStatus"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSystemStartupTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvSystemStartupTitle"
|
||||
android:contentDescription="@string/ipc_connect_icon"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIpcConnectContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivIpcConnectStatus"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivIpcConnectStatus"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivIpcConnectStatus"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewSsmConnectDivider"
|
||||
android:layout_width="@dimen/dp_4"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivIpcConnectStatus"
|
||||
app:layout_constraintRight_toRightOf="@id/ivIpcConnectStatus"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivIpcConnectStatus"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:background="@drawable/bg_cold_start_divider"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSsmConnectStatus"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewSsmConnectDivider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewSsmConnectDivider"
|
||||
app:layout_constraintRight_toRightOf="@id/viewSsmConnectDivider"
|
||||
android:contentDescription="@string/ssm_connect_icon"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSsmConnectContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSsmConnectStatus"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSsmConnectStatus"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSsmConnectStatus"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewColdStartDivider"
|
||||
android:layout_width="@dimen/dp_4"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivSsmConnectStatus"
|
||||
app:layout_constraintRight_toRightOf="@id/ivSsmConnectStatus"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivSsmConnectStatus"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:background="@drawable/bg_cold_start_divider"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -213,4 +213,7 @@
|
||||
<string name="traffic_light_source">红绿灯信号来源</string>
|
||||
<string name="report_success">已发起上报</string>
|
||||
|
||||
<string name="ipc_connect_icon">域控连接状态图标</string>
|
||||
<string name="ssm_connect_icon">SSM连接状态图标</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1112,6 +1112,7 @@
|
||||
<dimen name="sp_55">55dp</dimen>
|
||||
<dimen name="sp_57">57dp</dimen>
|
||||
<dimen name="sp_69">69dp</dimen>
|
||||
<dimen name="sp_70">70dp</dimen>
|
||||
<dimen name="sp_72">72dp</dimen>
|
||||
<dimen name="sp_76">76dp</dimen>
|
||||
<dimen name="sp_80">80dp</dimen>
|
||||
|
||||
Reference in New Issue
Block a user