[3.4.0-map-sdk] merge 6.1.0
This commit is contained in:
@@ -2,9 +2,10 @@ package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import android.widget.Toast
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
@@ -21,18 +22,18 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotGetParamResponseDispatcher
|
||||
import com.mogo.eagle.core.function.call.devatools.*
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog.Companion.hmiAction
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
@@ -50,6 +51,11 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
const val TAG = "SOPSettingView"
|
||||
}
|
||||
|
||||
/**
|
||||
* OBU连接状态
|
||||
*/
|
||||
private var obuConnectStatus = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_sop_setting, this, true)
|
||||
initView()
|
||||
@@ -57,103 +63,200 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
|
||||
private fun initView() {
|
||||
sopLayout.setOnClickListener { }
|
||||
tbObstacleAvoidance.isChecked = FunctionBuildConfig.isDetouring
|
||||
tbObstacleAvoidance.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 绕障类功能开关",isChecked)
|
||||
CallerAutoPilotControlManager.sendDetouring(isChecked)
|
||||
FunctionBuildConfig.isDetouring = isChecked
|
||||
//V2X消息设置
|
||||
v2xSetting()
|
||||
//地图效果类设置
|
||||
mapSetting()
|
||||
//与车相关类设置
|
||||
vehicleSetting()
|
||||
//其他类别开关设置
|
||||
otherSetting()
|
||||
}
|
||||
|
||||
/**
|
||||
* V2X消息设置
|
||||
*/
|
||||
private fun v2xSetting(){
|
||||
//V2X总开关
|
||||
scV2XSwitch.isChecked = FunctionBuildConfig.v2xMainSwitch
|
||||
scV2XSwitch.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.v2xMainSwitch = isChecked
|
||||
hmiAction("SOP V2X总开关, ",isChecked)
|
||||
Log.i(TAG,"SOP V2X总开关,$isChecked")
|
||||
if(isChecked){
|
||||
//V2N总开关
|
||||
scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch
|
||||
hmiAction("SOP V2N总开关, ",FunctionBuildConfig.v2nMainSwitch)
|
||||
Log.i(TAG,"SOP V2N总开关, ${FunctionBuildConfig.v2nMainSwitch}")
|
||||
//V2I总开关
|
||||
scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView
|
||||
hmiAction("SOP V2I总开关, ",HmiBuildConfig.isShowObuV2iView)
|
||||
Log.i(TAG,"SOP V2I总开关, ${HmiBuildConfig.isShowObuV2iView}")
|
||||
//V2V总开关
|
||||
scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
|
||||
hmiAction("SOP V2V总开关, ",HmiBuildConfig.isShowObuV2vView)
|
||||
Log.i(TAG,"SOP V2V总开关, ${HmiBuildConfig.isShowObuV2vView}")
|
||||
//obu总开关
|
||||
scObu.isChecked = obuConnectStatus
|
||||
hmiAction("SOP obu总开关, ",obuConnectStatus)
|
||||
Log.i(TAG,"SOP obu总开关, $obuConnectStatus")
|
||||
if(obuConnectStatus){
|
||||
CallerObuApiManager.resetObuIpAddress(MogoObuConst.OBU_DEFAULT_IP)
|
||||
}
|
||||
}else{
|
||||
//V2N总开关
|
||||
scV2NSwitch.isChecked = false
|
||||
hmiAction("SOP V2N总开关, ",false)
|
||||
Log.i(TAG,"SOP V2N总开关, false")
|
||||
//V2I总开关
|
||||
scV2ISwitch.isChecked = false
|
||||
hmiAction("SOP V2I总开关, ",false)
|
||||
Log.i(TAG,"SOP V2I总开关, false")
|
||||
//V2V总开关
|
||||
scObuV2vView.isChecked = false
|
||||
hmiAction("SOP V2V总开关, ",false)
|
||||
Log.i(TAG,"SOP V2V总开关, false")
|
||||
//obu总开关
|
||||
scObu.isChecked = false
|
||||
hmiAction("SOP OBU控制总开关, ",false)
|
||||
Log.i(TAG,"SOP OBU控制总开关, false")
|
||||
//断开链接
|
||||
CallerObuApiManager.disConnectObu()
|
||||
}
|
||||
scV2NSwitch.isEnabled = isChecked
|
||||
scV2ISwitch.isEnabled = isChecked
|
||||
scObuV2vView.isEnabled = isChecked
|
||||
scObu.isEnabled = isChecked
|
||||
}
|
||||
|
||||
tbMarkingObstacles.isChecked = FunctionBuildConfig.isPNCWarning
|
||||
tbMarkingObstacles.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 危险障碍物颜色标记开关",isChecked)
|
||||
FunctionBuildConfig.isPNCWarning = isChecked
|
||||
//V2N总开关
|
||||
scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch
|
||||
//根据V2N状态设置子开关是否可以点击
|
||||
//V2N新链路
|
||||
scNewV2NData.isEnabled = FunctionBuildConfig.v2nMainSwitch
|
||||
//V2N场景进PNC
|
||||
scV2nPnc.isEnabled = FunctionBuildConfig.v2nMainSwitch
|
||||
//绿波通行(默认关闭)
|
||||
scGreenWaveSop.isEnabled = FunctionBuildConfig.v2nMainSwitch
|
||||
scV2NSwitch.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(isChecked){
|
||||
//V2N新链路
|
||||
scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData
|
||||
hmiAction("SOP 是否是V2N新链路(云->工控机->App)",FunctionBuildConfig.isNewV2NData)
|
||||
Log.i(TAG,"SOP 是否是V2N新链路(云->工控机->App), ${FunctionBuildConfig.isNewV2NData}")
|
||||
//V2N场景进PNC
|
||||
scV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
|
||||
hmiAction("SOP V2N场景进PNC, ",FunctionBuildConfig.isV2NPnc)
|
||||
Log.i(TAG,"SOP V2N场景进PNC, ${FunctionBuildConfig.isV2NPnc}")
|
||||
CallerAutoPilotControlManager.sendV2nToPncCmd(FunctionBuildConfig.isV2NPnc)
|
||||
//绿波通行
|
||||
scGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView
|
||||
hmiAction("SOP obu绿波通行, ",HmiBuildConfig.isShowGreenWaveView)
|
||||
Log.i(TAG,"SOP obu绿波通行, ${HmiBuildConfig.isShowGreenWaveView}")
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_GREENWAVE_WARNING, "1".toByteArray())
|
||||
}else{
|
||||
//V2N新链路
|
||||
scNewV2NData.isChecked = false
|
||||
hmiAction("SOP 是否是V2N新链路(云->工控机->App)",false)
|
||||
Log.i(TAG,"SOP 是否是V2N新链路(云->工控机->App), false")
|
||||
//V2N场景进PNC
|
||||
scV2nPnc.isChecked = false
|
||||
hmiAction("SOP V2N场景进PNC, ",false)
|
||||
Log.i(TAG,"SOP V2N场景进PNC, false")
|
||||
CallerAutoPilotControlManager.sendV2nToPncCmd(false)
|
||||
//绿波通行
|
||||
scGreenWaveSop.isChecked = false
|
||||
hmiAction("SOP obu绿波通行, ",false)
|
||||
Log.i(TAG,"SOP obu绿波通行, false")
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_GREENWAVE_WARNING, "0".toByteArray())
|
||||
}
|
||||
scNewV2NData.isEnabled = isChecked
|
||||
scV2nPnc.isEnabled = isChecked
|
||||
scGreenWaveSop.isEnabled = isChecked
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
FunctionBuildConfig.v2nMainSwitch = isChecked
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbMarkingObstacles.visibility = View.GONE
|
||||
//V2I总开关
|
||||
scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView //是否展示obu的v2i
|
||||
//根据V2I状态设置子开关是否可以点击
|
||||
scV2iPnc.isEnabled = HmiBuildConfig.isShowObuV2iView
|
||||
scRunRedLightSop.isEnabled = HmiBuildConfig.isShowObuV2iView
|
||||
scObuWeaknessTrafficSop.isEnabled = HmiBuildConfig.isShowObuV2iView
|
||||
scV2ISwitch.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(isChecked){
|
||||
//V2I场景进PNC
|
||||
scV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc
|
||||
hmiAction("SOP V2I场景进PNC, ",FunctionBuildConfig.isV2IPnc)
|
||||
Log.i(TAG,"SOP V2I场景进PNC,${FunctionBuildConfig.isV2IPnc}")
|
||||
CallerAutoPilotControlManager.sendV2iToPncCmd(FunctionBuildConfig.isV2IPnc)
|
||||
//闯红灯预警
|
||||
scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
|
||||
hmiAction("SOP obu闯红灯预警, ",HmiBuildConfig.isShowRunRedLightView)
|
||||
Log.i(TAG,"SOP obu闯红灯预警, ${HmiBuildConfig.isShowRunRedLightView}")
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "1".toByteArray())
|
||||
//路侧弱势交通参与者
|
||||
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
hmiAction("SOP obu弱势交通控制, ",HmiBuildConfig.isShowObuWeaknessTrafficView)
|
||||
Log.i(TAG,"SOP obu弱势交通控制, ${HmiBuildConfig.isShowObuWeaknessTrafficView}")
|
||||
}else{
|
||||
//V2I场景进PNC
|
||||
scV2iPnc.isChecked = false
|
||||
CallerAutoPilotControlManager.sendV2iToPncCmd(false)
|
||||
hmiAction("SOP V2I场景进PNC, ",false)
|
||||
Log.i(TAG,"SOP V2I场景进PNC, false")
|
||||
//闯红灯预警
|
||||
scRunRedLightSop.isChecked = false
|
||||
hmiAction("SOP obu闯红灯预警, ",false)
|
||||
Log.i(TAG,"SOP obu闯红灯预警, false")
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "0".toByteArray())
|
||||
//路侧弱势交通参与者
|
||||
scObuWeaknessTrafficSop.isChecked = false
|
||||
hmiAction("SOP obu弱势交通控制, ",false)
|
||||
Log.i(TAG,"SOP obu弱势交通控制, false")
|
||||
}
|
||||
scV2iPnc.isEnabled = isChecked
|
||||
scRunRedLightSop.isEnabled = isChecked
|
||||
scObuWeaknessTrafficSop.isEnabled = isChecked
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
HmiBuildConfig.isShowObuV2iView = isChecked
|
||||
}
|
||||
|
||||
tbRouteDynamicEffect.isChecked = HmiBuildConfig.isShowRouteStrategy
|
||||
tbRouteDynamicEffect.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 引导线动态效果",isChecked)
|
||||
HmiBuildConfig.isShowRouteStrategy = isChecked
|
||||
//V2N新链路
|
||||
scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData
|
||||
scNewV2NData.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP 是否是V2N新链路(云->工控机->App)",isChecked)
|
||||
Log.i(TAG,"SOP 是否是V2N新链路(云->工控机->App) ${isChecked}")
|
||||
FunctionBuildConfig.isNewV2NData = isChecked
|
||||
}
|
||||
|
||||
//默认开启
|
||||
tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP obu弱势交通控制, ",isChecked)
|
||||
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认关闭
|
||||
*/
|
||||
tbCloudWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowCloudWeaknessTrafficView
|
||||
tbCloudWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 云端弱势交通控制, ",isChecked)
|
||||
HmiBuildConfig.isShowCloudWeaknessTrafficView = isChecked
|
||||
}
|
||||
|
||||
tbV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
|
||||
tbV2nPnc.setOnCheckedChangeListener{ compoundButton, isChecked ->
|
||||
//V2N场景进PNC
|
||||
scV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
|
||||
scV2nPnc.setOnCheckedChangeListener{ compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP V2N场景进PNC, ",isChecked)
|
||||
Log.i(TAG,"SOP V2N场景进PNC, $isChecked")
|
||||
CallerAutoPilotControlManager.sendV2nToPncCmd(isChecked)
|
||||
FunctionBuildConfig.isV2NPnc = isChecked
|
||||
}
|
||||
|
||||
tbV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc
|
||||
tbV2iPnc.setOnCheckedChangeListener{ compoundButton, isChecked ->
|
||||
//绿波通行(默认关闭)
|
||||
scGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView
|
||||
scGreenWaveSop.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP V2I场景进PNC, ",isChecked)
|
||||
CallerAutoPilotControlManager.sendV2iToPncCmd(isChecked)
|
||||
FunctionBuildConfig.isV2IPnc = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认打开
|
||||
*/
|
||||
tbObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
|
||||
tbObuV2vView.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP obuV2V开关, ",isChecked)
|
||||
HmiBuildConfig.isShowObuV2vView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认打开
|
||||
*/
|
||||
tbObuV2iView.isChecked = HmiBuildConfig.isShowObuV2iView
|
||||
tbObuV2iView.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP obuV2i开关, ",isChecked)
|
||||
HmiBuildConfig.isShowObuV2iView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认关闭
|
||||
*/
|
||||
tbRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
|
||||
tbRunRedLightSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP obu闯红灯预警, ",isChecked)
|
||||
HmiBuildConfig.isShowRunRedLightView = isChecked
|
||||
if (HmiBuildConfig.isShowRunRedLightView) {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "1".toByteArray())
|
||||
} else {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "0".toByteArray())
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认关闭
|
||||
*/
|
||||
tbGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView
|
||||
tbGreenWaveSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP obu绿波通行, ",isChecked)
|
||||
Log.i(TAG,"SOP obu绿波通行, $isChecked")
|
||||
HmiBuildConfig.isShowGreenWaveView = isChecked
|
||||
if (HmiBuildConfig.isShowGreenWaveView) {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_GREENWAVE_WARNING, "1".toByteArray())
|
||||
@@ -162,34 +265,141 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
tbTrafficLight.isChecked = !HmiBuildConfig.isShowTrafficLightView
|
||||
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 红绿灯标识开关, ",isChecked)
|
||||
if (isChecked) {
|
||||
CallerHmiManager.showTrafficLightView()
|
||||
//V2I场景进PNC
|
||||
scV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc
|
||||
scV2iPnc.setOnCheckedChangeListener{ compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP V2I场景进PNC, ",isChecked)
|
||||
Log.i(TAG,"SOP V2I场景进PNC, $isChecked")
|
||||
CallerAutoPilotControlManager.sendV2iToPncCmd(isChecked)
|
||||
FunctionBuildConfig.isV2IPnc = isChecked
|
||||
}
|
||||
|
||||
//闯红灯预警(默认关闭)
|
||||
scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
|
||||
scRunRedLightSop.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP obu闯红灯预警, ",isChecked)
|
||||
Log.i(TAG,"SOP obu闯红灯预警, $isChecked")
|
||||
HmiBuildConfig.isShowRunRedLightView = isChecked
|
||||
if (HmiBuildConfig.isShowRunRedLightView) {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "1".toByteArray())
|
||||
} else {
|
||||
CallerHmiManager.hideTrafficLightView()
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "0".toByteArray())
|
||||
}
|
||||
}
|
||||
|
||||
tbSpeedLimit.isChecked = HmiBuildConfig.isShowLimitingVelocityView
|
||||
tbSpeedLimit.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 限速标识开关, ",isChecked)
|
||||
if (isChecked) {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = true
|
||||
} else {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
CallerHmiViewControlListenerManager.invokeVisible(IViewControlListener.LimitingVelocityView_TAG,View.GONE)
|
||||
//路侧弱势交通参与者(默认开启)
|
||||
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
scObuWeaknessTrafficSop.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP obu弱势交通控制, ",isChecked)
|
||||
Log.i(TAG,"SOP obu弱势交通控制, $isChecked")
|
||||
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
|
||||
}
|
||||
|
||||
//V2V总开关(默认关闭)
|
||||
scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
|
||||
scObuV2vView.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP obuV2V开关, ",isChecked)
|
||||
Log.i(TAG,"SOP obuV2V开关, $isChecked")
|
||||
HmiBuildConfig.isShowObuV2vView = isChecked
|
||||
}
|
||||
|
||||
//obu总开关
|
||||
obuConnectStatus = CallerObuApiManager.isConnected()
|
||||
scObu.isChecked = obuConnectStatus
|
||||
scObu.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP OBU控制总开关, ",isChecked)
|
||||
Log.i(TAG,"SOP OBU控制总开关, $isChecked")
|
||||
if (isChecked) {
|
||||
CallerObuApiManager.resetObuIpAddress(MogoObuConst.OBU_DEFAULT_IP)
|
||||
} else {
|
||||
//断开链接
|
||||
CallerObuApiManager.disConnectObu()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图效果类设置
|
||||
*/
|
||||
private fun mapSetting(){
|
||||
//危险障碍物颜色标记开关
|
||||
scMarkingObstacles.isChecked = FunctionBuildConfig.isPNCWarning
|
||||
scMarkingObstacles.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 危险障碍物颜色标记开关, ",isChecked)
|
||||
Log.i(TAG,"SOP 危险障碍物颜色标记开关, $isChecked")
|
||||
FunctionBuildConfig.isPNCWarning = isChecked
|
||||
}
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
scMarkingObstacles.isEnabled = false
|
||||
}
|
||||
|
||||
//引导线动态效果
|
||||
scRouteDynamicEffect.isChecked = HmiBuildConfig.isShowRouteStrategy
|
||||
scRouteDynamicEffect.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 引导线动态效果, ",isChecked)
|
||||
Log.i(TAG,"SOP 引导线动态效果, $isChecked")
|
||||
HmiBuildConfig.isShowRouteStrategy = isChecked
|
||||
}
|
||||
|
||||
//点云效果
|
||||
//初始化点云数据渲染情况
|
||||
scDrawPointCloudData.isChecked = FunctionBuildConfig.isDrawPointCloudData
|
||||
//是否渲染点云数据
|
||||
scDrawPointCloudData.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerAutoPilotControlManager.setIsDrawPointCloud(isChecked)
|
||||
FunctionBuildConfig.isDrawPointCloudData = isChecked
|
||||
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(isChecked)
|
||||
hmiAction("SOP 是否渲染点云数据, ",isChecked)
|
||||
Log.i(TAG,"SOP 是否渲染点云数据, $isChecked")
|
||||
}
|
||||
|
||||
//自车光圈
|
||||
scCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable
|
||||
scCarAperture.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(isChecked)
|
||||
FunctionBuildConfig.isDisplayAnimEnable = isChecked
|
||||
hmiAction("SOP 是否展示自车光圈,",isChecked)
|
||||
Log.i(TAG,"SOP 是否展示自车光圈,$isChecked")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 与车相关类设置
|
||||
*/
|
||||
private fun vehicleSetting(){
|
||||
//绕障类功能
|
||||
scObstacleAvoidance.isChecked = FunctionBuildConfig.isDetouring
|
||||
scObstacleAvoidance.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 绕障类功能开关, ",isChecked)
|
||||
Log.i(TAG,"SOP 绕障类功能开关, $isChecked")
|
||||
CallerAutoPilotControlManager.sendDetouring(isChecked)
|
||||
FunctionBuildConfig.isDetouring = isChecked
|
||||
}
|
||||
|
||||
// 演示模式,上一次勾选的数据
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
tbDemoMode.setOnCheckedChangeListener { compoundButton, _ ->
|
||||
scDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
scDemoMode.setOnCheckedChangeListener { compoundButton, _ ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP 演示模式开关, ",!FunctionBuildConfig.isDemoMode)
|
||||
Log.i(TAG,"SOP 演示模式开关, ${!FunctionBuildConfig.isDemoMode}")
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerAutoPilotControlManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
CallerHmiViewControlListenerManager.invokeFuncMode(FUNC_MODE_DEMO, FunctionBuildConfig.isDemoMode)
|
||||
@@ -200,87 +410,42 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbDemoMode.visibility = View.GONE
|
||||
scDemoMode.isEnabled = false
|
||||
}
|
||||
|
||||
// 雨天模式,上一次勾选的数据
|
||||
tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
tbRainMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
scRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
scRainMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
hmiAction("SOP 雨天模式开关, ",isChecked)
|
||||
Log.i(TAG,"SOP 雨天模式开关, $isChecked")
|
||||
FunctionBuildConfig.isRainMode = isChecked
|
||||
CallerAutoPilotControlManager.setRainMode(isChecked)
|
||||
CallerHmiViewControlListenerManager.invokeFuncMode(FUNC_MODE_RAIN, isChecked)
|
||||
}
|
||||
//雨天模式按钮只在司机屏生效,乘客屏不显示
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbRainMode.visibility = View.GONE
|
||||
}
|
||||
|
||||
tbObu.isChecked = CallerObuApiManager.isConnected()
|
||||
tbObu.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP OBU控制总开关, ",isChecked)
|
||||
if (isChecked) {
|
||||
CallerObuApiManager.resetObuIpAddress(MogoObuConst.OBU_DEFAULT_IP)
|
||||
} else {
|
||||
//断开链接
|
||||
CallerObuApiManager.disConnectObu()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tbIPCReport.isChecked = FunctionBuildConfig.isReportWarning
|
||||
tbIPCReport.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 是否开启异常上报, ",isChecked)
|
||||
FunctionBuildConfig.isReportWarning = isChecked
|
||||
}
|
||||
|
||||
tbNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData
|
||||
tbNewV2NData.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 是否是V2N新链路(云->工控机->App)",isChecked)
|
||||
FunctionBuildConfig.isNewV2NData = isChecked
|
||||
}
|
||||
|
||||
// M1 360度环视
|
||||
tbNew360LookAround?.also {
|
||||
if (!AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)) {
|
||||
it.isEnabled = false
|
||||
} else {
|
||||
it.isEnabled = true
|
||||
it.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
CallerHmiManager.showM1360LookAround()
|
||||
} else {
|
||||
CallerHmiManager.hidM1360LookAround()
|
||||
}
|
||||
}
|
||||
it.isChecked = CallerHmiManager.isM1360LookAroundShowing()
|
||||
}
|
||||
scRainMode.isEnabled = false
|
||||
}
|
||||
|
||||
//弱网减速停车
|
||||
tbWeakNetSlowDown.isChecked = FunctionBuildConfig.isWeakNetSlowDown
|
||||
tbWeakNetSlowDown.setOnCheckedChangeListener{_, isChecked ->
|
||||
scWeakNetSlowDown.isChecked = FunctionBuildConfig.isWeakNetSlowDown
|
||||
scWeakNetSlowDown.setOnCheckedChangeListener{_, isChecked ->
|
||||
FunctionBuildConfig.isWeakNetSlowDown = isChecked
|
||||
CallerAutoPilotControlManager.sendWeakNetSlowDown(isChecked)
|
||||
hmiAction("SOP 弱网减速停车, ",isChecked)
|
||||
Log.i(TAG,"SOP 弱网减速停车, $isChecked")
|
||||
}
|
||||
|
||||
//故障减速停车
|
||||
tbFaultSlowDown.isChecked = FunctionBuildConfig.isFaultSlowDown
|
||||
tbFaultSlowDown.setOnCheckedChangeListener{_, isChecked ->
|
||||
scFaultSlowDown.isChecked = FunctionBuildConfig.isFaultSlowDown
|
||||
scFaultSlowDown.setOnCheckedChangeListener{_, isChecked ->
|
||||
FunctionBuildConfig.isFaultSlowDown = isChecked
|
||||
CallerAutoPilotControlManager.sendBreakdownSlowDown(isChecked)
|
||||
hmiAction("SOP 故障减速停车, ",isChecked)
|
||||
}
|
||||
|
||||
//是否展示被动触发的录包弹窗(自动驾驶下出现问题触发的录包)
|
||||
tbShowBagRecordWindow.isChecked = FunctionBuildConfig.isShowBagRecordWindow
|
||||
tbShowBagRecordWindow.setOnCheckedChangeListener{_, isChecked ->
|
||||
FunctionBuildConfig.isShowBagRecordWindow = isChecked
|
||||
hmiAction("SOP 是否展示被动触发的录包弹窗, ",isChecked)
|
||||
Log.i(TAG,"SOP 故障减速停车, $isChecked")
|
||||
}
|
||||
//融合模式
|
||||
rgFusionMode.setOnCheckedChangeListener { _, p1 ->
|
||||
@@ -306,9 +471,74 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.fusionMode = 5
|
||||
}
|
||||
}
|
||||
hmiAction("SOP 融合模式, ",FunctionBuildConfig.fusionMode)
|
||||
Log.i(TAG,"SOP 融合模式, ${FunctionBuildConfig.fusionMode}")
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 其他类别开关设置
|
||||
*/
|
||||
private fun otherSetting(){
|
||||
//红绿灯标识开关
|
||||
scTrafficLight.isChecked = !HmiBuildConfig.isShowTrafficLightView
|
||||
scTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 红绿灯标识开关, ",isChecked)
|
||||
Log.i(TAG,"SOP 红绿灯标识开关, $isChecked")
|
||||
if (isChecked) {
|
||||
CallerHmiManager.showTrafficLightView()
|
||||
} else {
|
||||
CallerHmiManager.hideTrafficLightView()
|
||||
}
|
||||
}
|
||||
|
||||
//限速标识
|
||||
scSpeedLimit.isChecked = HmiBuildConfig.isShowLimitingVelocityView
|
||||
scSpeedLimit.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 限速标识开关, ",isChecked)
|
||||
Log.i(TAG,"SOP 限速标识开关, $isChecked")
|
||||
if (isChecked) {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = true
|
||||
CallerHmiViewControlListenerManager.invokeVisible(IViewControlListener.LimitingVelocityView_TAG,View.VISIBLE)
|
||||
} else {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
CallerHmiViewControlListenerManager.invokeVisible(IViewControlListener.LimitingVelocityView_TAG,View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
//异常上报提示
|
||||
scIPCReport.isChecked = FunctionBuildConfig.isReportWarning
|
||||
scIPCReport.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 是否开启异常上报, ",isChecked)
|
||||
Log.i(TAG,"SOP 是否开启异常上报, $isChecked")
|
||||
FunctionBuildConfig.isReportWarning = isChecked
|
||||
}
|
||||
|
||||
// M1 360度环视
|
||||
scNew360LookAround?.also {
|
||||
if (!AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)) {
|
||||
it.isEnabled = false
|
||||
} else {
|
||||
it.isEnabled = true
|
||||
it.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
CallerHmiManager.showM1360LookAround()
|
||||
} else {
|
||||
CallerHmiManager.hidM1360LookAround()
|
||||
}
|
||||
}
|
||||
it.isChecked = CallerHmiManager.isM1360LookAroundShowing()
|
||||
}
|
||||
}
|
||||
|
||||
//是否展示被动触发的录包弹窗(自动驾驶下出现问题触发的录包)
|
||||
scShowBagRecordWindow.isChecked = FunctionBuildConfig.isShowBagRecordWindow
|
||||
scShowBagRecordWindow.setOnCheckedChangeListener{_, isChecked ->
|
||||
FunctionBuildConfig.isShowBagRecordWindow = isChecked
|
||||
hmiAction("SOP 是否展示被动触发的录包弹窗, ",isChecked)
|
||||
Log.i(TAG,"SOP 是否展示被动触发的录包弹窗, $isChecked")
|
||||
}
|
||||
|
||||
//变道绕障的目标障碍物速度阈值
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
@@ -393,8 +623,11 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
mfStatusLayout.setClickEnabled(false)
|
||||
mfTest.isEnabled = false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
//添加 业务配置监听
|
||||
@@ -410,10 +643,10 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
override fun updateFuncMode(tag: String, boolean: Boolean) {
|
||||
super.updateFuncMode(tag, boolean)
|
||||
if(tag == FUNC_MODE_DEMO){
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
scDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
}
|
||||
if(tag == FUNC_MODE_RAIN){
|
||||
tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
scRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,40 +659,34 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
CallerDevaToolsManager.mofang()?.unRegisterMoFangStatusListener(this)
|
||||
}
|
||||
|
||||
// private val timerTaskRefresh = object : TimerTask(){
|
||||
// override fun run() {
|
||||
// UiThreadHandler.post{
|
||||
// tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
// tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
override fun updateBizView(type: String, lock: Boolean) {
|
||||
when (type) {
|
||||
//美化模式
|
||||
FuncBizConfig.BIZ_BEAUTY_MODE -> {
|
||||
tbDemoMode.isClickable = !lock
|
||||
scDemoMode.isClickable = !lock
|
||||
if(lock){
|
||||
tbDemoMode.visibility = View.INVISIBLE
|
||||
scDemoMode.visibility = View.INVISIBLE
|
||||
}else{
|
||||
tbDemoMode.visibility = View.VISIBLE
|
||||
scDemoMode.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
//雨天模式
|
||||
FuncBizConfig.BIZ_RAIN_MODE -> {
|
||||
tbRainMode.isClickable = !lock
|
||||
scRainMode.isClickable = !lock
|
||||
if (lock) {
|
||||
tbRainMode.visibility = View.INVISIBLE
|
||||
scRainMode.visibility = View.INVISIBLE
|
||||
} else {
|
||||
tbRainMode.visibility = View.VISIBLE
|
||||
scRainMode.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
//危险障碍物颜色标记
|
||||
FuncBizConfig.BIZ_PNC_WARNING -> {
|
||||
tbMarkingObstacles.isClickable = !lock
|
||||
scMarkingObstacles.isClickable = !lock
|
||||
if (lock) {
|
||||
tbMarkingObstacles.visibility = View.INVISIBLE
|
||||
scMarkingObstacles.visibility = View.INVISIBLE
|
||||
} else {
|
||||
tbMarkingObstacles.visibility = View.VISIBLE
|
||||
scMarkingObstacles.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.hmi.ui.vehicle
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -12,20 +11,24 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.zhjt.mogo.adas.data.bean.MogoReport
|
||||
import mogo.yycp.paralleldriving.protocol.ParallelTaskProcessNoticeOuterClass
|
||||
import mogo_msg.MogoReportMsg
|
||||
|
||||
class TakeOverView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener,
|
||||
IMoGoParallelDrivingStatusListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "TakeOverView"
|
||||
@@ -41,6 +44,7 @@ class TakeOverView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerParallelDrivingListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
@@ -147,5 +151,68 @@ class TakeOverView @JvmOverloads constructor(
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerParallelDrivingListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
/**
|
||||
* 平行驾驶状态回调,云端说有状态变化就回调
|
||||
*/
|
||||
override fun onParallelDrivingResp(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) {
|
||||
parallelTaskProcessNotice?.let {
|
||||
if (takeOver) {
|
||||
return@let
|
||||
}
|
||||
when(it.code){
|
||||
//进入同步状态
|
||||
"START_SYNC"->{
|
||||
|
||||
}
|
||||
//同步结束
|
||||
"EXIT_SYNC"->{
|
||||
|
||||
}
|
||||
//无法接管
|
||||
"UNABLE_TAKEOVER"->{
|
||||
showParallelDrivingWarning("UNABLE_TAKEOVER","远程无法介入,注意随时接管","远程无法介入,注意随时接管")
|
||||
}
|
||||
//同步异常结束
|
||||
"EXCEPTION_EXIT_SYNC"->{
|
||||
showParallelDrivingWarning("EXCEPTION_EXIT_SYNC","远程介入失败,注意随时接管","远程介入失败,注意随时接管")
|
||||
}
|
||||
//任务已被拒绝
|
||||
"TASK_REJECTED"->{
|
||||
|
||||
}
|
||||
//异常请人工驾驶
|
||||
"PARALLEL_EXCEPTION_MANUAL_DRIVING"->{
|
||||
showParallelDrivingWarning("PARALLEL_EXCEPTION_MANUAL_DRIVING","即将靠边停车,注意随时接管","即将靠边停车,注意随时接管")
|
||||
}
|
||||
//平行驾驶异常结束
|
||||
"EXCEPTION_EXIT_PARALLEL_DRIVING"->{
|
||||
showParallelDrivingWarning("EXCEPTION_EXIT_PARALLEL_DRIVING","可能应急停车,注意随时接管","可能应急停车,注意随时接管")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showParallelDrivingWarning(poiType: String,content: String,tts: String){
|
||||
CallerHmiManager.warningV2X(poiType, content, tts,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
takeOver = true
|
||||
ThreadUtils.runOnUiThread{
|
||||
visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
takeOver = false
|
||||
ThreadUtils.runOnUiThread{
|
||||
visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
,isFromObu = false)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,6 +27,9 @@ class LimitingVelocityView constructor(
|
||||
private const val TAG = "LimitingVelocityView"
|
||||
}
|
||||
|
||||
//限速控件是否展示
|
||||
private var isShow = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_limiting_speed_vr, this, true)
|
||||
}
|
||||
@@ -38,20 +41,22 @@ class LimitingVelocityView constructor(
|
||||
}
|
||||
|
||||
override fun onLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (limitingVelocity > 0) {
|
||||
visibility = View.VISIBLE
|
||||
tvLimitingVelocity.text = "$limitingVelocity"
|
||||
tvLimitingSource?.text = DataSourceType.getName(sourceType)
|
||||
} else {
|
||||
visibility = View.GONE
|
||||
tvLimitingSource?.text = ""
|
||||
if(isShow){
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (limitingVelocity > 0) {
|
||||
visibility = View.VISIBLE
|
||||
tvLimitingVelocity.text = "$limitingVelocity"
|
||||
tvLimitingSource?.text = DataSourceType.getName(sourceType)
|
||||
} else {
|
||||
visibility = View.GONE
|
||||
tvLimitingSource?.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
isShow = v == View.VISIBLE
|
||||
this.visibility = v
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,352 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.SourceType
|
||||
import mogo.yycp.paralleldriving.protocol.ParallelDrivingRequest.ParallelRequest
|
||||
import mogo.yycp.paralleldriving.protocol.ParallelTaskProcessNoticeOuterClass
|
||||
|
||||
/**
|
||||
* 平行驾驶状态View
|
||||
*/
|
||||
class ParallelDriveView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener,
|
||||
IMoGoParallelDrivingActionsListener, IMoGoParallelDrivingStatusListener {
|
||||
companion object {
|
||||
private const val TAG = "ParallelDriveView"
|
||||
private const val APP_REQUESTING = 1
|
||||
private const val AD_REQUESTING = 2
|
||||
private const val SYNCHRONIZING = 3
|
||||
private const val PARALLEL_DRIVING = 4
|
||||
private const val FAILURE = 5
|
||||
private const val ONE_EXCEPTION = 6
|
||||
private const val TWO_EXCEPTION = 7
|
||||
private const val UNAVAILABLE = 8
|
||||
}
|
||||
|
||||
//1:ready, 2:自动驾驶中, 7:平行驾驶中
|
||||
@Volatile
|
||||
private var autopilotState: Int = 1
|
||||
|
||||
// 初始状态为0
|
||||
private var state: Int = 0
|
||||
|
||||
private lateinit var rootLayout: ConstraintLayout
|
||||
private lateinit var statusIcon: ImageView
|
||||
private lateinit var statusTitle: TextView
|
||||
private var listener: ClickEventListener? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_parallel_drive, this, true)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
initView()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerParallelDrivingListenerManager.addListener(TAG, this)
|
||||
CallerParallelDrivingActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
rootLayout = findViewById(R.id.parDriveLayout)
|
||||
statusIcon = findViewById(R.id.ivStatusIcon)
|
||||
statusTitle = findViewById(R.id.tvAutopilotContent)
|
||||
rootLayout.setOnClickListener {
|
||||
when (state) {
|
||||
0 -> {
|
||||
state = APP_REQUESTING
|
||||
updateUI(APP_REQUESTING)
|
||||
reqParaDrive()
|
||||
listener?.onReqClick()
|
||||
}
|
||||
APP_REQUESTING -> {
|
||||
cancelParaDrive()
|
||||
ToastUtils.showShort("请求已取消!")
|
||||
checkAvailableAndUpdateUI()
|
||||
}
|
||||
UNAVAILABLE -> {
|
||||
ToastUtils.showShort("请P档驻车并松开油门刹车后请求")
|
||||
}
|
||||
}
|
||||
}
|
||||
checkAvailableAndUpdateUI()
|
||||
}
|
||||
|
||||
fun setClickEventListener(listener: ClickEventListener?) {
|
||||
this.listener = listener
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
super.onAutopilotStatusResponse(state)
|
||||
if (state != autopilotState) {
|
||||
synchronized(this) {
|
||||
when (state) {
|
||||
7 -> {
|
||||
if (this.autopilotState != 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
updateUI(PARALLEL_DRIVING)
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
if (this.autopilotState == 7 && this.autopilotState != state) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.autopilotState = state
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onParallelDrivingAbility(
|
||||
isParallelDrivingAbility: Boolean,
|
||||
unableParallelDrivingReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (!isParallelDrivingAbility) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
updateUI(UNAVAILABLE)
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onParallelDrivingResp(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) {
|
||||
parallelTaskProcessNotice?.let {
|
||||
ThreadUtils.runOnUiThread({
|
||||
when (it.code) {
|
||||
"START_SYNC" -> {// 同步中
|
||||
state = SYNCHRONIZING
|
||||
updateUI(SYNCHRONIZING)
|
||||
}
|
||||
"EXCEPTION_EXIT_SYNC" -> {// 同步异常结束
|
||||
state = ONE_EXCEPTION
|
||||
updateUI(ONE_EXCEPTION)
|
||||
}
|
||||
"TASK_REJECTED" -> {// 任务已被拒绝
|
||||
state = FAILURE
|
||||
updateUI(FAILURE)
|
||||
AIAssist.getInstance(context).speakTTSVoice("请求已被拒绝")
|
||||
}
|
||||
"PARALLEL_EXCEPTION_MANUAL_DRIVING" -> {// 异常请人工驾驶
|
||||
state = TWO_EXCEPTION
|
||||
updateUI(TWO_EXCEPTION)
|
||||
}
|
||||
"EXCEPTION_EXIT_PARALLEL_DRIVING" -> {// 平行驾驶异常结束
|
||||
state = ONE_EXCEPTION
|
||||
updateUI(ONE_EXCEPTION)
|
||||
}
|
||||
"EXIT_SYNC" -> {// 同步结束
|
||||
checkAvailableAndUpdateUI()
|
||||
}
|
||||
"UNABLE_TAKEOVER" -> {// 无法接管
|
||||
state = ONE_EXCEPTION
|
||||
updateUI(ONE_EXCEPTION)
|
||||
}
|
||||
"VEHICLE_IN_TROUBLE_PARALLEL_REQUESTED" -> {// 车辆遇困请求平行驾驶
|
||||
state = AD_REQUESTING
|
||||
updateUI(AD_REQUESTING)
|
||||
}
|
||||
}
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
|
||||
private fun isAvailable(unableAutopilotReasons: ArrayList<UnableLaunchReason>?): Boolean {
|
||||
var unavailable = false
|
||||
unableAutopilotReasons?.forEach {
|
||||
if (it.source.ordinal == SourceType.CHASSIS.ordinal) {
|
||||
unavailable = true
|
||||
}
|
||||
}
|
||||
return !unavailable
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
private fun updateUI(state: Int) {
|
||||
when (state) {
|
||||
0 -> {
|
||||
rootLayout.isEnabled = true
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_autopilot_status, null)
|
||||
statusTitle.text = context.getString(R.string.parallel_drive)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
}
|
||||
|
||||
APP_REQUESTING -> {
|
||||
rootLayout.isEnabled = true
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_para_requesting, null)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
statusTitle.text = context.getString(R.string.parallel_drive_requesting)
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
}
|
||||
|
||||
AD_REQUESTING -> {
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_para_requesting, null)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
statusTitle.text = context.getString(R.string.parallel_drive_requesting)
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
}
|
||||
|
||||
SYNCHRONIZING -> {
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_para_syn, null)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
statusTitle.text = context.getString(R.string.parallel_drive_synchronizing)
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
}
|
||||
|
||||
PARALLEL_DRIVING -> {
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_autopilot_status, null)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
rootLayout.background =
|
||||
resources.getDrawable(R.drawable.bg_auto_pilot_running, null)
|
||||
statusTitle.text = context.getString(R.string.parallel_drive)
|
||||
}
|
||||
|
||||
FAILURE -> {
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
rootLayout.postDelayed({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, 1000)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_fail_start, null)
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
statusTitle.text = context.getString(R.string.parallel_drive_failure)
|
||||
}
|
||||
|
||||
ONE_EXCEPTION -> {
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
rootLayout.postDelayed({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, 1000)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_fail_start, null)
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
statusTitle.text = context.getString(R.string.parallel_drive_exception)
|
||||
}
|
||||
|
||||
TWO_EXCEPTION -> {
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
rootLayout.postDelayed({
|
||||
checkAvailableAndUpdateUI()
|
||||
}, 2000)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_fail_start, null)
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
statusTitle.text = context.getString(R.string.parallel_drive_exception)
|
||||
}
|
||||
|
||||
UNAVAILABLE -> {
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 0.4f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_autopilot_status, null)
|
||||
statusTitle.setTextColor(Color.parseColor("#66FFFFFF"))
|
||||
statusIcon.alpha = 0.4f
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
statusTitle.text = context.getString(R.string.parallel_drive)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
private fun reqParaDrive() {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
val parallelRequest = ParallelRequest.newBuilder()
|
||||
.setSn(sn)
|
||||
.setType(2)// 2:鹰眼请求
|
||||
.setTakeover(1)// 1:请求平行驾驶接管
|
||||
.setCode("PAD_ACTIVE")
|
||||
parallelRequest.reason = "鹰眼请求"
|
||||
CallerAutoPilotControlManager.sendParallelDrivingReq(
|
||||
System.currentTimeMillis().toString(), parallelRequest.build()
|
||||
)
|
||||
}
|
||||
|
||||
private fun cancelParaDrive() {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
val parallelRequest = ParallelRequest.newBuilder()
|
||||
.setSn(sn)
|
||||
.setType(2)// 2:鹰眼请求
|
||||
.setTakeover(2)// 2:取消平行驾驶接管
|
||||
.setCode("PAD_ACTIVE")
|
||||
parallelRequest.reason = "鹰眼请求"
|
||||
CallerAutoPilotControlManager.sendParallelDrivingReq(
|
||||
System.currentTimeMillis().toString(), parallelRequest.build()
|
||||
)
|
||||
}
|
||||
|
||||
private fun checkAvailableAndUpdateUI() {
|
||||
if (CallerParallelDrivingActionsListenerManager.isParallelDrivingAbility()) {
|
||||
state = 0
|
||||
updateUI(0)
|
||||
} else {
|
||||
state = UNAVAILABLE
|
||||
updateUI(UNAVAILABLE)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerParallelDrivingListenerManager.removeListener(TAG)
|
||||
CallerParallelDrivingActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
interface ClickEventListener {
|
||||
fun onReqClick()
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.AdUpgradeStateHelper
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -26,6 +27,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import kotlinx.android.synthetic.main.view_system_version.view.*
|
||||
import system_master.SsmInfo
|
||||
import system_master.SystemStatusInfo
|
||||
|
||||
|
||||
/**
|
||||
@@ -63,6 +66,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
private fun initView() {
|
||||
showCurrentPadVersion()
|
||||
showCurrentAdVersion()
|
||||
updateAdHdMapVersion()
|
||||
|
||||
//鹰眼版本视图点击事件
|
||||
ivPadVersion.setOnClickListener {
|
||||
@@ -366,4 +370,42 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
location = gnssInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态查询应答
|
||||
* @param status 数据
|
||||
* HQ、M1 MAP350开始弃用,其他车型MAP360开始弃用
|
||||
*/
|
||||
override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) {
|
||||
if(status.hdMapVer!= null && status.hdMapVer.isNotEmpty()){
|
||||
AppConfigInfo.adHdMapVersion = status.hdMapVer
|
||||
updateAdHdMapVersion()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 定频SSM接口
|
||||
* 1hz hq m1 MAP350开始支持,其他车型MAP360开始支持
|
||||
* 定频SSM接入后 onStatusQueryResp 状态查询应答接口将弃用
|
||||
* @param statusInf 数据
|
||||
*/
|
||||
override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {
|
||||
if(statusInf.hdMapVer!= null && statusInf.hdMapVer.isNotEmpty()){
|
||||
AppConfigInfo.adHdMapVersion = statusInf.hdMapVer
|
||||
updateAdHdMapVersion()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新工控机高精地图版本
|
||||
*/
|
||||
private fun updateAdHdMapVersion(){
|
||||
if(tvAdHdMapVersionContent.text.isNullOrEmpty() && AppConfigInfo.adHdMapVersion.isNotEmpty() || tvAdHdMapVersionContent.text != AppConfigInfo.adHdMapVersion){
|
||||
ThreadUtils.runOnUiThread {
|
||||
tvAdHdMapVersionContent.text = AppConfigInfo.adHdMapVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -18,7 +18,7 @@
|
||||
android:id="@+id/ivBadCaseImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:src="@drawable/icon_bad_case"
|
||||
android:src="@drawable/icon_msg_bad_case"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/parDriveLayout"
|
||||
android:layout_width="361dp"
|
||||
android:layout_height="180dp"
|
||||
android:background="@drawable/bg_auto_pilot"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivStatusIcon"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="56dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAutopilotContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="72dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="36dp"
|
||||
tools:text="远程代驾"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,10 +12,10 @@
|
||||
android:layout_marginStart="113dp"
|
||||
android:src="@drawable/icon_version_pad"
|
||||
android:layout_marginTop="40dp"
|
||||
android:clickable="true"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:contentDescription="@string/current_system_version"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
@@ -62,6 +62,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="405dp"
|
||||
android:src="@drawable/icon_version_ad_normal"
|
||||
android:contentDescription="@string/current_system_version"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CircularProgressView
|
||||
@@ -108,10 +109,8 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvAdVersionTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvAdVersionTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAdVersionTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textColor="#FFA7B6F0"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:textSize="32dp"
|
||||
/>
|
||||
|
||||
@@ -124,6 +123,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="680dp"
|
||||
android:src="@drawable/icon_version_hd_map"
|
||||
android:contentDescription="@string/current_system_version"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
@@ -136,4 +136,44 @@
|
||||
app:layout_constraintCircleRadius="90dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<!--工控机HDMap版本-->
|
||||
<ImageView
|
||||
android:id="@+id/ivAdHdMapVersion"
|
||||
android:layout_width="@dimen/dp_150"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivPadVersion"
|
||||
app:layout_constraintRight_toRightOf="@id/ivPadVersion"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPadVersionContent"
|
||||
android:layout_marginTop="60dp"
|
||||
android:src="@drawable/icon_version_ad_hd_map"
|
||||
android:contentDescription="@string/current_system_version"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAdHdMapVersionTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivAdHdMapVersion"
|
||||
app:layout_constraintRight_toRightOf="@id/ivAdHdMapVersion"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivAdHdMapVersion"
|
||||
android:text="@string/current_system_version"
|
||||
android:textColor="#FFA7B6F0"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="32dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAdHdMapVersionContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivAdHdMapVersion"
|
||||
app:layout_constraintRight_toRightOf="@id/ivAdHdMapVersion"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAdHdMapVersionTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textColor="#FFA7B6F0"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -86,4 +86,9 @@
|
||||
<string name="light_source_ai_cloud">云端下发</string>
|
||||
<string name="light_source_perception">自车感知</string>
|
||||
<string name="light_source_obu">\u2000OBU\u2000</string>
|
||||
<string name="parallel_drive">远程代驾</string>
|
||||
<string name="parallel_drive_requesting">请求中...</string>
|
||||
<string name="parallel_drive_synchronizing">同步中...</string>
|
||||
<string name="parallel_drive_failure">请求失败</string>
|
||||
<string name="parallel_drive_exception">异常</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user