Merge branch 'dev_robotaxi-d_250603_8.1.0' into dev_robotaxi-d_250417_8.0.0_routing
# Conflicts: # OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/TaxiRunningModel.kt # OCH/common/common/src/main/java/com/mogo/och/common/module/constant/OchCommonConst.kt # OCH/common/common/src/main/java/com/mogo/och/common/module/manager/logchainanalytic/OchChainLogManager.kt
@@ -54,6 +54,12 @@ import kotlinx.android.synthetic.main.view_car_info_tab.view.tvPADUpdate
|
||||
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvPadVersion
|
||||
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvSlamMapVersion
|
||||
import kotlinx.android.synthetic.main.view_car_info_tab.view.tvSnInfo
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import system_master.SsmInfo
|
||||
import system_master.SystemStatusInfo
|
||||
|
||||
@@ -106,6 +112,7 @@ class CarInfoTabView @JvmOverloads constructor(
|
||||
CallerMapShowNameManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
private fun initView() {
|
||||
|
||||
val qrCodeView = CallerOchCustomViewManager.getOchBindQRCodeView(context)
|
||||
@@ -182,8 +189,10 @@ class CarInfoTabView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
MogoData.mogoMapData.get()?.isCityDataCached {
|
||||
updateHDDataCacheStatus(it)
|
||||
GlobalScope.launch(Dispatchers.IO){
|
||||
MogoData.mogoMapData.get()?.isCityDataCached {
|
||||
updateHDDataCacheStatus(it)
|
||||
}
|
||||
}
|
||||
|
||||
if(FunctionBuildConfig.isOffLine){
|
||||
@@ -356,7 +365,20 @@ class CarInfoTabView @JvmOverloads constructor(
|
||||
if(OTAUpgradeConfig.coldStartCompleted && !OTAUpgradeConfig.autopilotStatus
|
||||
&& !OTAUpgradeConfig.inOrder){
|
||||
//触发强提示升级
|
||||
CallerHmiManager.showOTAUpgradeDialog(true)
|
||||
val productArray = JSONArray(request.productName)
|
||||
var upgradeReason = ""
|
||||
var leftTime = 0
|
||||
if(productArray.length() > 0){
|
||||
val productInfo = productArray[0] as JSONObject
|
||||
upgradeReason = productInfo.optString("upgrade_reason")//升级原因
|
||||
leftTime = productInfo.optInt("left_time")//剩余时间,单位秒
|
||||
}
|
||||
val upgradeTime = if(leftTime > 60){
|
||||
"预计部署过程用时${leftTime/60}分钟${leftTime%60}秒"
|
||||
}else{
|
||||
"预计部署过程用时${leftTime%60}秒"
|
||||
}
|
||||
CallerHmiManager.showOTAUpgradeDialog(true,upgradeReason+upgradeTime)
|
||||
}else{
|
||||
ToastUtils.showLong("请结束订单后触发升级")
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
private val fsm = 21 //fsm消息
|
||||
private val nde = 22 //NDE消息车龙
|
||||
private val ota = 23 //OTA升级消息
|
||||
private val cloud = 24 //云控基础平台
|
||||
|
||||
private val none = -1
|
||||
|
||||
@@ -157,6 +158,12 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
.inflate(R.layout.item_tab_ota,parent,false)
|
||||
return MsgBoxOTA(view)
|
||||
}
|
||||
//云控基础平台
|
||||
cloud -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_tab_cloud,parent,false)
|
||||
return MsgBoxCloud(view)
|
||||
}
|
||||
//V2X消息
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
@@ -579,6 +586,17 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
}
|
||||
}
|
||||
}
|
||||
//云控基础平台
|
||||
is MsgBoxCloud->{
|
||||
data?.let {
|
||||
val cloudMsg = it[position].bean as CloudControlMsg
|
||||
holder.ivCloudImage.setImageDrawable(ResourcesCompat.getDrawable
|
||||
(activity.resources,EventTypeEnumNew.getUpdateIconRes(cloudMsg.msgType),null))
|
||||
holder.tvCloudTitle.text = cloudMsg.title
|
||||
holder.tvCloudContent.text = cloudMsg.des
|
||||
holder.tvCloudTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,6 +643,8 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
nde
|
||||
} else if(data!![position].type == MsgBoxType.OTA){
|
||||
ota
|
||||
} else if(data!![position].type == MsgBoxType.CLOUD){
|
||||
cloud
|
||||
} else if(data!![position].type == MsgBoxType.V2X || data!![position].type == MsgBoxType.OBU){
|
||||
v2x
|
||||
} else {
|
||||
@@ -748,4 +768,12 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
var tvOTAContent: TextView = itemView.findViewById(R.id.tvOTAContent)
|
||||
}
|
||||
|
||||
//云控基础平台
|
||||
class MsgBoxCloud(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var ivCloudImage: ImageView = itemView.findViewById(R.id.ivCloudImage)
|
||||
var tvCloudTitle: TextView = itemView.findViewById(R.id.tvCloudTitle)
|
||||
var tvCloudTime: TextView = itemView.findViewById(R.id.tvCloudTime)
|
||||
var tvCloudContent: TextView = itemView.findViewById(R.id.tvCloudContent)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -60,6 +60,7 @@ import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.ModifyBindingCarDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.OTADownloadStatusDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.OTAPowerOffFinishDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.OTAUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.OTAUpgradeResultDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.ToBindingCarDialog
|
||||
@@ -670,12 +671,14 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
private var otaUpgradeDialog: OTAUpgradeDialog ?= null
|
||||
private var otaDownloadStatusDialog: OTADownloadStatusDialog ?= null
|
||||
private var otaUpgradeResultDialog: OTAUpgradeResultDialog ?= null
|
||||
private var otaPowerOffFinishDialog: OTAPowerOffFinishDialog ?= null
|
||||
|
||||
/**
|
||||
* 展示OTA升级弹窗
|
||||
* @param isShow 设置是否展示
|
||||
* @param content 升级内容
|
||||
*/
|
||||
override fun showOTAUpgradeDialog(isShow: Boolean) {
|
||||
override fun showOTAUpgradeDialog(isShow: Boolean,content: String) {
|
||||
ThreadUtils.runOnUiThread{
|
||||
context?.let {
|
||||
if(isShow){
|
||||
@@ -685,6 +688,7 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
if(otaUpgradeDialog?.isShowing == false){
|
||||
otaUpgradeDialog?.show()
|
||||
}
|
||||
otaUpgradeDialog?.showUpgradeContent(content)
|
||||
}else{
|
||||
if(otaUpgradeDialog?.isShowing == true){
|
||||
otaUpgradeDialog?.dismiss()
|
||||
@@ -723,18 +727,43 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
|
||||
/**
|
||||
* 展示OTA升级结果弹窗
|
||||
* @param isShow 是否展示
|
||||
* @param result true升级成功 false升级失败
|
||||
*/
|
||||
override fun showOTAResultDialog(result: Boolean) {
|
||||
override fun showOTAResultDialog(isShow: Boolean,result: Boolean) {
|
||||
ThreadUtils.runOnUiThread{
|
||||
context?.let{
|
||||
if(otaUpgradeResultDialog == null){
|
||||
otaUpgradeResultDialog = OTAUpgradeResultDialog(it)
|
||||
if(isShow){
|
||||
context?.let{
|
||||
if(otaUpgradeResultDialog == null){
|
||||
otaUpgradeResultDialog = OTAUpgradeResultDialog(it)
|
||||
}
|
||||
if(otaUpgradeResultDialog?.isShowing == false){
|
||||
otaUpgradeResultDialog?.show()
|
||||
}
|
||||
otaUpgradeResultDialog?.showResult(result)
|
||||
}
|
||||
if(otaUpgradeResultDialog?.isShowing == false){
|
||||
otaUpgradeResultDialog?.show()
|
||||
}else{
|
||||
if(otaUpgradeResultDialog?.isShowing == true){
|
||||
otaUpgradeResultDialog?.dismiss()
|
||||
}
|
||||
otaUpgradeResultDialog?.showResult(result)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* OTA升级完成且优雅停服完成、需要车辆下电的时候车端告知鹰眼,司机屏弹窗提示用车人执行车辆下电操作
|
||||
*/
|
||||
override fun showOTAPowerOffFinishDialog() {
|
||||
ThreadUtils.runOnUiThread {
|
||||
context?.let {
|
||||
if(otaPowerOffFinishDialog == null){
|
||||
otaPowerOffFinishDialog = OTAPowerOffFinishDialog(it)
|
||||
}
|
||||
if(otaPowerOffFinishDialog?.isShowing == false){
|
||||
otaPowerOffFinishDialog?.show()
|
||||
}
|
||||
otaPowerOffFinishDialog?.speakTTS()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
private val none: Int = 10
|
||||
private val nde: Int = 11
|
||||
private val ota: Int = 12
|
||||
private val cloud: Int = 13 //云控基础平台
|
||||
|
||||
private var changeViewListener: ChangeViewListener?=null
|
||||
|
||||
@@ -118,6 +119,11 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_ota,parent,false)
|
||||
return BubbleOTAHolder(view)
|
||||
}
|
||||
//云控基础平台
|
||||
cloud -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_cloud,parent,false)
|
||||
return BubbleCloudHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
@@ -360,6 +366,17 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
}
|
||||
}
|
||||
}
|
||||
//云控基础平台消息
|
||||
is BubbleCloudHolder -> {
|
||||
data?.let {
|
||||
val cloudMsg = it[position].msgBoxBean.bean as CloudControlMsg
|
||||
holder.ivCloudImage.setImageDrawable(ResourcesCompat.getDrawable
|
||||
(activity.resources,EventTypeEnumNew.getUpdateIconRes(cloudMsg.msgType),null))
|
||||
holder.tvCloudTitle.text = cloudMsg.title
|
||||
holder.tvCloudContent.text = cloudMsg.des
|
||||
holder.tvCloudTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val msgBoxBean: MsgBoxCountDownBean = data!![position]
|
||||
@@ -419,6 +436,8 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
nde
|
||||
}else if(data!![position].msgBoxBean.type == MsgBoxType.OTA){
|
||||
ota
|
||||
}else if(data!![position].msgBoxBean.type == MsgBoxType.CLOUD){
|
||||
cloud
|
||||
}
|
||||
else {
|
||||
v2x
|
||||
@@ -526,6 +545,14 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
var tvOTAContent: TextView = itemView.findViewById(R.id.tvOTAContent)
|
||||
}
|
||||
|
||||
//云控基础平台消息
|
||||
class BubbleCloudHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivCloudImage: ImageView = itemView.findViewById(R.id.ivCloudImage)
|
||||
var tvCloudTitle: TextView = itemView.findViewById(R.id.tvCloudTitle)
|
||||
var tvCloudTime: TextView = itemView.findViewById(R.id.tvCloudTime)
|
||||
var tvCloudContent: TextView = itemView.findViewById(R.id.tvCloudContent)
|
||||
}
|
||||
|
||||
fun setChangeListener(listener: ChangeViewListener){
|
||||
changeViewListener = listener
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
private val fsm = 21 //fsm消息
|
||||
private val nde = 22 //NDE消息
|
||||
private val ota = 23 //OTA升级消息
|
||||
private val cloud = 24 //云控基础平台
|
||||
private val none = -1
|
||||
|
||||
|
||||
@@ -148,6 +149,12 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
.inflate(R.layout.item_msg_box_ota,parent,false)
|
||||
return MsgBoxOta(view)
|
||||
}
|
||||
//云控基础平台
|
||||
cloud->{
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_cloud,parent,false)
|
||||
return MsgBoxCloud(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_v2x, parent, false)
|
||||
@@ -745,6 +752,17 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
}
|
||||
}
|
||||
}
|
||||
//云控基础平台消息
|
||||
is MsgBoxCloud -> {
|
||||
data?.let {
|
||||
val cloudMsg = it[position].bean as CloudControlMsg
|
||||
holder.ivCloudImage.setImageDrawable(ResourcesCompat.getDrawable
|
||||
(activity.resources,EventTypeEnumNew.getUpdateIconRes(cloudMsg.msgType),null))
|
||||
holder.tvCloudTitle.text = cloudMsg.title
|
||||
holder.tvCloudContent.text = cloudMsg.des
|
||||
holder.tvCloudTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -791,6 +809,8 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
nde
|
||||
} else if(data!![position].type == MsgBoxType.OTA){
|
||||
ota
|
||||
} else if(data!![position].type == MsgBoxType.CLOUD){
|
||||
cloud
|
||||
} else if(data!![position].type == MsgBoxType.V2X || data!![position].type == MsgBoxType.OBU){
|
||||
v2x
|
||||
} else {
|
||||
@@ -930,4 +950,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
var ivOTAImage: ImageView = itemView.findViewById(R.id.ivOTAImage)
|
||||
}
|
||||
|
||||
//云控基础平台
|
||||
class MsgBoxCloud(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var ivCloudImage: ImageView = itemView.findViewById(R.id.ivCloudImage)
|
||||
var tvCloudTitle: TextView = itemView.findViewById(R.id.tvCloudTitle)
|
||||
var tvCloudTime: TextView = itemView.findViewById(R.id.tvCloudTime)
|
||||
var tvCloudContent: TextView = itemView.findViewById(R.id.tvCloudContent)
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.data.deva.report.ReportEntity
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.AutopilotMsg
|
||||
import com.mogo.eagle.core.data.msgbox.CloudControlMsg
|
||||
import com.mogo.eagle.core.data.msgbox.FMInfoMsg
|
||||
import com.mogo.eagle.core.data.msgbox.FSMMsg
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxCountDownBean
|
||||
@@ -52,6 +53,7 @@ class MsgBoxToastAdapter(private val activity: Activity) : RecyclerView.Adapter<
|
||||
private val report: Int = 3
|
||||
private val nde: Int = 4
|
||||
private val ota: Int = 5
|
||||
private val cloud: Int = 6
|
||||
|
||||
|
||||
fun setData(data: ArrayList<MsgBoxCountDownBean>){
|
||||
@@ -80,6 +82,11 @@ class MsgBoxToastAdapter(private val activity: Activity) : RecyclerView.Adapter<
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_toast_ota,parent,false)
|
||||
BubbleOTAHolder(view)
|
||||
}
|
||||
//云控基础平台
|
||||
cloud -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_toast_cloud,parent,false)
|
||||
BubbleCloudHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_toast_v2x,parent,false)
|
||||
BubbleV2XHolder(view)
|
||||
@@ -176,6 +183,16 @@ class MsgBoxToastAdapter(private val activity: Activity) : RecyclerView.Adapter<
|
||||
}
|
||||
}
|
||||
}
|
||||
//云控基础平台消息
|
||||
is BubbleCloudHolder->{
|
||||
data?.let {
|
||||
val cloudMsg = it[position].msgBoxBean.bean as CloudControlMsg
|
||||
holder.ivCloudImage.setImageDrawable(ResourcesCompat.getDrawable
|
||||
(activity.resources,EventTypeEnumNew.getUpdateIconRes(cloudMsg.msgType),null))
|
||||
holder.tvCloudTitle.text = cloudMsg.title
|
||||
holder.tvCloudContent.text = cloudMsg.des
|
||||
}
|
||||
}
|
||||
//V2X消息
|
||||
is BubbleV2XHolder -> {
|
||||
data?.let {
|
||||
@@ -356,6 +373,9 @@ class MsgBoxToastAdapter(private val activity: Activity) : RecyclerView.Adapter<
|
||||
MsgBoxType.OTA ->{
|
||||
ota
|
||||
}
|
||||
MsgBoxType.CLOUD ->{
|
||||
cloud
|
||||
}
|
||||
else -> {
|
||||
v2x
|
||||
}
|
||||
@@ -408,4 +428,10 @@ class MsgBoxToastAdapter(private val activity: Activity) : RecyclerView.Adapter<
|
||||
var ivOTAImage: ImageView = itemView.findViewById(R.id.ivOTAImage)
|
||||
}
|
||||
|
||||
//云控基础平台
|
||||
class BubbleCloudHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivCloudImage: ImageView = itemView.findViewById(R.id.ivCloudImage)
|
||||
var tvCloudTitle: TextView = itemView.findViewById(R.id.tvCloudTitle)
|
||||
var tvCloudContent: TextView = itemView.findViewById(R.id.tvCloudContent)
|
||||
}
|
||||
}
|
||||
@@ -25,10 +25,9 @@ import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.data.obu.MogoObuConst
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoGetParamResponseListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IImgUploadCloudListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IV2XListener
|
||||
import com.mogo.eagle.core.function.api.devatools.mofang.IMoGoMoFangProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
||||
@@ -40,11 +39,10 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotGetParamResponseDispatcher
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerImgUploadCloudManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerV2XManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
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.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
@@ -324,18 +322,42 @@ class OperatePanelLayout : LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
class V2XPreferenceFragmentCompat : OperatePanelDetailBase() {
|
||||
class V2XPreferenceFragmentCompat : OperatePanelDetailBase(), IV2XListener {
|
||||
|
||||
companion object {
|
||||
private const val KEY_V2X_TOTAL_SWITCH = "v2x_total_switch"
|
||||
private const val KEY_V2N_TOTAL_SWITCH = "v2n_total_switch"
|
||||
private const val KEY_V2N_NEW_LINKED_TO_PNC = "v2n_new_linked_to_pnc"
|
||||
private const val KEY_V2I_TOTAL_SWITCH = "v2i_total_switch"
|
||||
private const val KEY_V2I_TO_PNC = "v2i_to_pnc"
|
||||
private const val KEY_V2I_RED_LIGHT_WARNING = "v2i_red_light_warning"
|
||||
private const val KEY_V2I_WEAKNESS_TRAFFIC = "v2i_weakness_traffic"
|
||||
private const val KEY_V2V_TOTAL_SWITCH = "v2v_total_switch"
|
||||
private const val KEY_OBU_TOTAL_SWITCH = "obu_total_switch"
|
||||
private const val TAG = "V2XPreferenceFragmentCompat"
|
||||
private const val NDE_UPWARD_SWITCH = "nde_upward_switch" //NDE(数据上车)上行
|
||||
private const val IMAGE_UPLOAD_SWITCH = "image_upload_switch" //车辆图像上传行云大模型
|
||||
private const val NDE_DOWNWARD_SWITCH = "nde_downward_switch" //NDE(数据上车)下行
|
||||
private const val NDE_EVENT_DATA_TO_PNC = "nde_event_data_to_pnc" //事件数据进PNC应用
|
||||
private const val NDE_PERCEPTION_DATA_TO_PNC = "nde_perception_data_to_pnc" //感知数据进PNC应用
|
||||
private const val CLOUD_CONTROL_UPWARD = "cloud_control_upward" //云控基础平台上行
|
||||
private const val CLOUD_CONTROL_DOWNWARD = "cloud_control_downward" //云控基础平台下行
|
||||
private const val OBU_UPWARD_SWITCH = "obu_upward_switch" //OBU上报(V2I、V2V上行)
|
||||
private const val V2I_DOWNWARD_SWITCH = "v2i_downward_switch" //V2I下行
|
||||
private const val V2I_WEAK_TRAFFIC_PARTICIPANT = "v2i_weak_traffic_participant" //弱势交通参与者
|
||||
private const val V2I_PERCEPTION_DATA_TO_PNC = "v2i_perception_data_to_pnc" //感知数据进PNC应用
|
||||
private const val V2V_DOWNWARD_SWITCH = "v2v_downward_switch" //V2V下行
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater,
|
||||
container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View {
|
||||
CallerV2XManager.addListener(TAG,this)
|
||||
if (AppConfigInfo.isConnectAutopilot){
|
||||
//云端配置查询
|
||||
CallerAutoPilotControlManager.sendCloudConfigRequest()
|
||||
//域控上报OBU开关状态查询
|
||||
CallerAutoPilotControlManager.sendObuUploadStatusQuery()
|
||||
//车辆图像上传行云大模型状态查询
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery()
|
||||
}
|
||||
return super.onCreateView(inflater, container, savedInstanceState)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
CallerV2XManager.removeListener(TAG)
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
@@ -344,32 +366,53 @@ class OperatePanelLayout : LinearLayout {
|
||||
|
||||
override fun getDefaultVal(pref: Preference): Any? {
|
||||
when (pref.key) {
|
||||
KEY_V2X_TOTAL_SWITCH -> {
|
||||
return FunctionBuildConfig.v2xTotalSwitch
|
||||
//NDE(数据上车)上行
|
||||
NDE_UPWARD_SWITCH->{
|
||||
return FunctionBuildConfig.ndeUpwardSwitch
|
||||
}
|
||||
KEY_V2N_TOTAL_SWITCH -> {
|
||||
return FunctionBuildConfig.v2nTotalSwitch
|
||||
//车辆图像上传行云大模型
|
||||
IMAGE_UPLOAD_SWITCH->{
|
||||
return FunctionBuildConfig.isImageUpload
|
||||
}
|
||||
KEY_V2N_NEW_LINKED_TO_PNC -> {
|
||||
return FunctionBuildConfig.v2nNewLinkedToPNC
|
||||
//NDE(数据上车)下行
|
||||
NDE_DOWNWARD_SWITCH->{
|
||||
return FunctionBuildConfig.ndeDownwardSwitch
|
||||
}
|
||||
KEY_V2I_TOTAL_SWITCH -> {
|
||||
return HmiBuildConfig.v2iTotalSwitch
|
||||
//事件数据进PNC应用
|
||||
NDE_EVENT_DATA_TO_PNC->{
|
||||
return FunctionBuildConfig.ndeEventDataToPnc
|
||||
}
|
||||
KEY_V2I_TO_PNC -> {
|
||||
return FunctionBuildConfig.v2iToPNC
|
||||
//感知数据进PNC应用
|
||||
NDE_PERCEPTION_DATA_TO_PNC->{
|
||||
return FunctionBuildConfig.ndePerceptionDataToPnc
|
||||
}
|
||||
KEY_V2I_RED_LIGHT_WARNING -> {
|
||||
return HmiBuildConfig.v2iRedLightWarning
|
||||
//云控基础平台上行
|
||||
CLOUD_CONTROL_UPWARD->{
|
||||
return FunctionBuildConfig.cloudControlUpward
|
||||
}
|
||||
KEY_V2I_WEAKNESS_TRAFFIC -> {
|
||||
return HmiBuildConfig.v2iWeaknessTraffic
|
||||
//云控基础平台下行
|
||||
CLOUD_CONTROL_DOWNWARD->{
|
||||
return FunctionBuildConfig.cloudControlDownward
|
||||
}
|
||||
KEY_V2V_TOTAL_SWITCH -> {
|
||||
return HmiBuildConfig.v2vTotalSwitch
|
||||
//OBU上报(V2I、V2V上行)
|
||||
OBU_UPWARD_SWITCH->{
|
||||
return FunctionBuildConfig.obuUpwardSwitch
|
||||
}
|
||||
KEY_OBU_TOTAL_SWITCH -> {
|
||||
return CallerObuApiManager.isConnected()
|
||||
//V2I下行
|
||||
V2I_DOWNWARD_SWITCH->{
|
||||
return FunctionBuildConfig.v2iDownwardSwitch
|
||||
}
|
||||
//弱势交通参与者
|
||||
V2I_WEAK_TRAFFIC_PARTICIPANT->{
|
||||
return FunctionBuildConfig.v2iWeakTrafficParticipant
|
||||
}
|
||||
//感知数据进PNC应用
|
||||
V2I_PERCEPTION_DATA_TO_PNC->{
|
||||
return FunctionBuildConfig.v2iPerceptionDataToPnc
|
||||
}
|
||||
//V2V下行
|
||||
V2V_DOWNWARD_SWITCH->{
|
||||
return FunctionBuildConfig.v2vDownwardSwitch
|
||||
}
|
||||
}
|
||||
return super.getDefaultVal(pref)
|
||||
@@ -378,110 +421,311 @@ class OperatePanelLayout : LinearLayout {
|
||||
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
|
||||
Log.d(TAG, "-- onPreferenceChange:($preference, $newValue)")
|
||||
when (preference.key) {
|
||||
KEY_V2X_TOTAL_SWITCH -> {
|
||||
//NDE(数据上车)上行
|
||||
NDE_UPWARD_SWITCH->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.v2xTotalSwitch = isChecked
|
||||
hmiAction("V2X总开关, ", isChecked)
|
||||
clickEventAnalytics("V2X总开关", isChecked)
|
||||
if (isChecked) {
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_TOTAL_SWITCH)?.also { changeValue(it, FunctionBuildConfig.v2nTotalSwitch) } // V2N总开关
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2I_TOTAL_SWITCH)?.also { changeValue(it, HmiBuildConfig.v2iTotalSwitch) } // V2I总开关
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2V_TOTAL_SWITCH)?.also { changeValue(it, HmiBuildConfig.v2vTotalSwitch) } // V2V总开关
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_OBU_TOTAL_SWITCH)?.also { changeValue(it, CallerObuApiManager.isConnected()) } // OBU总开关
|
||||
} else {
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_TOTAL_SWITCH)?.also { changeValue(it, false) } // V2N总开关
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2I_TOTAL_SWITCH)?.also { changeValue(it, false) } // V2I总开关
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2V_TOTAL_SWITCH)?.also { changeValue(it, false) } // V2V总开关
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_OBU_TOTAL_SWITCH)?.also { changeValue(it, false) } // OBU总开关
|
||||
FunctionBuildConfig.ndeUpwardSwitch = isChecked
|
||||
//NDE(数据上车)上行命令开关
|
||||
CallerAutoPilotControlManager.sendForceStopOrStartCloudReq(1,1,isChecked)
|
||||
//查询NDE(数据上车)上行设置状态,设置完成后延迟500毫秒进行查询
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendCloudConfigRequest()
|
||||
}, 500)
|
||||
if(isChecked){
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(IMAGE_UPLOAD_SWITCH)?.also { changeValue(it, FunctionBuildConfig.isImageUpload) }//车辆图像上传行云大模型
|
||||
}else{
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(IMAGE_UPLOAD_SWITCH)?.also { changeValue(it, false) }//车辆图像上传行云大模型
|
||||
//域控摄像头上传NDE云开关命令
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudEnable(false)
|
||||
//查询域控摄像头上传NDE云开关状态查询,设置完成后延迟500毫秒进行查询
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery()
|
||||
}, 500)
|
||||
}
|
||||
hmiAction("NDE(数据上车)上行, ", isChecked)
|
||||
clickEventAnalytics("NDE(数据上车)上行", isChecked)
|
||||
return true
|
||||
}
|
||||
//车辆图像上传行云大模型
|
||||
IMAGE_UPLOAD_SWITCH->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.isImageUpload = isChecked
|
||||
//域控摄像头上传NDE云开关命令
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudEnable(isChecked)
|
||||
//查询域控摄像头上传NDE云开关状态查询,设置完成后延迟500毫秒进行查询
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery()
|
||||
}, 500)
|
||||
hmiAction("车辆图像上传行云大模型, ", isChecked)
|
||||
clickEventAnalytics("车辆图像上传行云大模型", isChecked)
|
||||
return true
|
||||
}
|
||||
//NDE(数据上车)下行
|
||||
NDE_DOWNWARD_SWITCH->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.ndeDownwardSwitch = isChecked
|
||||
CallerAutoPilotControlManager.sendForceStopOrStartCloudReq(1,2,isChecked)
|
||||
//查询NDE(数据上车)上行设置状态,设置完成后延迟500毫秒进行查询
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendCloudConfigRequest()
|
||||
}, 500)
|
||||
hmiAction("NDE(数据上车)下行, ", isChecked)
|
||||
clickEventAnalytics("NDE(数据上车)下行", isChecked)
|
||||
if(isChecked){
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_EVENT_DATA_TO_PNC)?.also { changeValue(it, FunctionBuildConfig.ndeEventDataToPnc) }//事件数据进PNC应用
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_PERCEPTION_DATA_TO_PNC)?.also { changeValue(it, FunctionBuildConfig.ndePerceptionDataToPnc) }//感知数据进PNC应用
|
||||
}else{
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_EVENT_DATA_TO_PNC)?.also { changeValue(it, false) }//事件数据进PNC应用
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_PERCEPTION_DATA_TO_PNC)?.also { changeValue(it, false) }//感知数据进PNC应用
|
||||
//关闭事件数据进PNC应用
|
||||
CallerAutoPilotControlManager.sendNdeDownEventToPnc(0)
|
||||
//查询事件数据进PNC应用
|
||||
// UiThreadHandler.postDelayed({
|
||||
// CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.V2N_TO_PNC)
|
||||
// }, 500)
|
||||
//关闭感知数据进PNC应用
|
||||
CallerAutoPilotControlManager.sendNdeDownPerceptionToPnc(0)
|
||||
//查询感知数据进PNC应用
|
||||
// UiThreadHandler.postDelayed({
|
||||
// CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.PERCEPTION_TO_PNC)
|
||||
// }, 500)
|
||||
}
|
||||
return true
|
||||
}
|
||||
KEY_V2N_TOTAL_SWITCH -> {
|
||||
//事件数据进PNC应用
|
||||
NDE_EVENT_DATA_TO_PNC->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.v2nTotalSwitch = isChecked
|
||||
hmiAction("V2N总开关, ", isChecked)
|
||||
clickEventAnalytics("V2N总开关", isChecked)
|
||||
if (!isChecked) { // preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_NEW_LINKED)?.also { changeValue(it, false) }
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_NEW_LINKED_TO_PNC)?.also { changeValue(it, false) }
|
||||
FunctionBuildConfig.ndeEventDataToPnc = isChecked
|
||||
if(isChecked){
|
||||
CallerAutoPilotControlManager.sendNdeDownEventToPnc(1)
|
||||
}else{
|
||||
CallerAutoPilotControlManager.sendNdeDownEventToPnc(0)
|
||||
}
|
||||
val map = HashMap<String, Boolean>().also {
|
||||
it["f1"] = isChecked
|
||||
}
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, toJson(map).toByteArray())
|
||||
//查询事件数据进PNC应用
|
||||
// UiThreadHandler.postDelayed({
|
||||
// CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.V2N_TO_PNC)
|
||||
// }, 500)
|
||||
hmiAction("事件数据进PNC应用, ", isChecked)
|
||||
clickEventAnalytics("事件数据进PNC应用", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_V2N_NEW_LINKED_TO_PNC -> {
|
||||
//感知数据进PNC应用
|
||||
NDE_PERCEPTION_DATA_TO_PNC->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.v2nNewLinkedToPNC = isChecked
|
||||
clickEventAnalytics("V2N场景进PNC", isChecked)
|
||||
hmiAction("V2N场景进PNC, ", isChecked)
|
||||
CallerAutoPilotControlManager.sendV2nToPncCmd(isChecked)
|
||||
FunctionBuildConfig.ndePerceptionDataToPnc = isChecked
|
||||
if(isChecked){
|
||||
CallerAutoPilotControlManager.sendNdeDownPerceptionToPnc(1)
|
||||
}else{
|
||||
CallerAutoPilotControlManager.sendNdeDownPerceptionToPnc(0)
|
||||
}
|
||||
//查询感知数据进PNC应用
|
||||
// UiThreadHandler.postDelayed({
|
||||
// CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.PERCEPTION_TO_PNC)
|
||||
// }, 500)
|
||||
hmiAction("感知数据进PNC应用, ", isChecked)
|
||||
clickEventAnalytics("感知数据进PNC应用", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_V2I_TOTAL_SWITCH -> {
|
||||
//云控基础平台上行
|
||||
CLOUD_CONTROL_UPWARD->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
HmiBuildConfig.v2iTotalSwitch = isChecked
|
||||
hmiAction("V2I总开关, ", isChecked)
|
||||
FunctionBuildConfig.cloudControlUpward = isChecked
|
||||
CallerAutoPilotControlManager.sendForceStopOrStartCloudReq(2,1,isChecked)
|
||||
//查询云控基础平台上行状态
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendCloudConfigRequest()
|
||||
}, 500)
|
||||
hmiAction("云控基础平台上行, ", isChecked)
|
||||
clickEventAnalytics("云控基础平台上行", isChecked)
|
||||
return true
|
||||
}
|
||||
//云控基础平台下行
|
||||
CLOUD_CONTROL_DOWNWARD->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.cloudControlDownward = isChecked
|
||||
CallerAutoPilotControlManager.sendForceStopOrStartCloudReq(2,2,isChecked)
|
||||
//查询云控基础平台下行状态
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendCloudConfigRequest()
|
||||
}, 500)
|
||||
hmiAction("云控基础平台下行, ", isChecked)
|
||||
clickEventAnalytics("云控基础平台下行", isChecked)
|
||||
return true
|
||||
}
|
||||
//OBU上报(V2I、V2V上行)
|
||||
OBU_UPWARD_SWITCH->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.obuUpwardSwitch = isChecked
|
||||
//域控上报OBU开关控制
|
||||
if(isChecked){
|
||||
CallerAutoPilotControlManager.sendSetObuUploadReq(1)
|
||||
}else{
|
||||
CallerAutoPilotControlManager.sendSetObuUploadReq(0)
|
||||
}
|
||||
//域控上报OBU开关状态查询,设置完成后延迟500毫秒进行查询
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendObuUploadStatusQuery()
|
||||
}, 500)
|
||||
hmiAction("OBU上报(V2I、V2V上行), ", isChecked)
|
||||
clickEventAnalytics("OBU上报(V2I、V2V上行)", isChecked)
|
||||
return true
|
||||
}
|
||||
//V2I下行
|
||||
V2I_DOWNWARD_SWITCH->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.v2iDownwardSwitch = isChecked
|
||||
if (!isChecked) {
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2I_TO_PNC)?.also { changeValue(it, false) }
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2I_RED_LIGHT_WARNING)?.also { changeValue(it, false) }
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2I_WEAKNESS_TRAFFIC)?.also { changeValue(it, false) }
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(V2I_WEAK_TRAFFIC_PARTICIPANT)?.also { changeValue(it, false) }
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(V2I_PERCEPTION_DATA_TO_PNC)?.also { changeValue(it, false) }
|
||||
//关闭弱势交通参与者
|
||||
FunctionBuildConfig.v2iWeakTrafficParticipant = false
|
||||
//关闭感知数据进PNC应用
|
||||
FunctionBuildConfig.v2iPerceptionDataToPnc = false
|
||||
CallerAutoPilotControlManager.sendV2iDownPerceptionToPnc(0)
|
||||
//查询V2I下行感知进PNC开关状态
|
||||
// UiThreadHandler.postDelayed({
|
||||
// CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.V2I_TO_PNC)
|
||||
// }, 500)
|
||||
}
|
||||
clickEventAnalytics("V2I总开关", isChecked)
|
||||
hmiAction("V2I下行, ", isChecked)
|
||||
clickEventAnalytics("V2I下行", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_V2I_TO_PNC -> {
|
||||
//弱势交通参与者
|
||||
V2I_WEAK_TRAFFIC_PARTICIPANT->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.v2iToPNC = isChecked
|
||||
// FunctionBuildConfig.isFusionColor = isChecked //6.6.2版本基于运营需求-产品设计-v2i进pnc,感知目标颜色替换
|
||||
FunctionBuildConfig.fusionMode = 2
|
||||
CallerAutoPilotControlManager.sendFusionMode(2)
|
||||
CallerAutoPilotControlManager.setFusionColor(isChecked)
|
||||
CallerHmiViewControlListenerManager.invokeFuncMode(IViewControlListener.FUNC_FUSION_COLOR,isChecked)
|
||||
CallerAutoPilotControlManager.sendV2iToPncCmd(isChecked)
|
||||
hmiAction("V2I场景进PNC, ", isChecked)
|
||||
clickEventAnalytics("V2I场景进PNC", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_V2I_RED_LIGHT_WARNING -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
HmiBuildConfig.v2iRedLightWarning = isChecked
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, (if (isChecked) "1" else "0").toByteArray())
|
||||
clickEventAnalytics("V2I闯红灯预警", isChecked)
|
||||
hmiAction("V2I闯红灯预警, ", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_V2I_WEAKNESS_TRAFFIC -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
HmiBuildConfig.v2iWeaknessTraffic = isChecked
|
||||
FunctionBuildConfig.v2iWeakTrafficParticipant = isChecked
|
||||
clickEventAnalytics("V2I弱势交通参与者", isChecked)
|
||||
hmiAction("V2I弱势交通参与者, ", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_V2V_TOTAL_SWITCH -> {
|
||||
//感知数据进PNC应用
|
||||
V2I_PERCEPTION_DATA_TO_PNC->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
HmiBuildConfig.v2vTotalSwitch = isChecked
|
||||
clickEventAnalytics("V2V总开关", isChecked)
|
||||
hmiAction("V2V总开关, ", isChecked)
|
||||
FunctionBuildConfig.v2iPerceptionDataToPnc = isChecked
|
||||
//V2I下行感知进PNC开关
|
||||
if(isChecked){
|
||||
CallerAutoPilotControlManager.sendV2iDownPerceptionToPnc(1)
|
||||
}else{
|
||||
CallerAutoPilotControlManager.sendV2iDownPerceptionToPnc(0)
|
||||
}
|
||||
//查询V2I下行感知进PNC开关状态
|
||||
// UiThreadHandler.postDelayed({
|
||||
// CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.V2I_TO_PNC)
|
||||
// }, 500)
|
||||
hmiAction("感知数据进PNC应用, ", isChecked)
|
||||
clickEventAnalytics("感知数据进PNC应用", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_OBU_TOTAL_SWITCH -> {
|
||||
//V2V下行
|
||||
V2V_DOWNWARD_SWITCH->{
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (!isChecked) {
|
||||
CallerObuApiManager.disConnectObu() // 断开OBU连接
|
||||
} else {
|
||||
val isObuConnected = CallerObuApiManager.isConnected()
|
||||
if (isObuConnected) {
|
||||
CallerObuApiManager.resetObuIpAddress(MogoObuConst.OBU_DEFAULT_IP)
|
||||
}
|
||||
}
|
||||
clickEventAnalytics("OBU控制总开关", isChecked)
|
||||
hmiAction("OBU控制总开关, ", isChecked)
|
||||
FunctionBuildConfig.v2vDownwardSwitch = isChecked
|
||||
hmiAction("V2V下行, ", isChecked)
|
||||
clickEventAnalytics("V2V下行", isChecked)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return super.onPreferenceChange(preference, newValue)
|
||||
}
|
||||
|
||||
/**
|
||||
* 云端配置查询响应
|
||||
* @param config 数据
|
||||
*/
|
||||
override fun onCloudConfig(config: MessagePad.CloudConfig) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
//云连接地址
|
||||
config.addrsList.forEach {
|
||||
when(it.type){
|
||||
//蘑菇云,暂时用不到
|
||||
0->{
|
||||
|
||||
}
|
||||
//NDE云
|
||||
1->{
|
||||
when(it.direction){
|
||||
//上行和下行
|
||||
0->{
|
||||
FunctionBuildConfig.ndeUpwardSwitch = it.enable
|
||||
FunctionBuildConfig.ndeDownwardSwitch = it.enable
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_UPWARD_SWITCH)?.also { changeValue(it, FunctionBuildConfig.ndeUpwardSwitch) }
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_DOWNWARD_SWITCH)?.also { changeValue(it, FunctionBuildConfig.ndeDownwardSwitch) }
|
||||
}
|
||||
//上行
|
||||
1->{
|
||||
FunctionBuildConfig.ndeUpwardSwitch = it.enable
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_UPWARD_SWITCH)?.also { changeValue(it, FunctionBuildConfig.ndeUpwardSwitch) }
|
||||
}
|
||||
//下行
|
||||
2->{
|
||||
FunctionBuildConfig.ndeDownwardSwitch = it.enable
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_DOWNWARD_SWITCH)?.also { changeValue(it, FunctionBuildConfig.ndeDownwardSwitch) }
|
||||
}
|
||||
}
|
||||
}
|
||||
//基础平台云
|
||||
2->{
|
||||
when(it.direction){
|
||||
//上行和下行
|
||||
0->{
|
||||
FunctionBuildConfig.cloudControlUpward = it.enable
|
||||
FunctionBuildConfig.cloudControlDownward = it.enable
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(CLOUD_CONTROL_UPWARD)?.also { changeValue(it, FunctionBuildConfig.cloudControlUpward) }
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(CLOUD_CONTROL_DOWNWARD)?.also { changeValue(it, FunctionBuildConfig.cloudControlDownward) }
|
||||
}
|
||||
//上行
|
||||
1->{
|
||||
FunctionBuildConfig.cloudControlUpward = it.enable
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(CLOUD_CONTROL_UPWARD)?.also { changeValue(it, FunctionBuildConfig.cloudControlUpward) }
|
||||
}
|
||||
//下行
|
||||
2->{
|
||||
FunctionBuildConfig.cloudControlDownward = it.enable
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(CLOUD_CONTROL_DOWNWARD)?.also { changeValue(it, FunctionBuildConfig.cloudControlDownward) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询摄像头上传NDE云状态返回
|
||||
*/
|
||||
override fun onImgUploadCloudStatusResp(resp: MessagePad.ImgUploadCloudStatusResp) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(IMAGE_UPLOAD_SWITCH)?.also { changeValue(it, resp.enable) }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询 NDE下行事件数据进pnc 与 V2I下行感知数据进pnc 与 NDE下行感知数据进pnc参数获取应答
|
||||
* @param getParamResp 配置参数
|
||||
* @param adasParam 解析后的配置参数
|
||||
*/
|
||||
override fun onGetParamResp(getParamResp: MessagePad.SetParamReq, adasParam: AdasParam) {
|
||||
// ThreadUtils.runOnUiThread {
|
||||
// //融合v2n开关 NDE下行事件数据进pnc
|
||||
// preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_EVENT_DATA_TO_PNC)?.also { changeValue(it,adasParam.v2nToPnc==1) }
|
||||
// //融合v2i开关 V2I下行感知数据进pnc
|
||||
// preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(V2I_PERCEPTION_DATA_TO_PNC)?.also { changeValue(it,adasParam.v2iToPnc==1) }
|
||||
// //NDE下行感知数据进pnc
|
||||
// preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(NDE_PERCEPTION_DATA_TO_PNC)?.also { changeValue(it,adasParam.perceptionToPnc==1) }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 域控上报OBU开关状态响应
|
||||
* @param enable 数据
|
||||
*/
|
||||
override fun onObuUploadStatus(enable: MessagePad.SetEnableReq) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(OBU_UPWARD_SWITCH)?.also { changeValue(it, enable.enable==1) }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DemoPreferenceFragmentCompat : OperatePanelDetailBase(), IViewControlListener {
|
||||
@@ -1072,8 +1316,8 @@ class OperatePanelLayout : LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
class VehiclesPreferenceFragmentCompat : OperatePanelDetailBase(), IMoGoAutopilotCarConfigListener, ISopSettingListener, IViewControlListener, IMoGoGetParamResponseListener,
|
||||
IImgUploadCloudListener {
|
||||
class VehiclesPreferenceFragmentCompat : OperatePanelDetailBase(), IMoGoAutopilotCarConfigListener,
|
||||
ISopSettingListener, IViewControlListener, IMoGoGetParamResponseListener{
|
||||
companion object {
|
||||
private const val TAG = "VehiclesPreferenceFragmentCompat"
|
||||
private const val KEY_PNC_PARK_INTERSECTION_CAR = "pnc_park_intersection_car"
|
||||
@@ -1083,7 +1327,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
private const val KEY_FAULT_DECELERATION_PARK = "fault_deceleration_park"
|
||||
private const val KEY_WEAK_NET_DECELERATION_PARK = "weak_net_deceleration_park"
|
||||
private const val KEY_EXAM_FUNCTION_PANEL = "exam_function_panel"
|
||||
private const val KEY_IMAGE_UPLOAD = "image_upload"
|
||||
private const val KEY_ALL_MERGE_MODE = "all_merge_mode"
|
||||
private const val KEY_BLIND_AREA_MODE = "blind_area_mode"
|
||||
private const val KEY_BEYOND_VISUAL_RANGE_MODE = "beyond_visual_range_mode"
|
||||
@@ -1102,13 +1345,11 @@ class OperatePanelLayout : LinearLayout {
|
||||
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
||||
CallerSopSettingManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(TAG, this)
|
||||
CallerImgUploadCloudManager.addListener(TAG, this)
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
Logger.d(TAG, "--- onCreateView --- 2 ---") //获取车辆配置
|
||||
CallerAutoPilotControlManager.getCarConfig() //查询融合模式
|
||||
CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.FUSION_MODE)
|
||||
CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.OVERTAKE_MAX_SPEED)
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery()
|
||||
}
|
||||
return super.onCreateView(inflater, container, savedInstanceState)
|
||||
}
|
||||
@@ -1118,7 +1359,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
CallerAutopilotCarConfigListenerManager.removeListener(TAG)
|
||||
CallerSopSettingManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerImgUploadCloudManager.removeListener(TAG)
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
@@ -1256,9 +1496,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
KEY_RAIN_DAY -> {
|
||||
return FunctionBuildConfig.isRainMode
|
||||
}
|
||||
KEY_IMAGE_UPLOAD -> {
|
||||
return FunctionBuildConfig.isImageUpload
|
||||
}
|
||||
KEY_WEAK_NET_DECELERATION_PARK -> {
|
||||
return FunctionBuildConfig.isWeakNetSlowDown
|
||||
}
|
||||
@@ -1315,7 +1552,9 @@ class OperatePanelLayout : LinearLayout {
|
||||
return true
|
||||
}
|
||||
KEY_CHANGE_LANE_SPEED_THRESHOLDS -> {
|
||||
FunctionBuildConfig.detouringSpeed = preference.extras.getDouble(PreferenceWithSpeedSetting.KEY_BUNDLE_CURRENT_VALUE, FunctionBuildConfig.detouringSpeed.toDouble())
|
||||
FunctionBuildConfig.detouringSpeed = preference.extras.getDouble(PreferenceWithSpeedSetting.KEY_BUNDLE_CURRENT_VALUE,
|
||||
FunctionBuildConfig.detouringSpeed
|
||||
)
|
||||
hmiAction("SOP 变道绕障的目标障碍物速度阈值", FunctionBuildConfig.detouringSpeed)
|
||||
val isSuccess = CallerAutoPilotControlManager.sendDetouringSpeed(FunctionBuildConfig.detouringSpeed)
|
||||
if (isSuccess == true) {
|
||||
@@ -1408,19 +1647,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
clickEventAnalytics("考试功能面板", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_IMAGE_UPLOAD -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.isImageUpload = isChecked
|
||||
//域控摄像头上传NDE云开关命令
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudEnable(isChecked)
|
||||
//查询域控摄像头上传NDE云开关状态查询,设置完成后延迟500毫秒进行查询
|
||||
UiThreadHandler.postDelayed({
|
||||
CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery()
|
||||
}, 500)
|
||||
hmiAction("SOP 车辆图像上传行云大模型, ", isChecked)
|
||||
clickEventAnalytics("车辆图像上传行云大模型", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_ALL_MERGE_MODE -> {
|
||||
if (preference.extras.containsKey("is_checked")) {
|
||||
preference.extras.remove("is_checked")
|
||||
@@ -1525,12 +1751,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
return super.onPreferenceChange(preference, newValue)
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询摄像头上传NDE云状态返回
|
||||
*/
|
||||
override fun onImgUploadCloudStatusResp(resp: MessagePad.ImgUploadCloudStatusResp) {
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_IMAGE_UPLOAD)?.also { changeValue(it, resp.enable) }
|
||||
}
|
||||
}
|
||||
|
||||
class WelcomeWordsPreferenceCompat : OperatePanelDetailBase() {
|
||||
|
||||
@@ -14,6 +14,7 @@ import android.os.Process
|
||||
import android.text.Html
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@@ -25,7 +26,6 @@ import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.MenuCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import com.mogo.cloud.network.cronet.NetworkQualityListener
|
||||
@@ -102,6 +102,7 @@ import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.ShowDevicesManagerStateDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog
|
||||
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
@@ -122,7 +123,7 @@ import com.mogo.eagle.core.utilcode.util.DeviceUtils
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SPUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ScreenUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
@@ -140,16 +141,23 @@ import com.mogo.support.device.DevicesManager
|
||||
import com.mogo.support.device.IBindStateChangeListener
|
||||
import com.mogo.tts.base.IMogoTTSCallback
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo_core_function_devatools.rviz.common.config.SSHAccountConfig
|
||||
import com.zhjt.mogo_core_function_devatools.rviz.dialog.ChangeDefaultConfigDialog
|
||||
import com.zhjt.mogo_core_function_devatools.rviz.ui.activity.AutopilotCheckAct
|
||||
import com.zhjt.mogo_core_function_devatools.rviz.ui.activity.FmdAct
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.appVersionInfoLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.brakeThresholdDivider
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btChangeEnv
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnAppReboot
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnAutoCheck
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnBrakeThreshold
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnConnectServerIp
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDeleteDB
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDisconnectIpc
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDrawFusion
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnEnsureMap
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnFmd
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnHdVisualAdjust
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnIpcReboot
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnPointCloudColor
|
||||
@@ -188,6 +196,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.changesight_top_bt
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.clDebugContain
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.commonLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.controlCenterLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.debugCenterLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.deviceBindLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.domainControllerLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.eagleEyeControllerLayout
|
||||
@@ -197,6 +206,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.etInputBrakeThresh
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etInputRecordBagTime
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etInputRecordTime
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etLogCatch
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etMapShowName
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etObuIP
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etPointCloudColor
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etPointCloudSize
|
||||
@@ -225,6 +235,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.tbChangeCurrentSki
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbControlCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbControlPassengerDriverMonitor
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbCronet
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbDebugCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbDeviceBind
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbDomainController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbDrawPointCloudData
|
||||
@@ -247,6 +258,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.tbObuLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbObuWarningFusionUnion
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbOpenAcceleration
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbOpenSnBinding
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbParking
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbParrallelDriveViewShowControl
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbReportMore
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbReportWarning
|
||||
@@ -255,6 +267,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.tbSelfLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbStartAutopilotCommand
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbStatusCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbTTSCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbTileFileLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbTraceEnable
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbVehicleStateController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.trackerIPCProvider
|
||||
@@ -337,10 +350,6 @@ import kotlin.collections.component4
|
||||
import kotlin.collections.set
|
||||
import kotlin.math.abs
|
||||
import kotlin.system.exitProcess
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.ShowDevicesManagerStateDialog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnEnsureMap
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etMapShowName
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbTileFileLog
|
||||
|
||||
|
||||
/**
|
||||
@@ -601,13 +610,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
//动态配置鹰眼显示MAP版本
|
||||
if(AppConfigInfo.mapShowName.isEmpty()){
|
||||
AppConfigInfo.mapShowName = CallerAutoPilotStatusListenerManager.getDockerVersion()+""
|
||||
}
|
||||
etMapShowName.setText(AppConfigInfo.mapShowName)
|
||||
etMapShowName.text?.let { etMapShowName.setSelection(it.length) }
|
||||
btnEnsureMap.setOnClickListener {
|
||||
AppConfigInfo.mapShowName = etMapShowName.text.toString()
|
||||
SPUtils.getInstance().put("mapShowName", AppConfigInfo.mapShowName)
|
||||
tvIpcVersionInfo.text = "MAP:${AppConfigInfo.mapShowName}"
|
||||
tvIpcVersionInfoKey.text = "MAP:${AppConfigInfo.mapShowName}"
|
||||
CallerMapShowNameManager.invokeMapShowName(AppConfigInfo.mapShowName)
|
||||
@@ -803,6 +810,41 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调试中心
|
||||
*/
|
||||
tbDebugCenter.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (isChecked) {
|
||||
buttonView.setCompoundDrawables(null, null, iconDown, null)
|
||||
//展示调试中心
|
||||
debugCenterLayout.visibility = View.VISIBLE
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
//隐藏日志中心
|
||||
debugCenterLayout.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 故障诊断
|
||||
*/
|
||||
btnFmd.onClick{
|
||||
ActivityUtils.startActivity(FmdAct::class.java)
|
||||
}
|
||||
/**
|
||||
* 故障诊断 长按设置
|
||||
*/
|
||||
btnFmd.setOnLongClickListener {
|
||||
ChangeDefaultConfigDialog(ActivityUtils.getTopActivity()).show()
|
||||
true
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶检测
|
||||
*/
|
||||
btnAutoCheck.onClick {
|
||||
ActivityUtils.startActivity(AutopilotCheckAct::class.java)
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志中心
|
||||
*/
|
||||
@@ -1066,6 +1108,13 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
})
|
||||
}
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbParking.visibility = View.VISIBLE
|
||||
tbParking.isChecked = FunctionBuildConfig.isParkingOpen
|
||||
tbParking.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isParkingOpen = isChecked
|
||||
}
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
btnIpcReboot.onClick {
|
||||
@@ -1526,13 +1575,17 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
*/
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setDomainControllerCheckedChangeListener() {
|
||||
etAutopilotIP.setText("192.168.1.")
|
||||
val string = SharedPrefsMgr.getInstance()
|
||||
.getString(SharedPrefsConstants.inputIpDomainController, "192.168.1.")
|
||||
etAutopilotIP.setText(string)
|
||||
etAutopilotIP.text?.let { etAutopilotIP.setSelection(it.length) }
|
||||
//设置工控机IP
|
||||
btnSetAutopilotIP.setOnClickListener {
|
||||
val autoPilotIp = etAutopilotIP.text.toString()
|
||||
if (autoPilotIp.isNotEmpty()) {
|
||||
SSHAccountConfig.setRosMasterIp(autoPilotIp.split(":", ":").first())
|
||||
CallerAutoPilotControlManager.resetIpAddress(autoPilotIp)
|
||||
SharedPrefsMgr.getInstance().putString(SharedPrefsConstants.inputIpDomainController,autoPilotIp)
|
||||
} else {
|
||||
ToastUtils.showShort("请输入正确的IP地址")
|
||||
}
|
||||
|
||||
@@ -155,8 +155,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
scV2ISwitch.isChecked = HmiBuildConfig.v2iTotalSwitch
|
||||
hmiAction("SOP V2I总开关, ", HmiBuildConfig.v2iTotalSwitch)
|
||||
//V2V总开关
|
||||
scObuV2vView.isChecked = HmiBuildConfig.v2vTotalSwitch
|
||||
hmiAction("SOP V2V总开关, ", HmiBuildConfig.v2vTotalSwitch)
|
||||
scObuV2vView.isChecked = FunctionBuildConfig.v2vDownwardSwitch
|
||||
hmiAction("SOP V2V总开关, ", FunctionBuildConfig.v2vDownwardSwitch)
|
||||
//obu总开关
|
||||
scObu.isChecked = obuConnectStatus
|
||||
hmiAction("SOP obu总开关, ", obuConnectStatus)
|
||||
@@ -264,8 +264,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
"1".toByteArray()
|
||||
)
|
||||
//路侧弱势交通参与者
|
||||
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.v2iWeaknessTraffic
|
||||
hmiAction("SOP obu弱势交通控制, ", HmiBuildConfig.v2iWeaknessTraffic)
|
||||
scObuWeaknessTrafficSop.isChecked = FunctionBuildConfig.v2iWeakTrafficParticipant
|
||||
hmiAction("SOP obu弱势交通控制, ", FunctionBuildConfig.v2iWeakTrafficParticipant)
|
||||
} else {
|
||||
//V2I场景进PNC
|
||||
scV2iPnc.isChecked = false
|
||||
@@ -382,25 +382,25 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
//路侧弱势交通参与者(默认开启)
|
||||
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.v2iWeaknessTraffic
|
||||
scObuWeaknessTrafficSop.isChecked = FunctionBuildConfig.v2iWeakTrafficParticipant
|
||||
scObuWeaknessTrafficSop.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if (!compoundButton.isPressed) {
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
clickEventAnalytics("路侧弱势交通参与者",isChecked)
|
||||
hmiAction("SOP obu弱势交通控制, ", isChecked)
|
||||
HmiBuildConfig.v2iWeaknessTraffic = isChecked
|
||||
FunctionBuildConfig.v2iWeakTrafficParticipant = isChecked
|
||||
}
|
||||
|
||||
//V2V总开关(默认关闭)
|
||||
scObuV2vView.isChecked = HmiBuildConfig.v2vTotalSwitch
|
||||
scObuV2vView.isChecked = FunctionBuildConfig.v2vDownwardSwitch
|
||||
scObuV2vView.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if (!compoundButton.isPressed) {
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
clickEventAnalytics("V2V总开关",isChecked)
|
||||
hmiAction("SOP obuV2V开关, ", isChecked)
|
||||
HmiBuildConfig.v2vTotalSwitch = isChecked
|
||||
FunctionBuildConfig.v2vDownwardSwitch = isChecked
|
||||
}
|
||||
|
||||
//obu总开关
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import kotlinx.android.synthetic.main.dialog_ota_power_off_finish.tvPowerOffClose
|
||||
|
||||
/**
|
||||
* OTA升级完成且优雅停服完成、需要车辆下电的时候车端告知鹰眼,
|
||||
* 司机屏弹窗提示用车人执行车辆下电操作
|
||||
*/
|
||||
class OTAPowerOffFinishDialog(context: Context) :
|
||||
BaseFloatDialog(context,TAG), LifecycleObserver {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "OTAPowerOffFinishDialog"
|
||||
}
|
||||
|
||||
init{
|
||||
setContentView(R.layout.dialog_ota_power_off_finish)
|
||||
setCanceledOnTouchOutside(false)
|
||||
tvPowerOffClose.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
fun speakTTS(){
|
||||
//语音提示下电重启
|
||||
AIAssist.getInstance(context).speakTTSVoice("优雅停服完成,请操作车辆下电重启")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.zhjt.mogo_core_function_devatools.ota.OTAUpgradeConfig
|
||||
import kotlinx.android.synthetic.main.dialog_ota_upgrade.tvUpgradeContent
|
||||
import kotlinx.android.synthetic.main.dialog_ota_upgrade.tv_upgrade_later
|
||||
import kotlinx.android.synthetic.main.dialog_ota_upgrade.tv_upgrade_now
|
||||
import system_master.SsmInfo
|
||||
@@ -79,6 +80,12 @@ class OTAUpgradeDialog(context: Context) :
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
fun showUpgradeContent(content: String){
|
||||
if(content.isNotEmpty()){
|
||||
tvUpgradeContent.text = content
|
||||
}
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
//立即升级
|
||||
fun upgradeNow()
|
||||
|
||||
@@ -11,6 +11,8 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.mogo.eagle.core.utilcode.util.ResourceUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinSecondFormat
|
||||
import kotlinx.android.synthetic.main.dialog_ota_upgrade_result.ivUpgradeResult
|
||||
import kotlinx.android.synthetic.main.dialog_ota_upgrade_result.tvResultClose
|
||||
import kotlinx.android.synthetic.main.dialog_ota_upgrade_result.tvResultContent
|
||||
@@ -43,16 +45,18 @@ class OTAUpgradeResultDialog(context: Context) :
|
||||
//升级成功
|
||||
ivUpgradeResult.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_ota_upgrade_success))
|
||||
tvResultContent.text = context.resources.getString(R.string.ota_result_success)
|
||||
tvResultTip.text = context.resources.getString(R.string.ota_result_success_tip)
|
||||
tvResultTip.text =
|
||||
String.format(context.resources.getString(R.string.ota_result_success_tip),
|
||||
TimeUtils.millis2String(System.currentTimeMillis()+60000,getHourMinSecondFormat()))
|
||||
//消息盒子和语音提示升级成功结果
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OTA,
|
||||
OTAMsg(
|
||||
"成功", "车辆部署任务执行结果", "车辆部署任务执行成功,请重启车辆")
|
||||
"成功", "车辆部署任务执行结果", "任务下载完成,一分钟后操作车辆下电重启")
|
||||
)
|
||||
)
|
||||
AIAssist.getInstance(context).speakTTSVoice("车辆部署任务执行成功,请重启车辆")
|
||||
AIAssist.getInstance(context).speakTTSVoice("任务下载完成,一分钟后操作车辆下电重启")
|
||||
}else{
|
||||
//升级失败
|
||||
ivUpgradeResult.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_ota_upgrade_fail))
|
||||
|
||||
@@ -37,6 +37,17 @@ class OTADownloadStatusAdapter(private val context: Context): RecyclerView.Adapt
|
||||
holder.tvDownloadProgress.text = "部署中"
|
||||
}
|
||||
holder.pbDownloadProgress.progress = (otaUpgradeInfo.cur_size*100/otaUpgradeInfo.total_size).toInt()
|
||||
if(otaUpgradeInfo.left_time <= 0){
|
||||
holder.tvDownloadTime.visibility = View.INVISIBLE
|
||||
}else{
|
||||
holder.tvDownloadTime.visibility = View.VISIBLE
|
||||
val upgradeTime = if(otaUpgradeInfo.left_time > 60){
|
||||
"剩余${otaUpgradeInfo.left_time/60}分钟${otaUpgradeInfo.left_time%60}秒"
|
||||
}else{
|
||||
"剩余${otaUpgradeInfo.left_time%60}秒"
|
||||
}
|
||||
holder.tvDownloadTime.text = upgradeTime
|
||||
}
|
||||
// 0:默认(未开始), 1:下载中, 2:下载完成, 3:升级完成, 4:升级失败
|
||||
// holder.tvDownloadStatus.text = when (otaUpgradeInfo.status) {
|
||||
// 1 -> {
|
||||
@@ -64,6 +75,7 @@ class OTADownloadStatusAdapter(private val context: Context): RecyclerView.Adapt
|
||||
var tvProductName: TextView = itemView.findViewById(R.id.tvProductName)
|
||||
var tvDownloadProgress: TextView = itemView.findViewById(R.id.tvDownloadProgress)
|
||||
var pbDownloadProgress: ProgressBar = itemView.findViewById(R.id.pbDownloadProgress)
|
||||
var tvDownloadTime: TextView = itemView.findViewById(R.id.tvDownloadTime)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -75,8 +75,8 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
|
||||
private val isB2 by lazy {
|
||||
AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)
|
||||
private val isB1 by lazy {
|
||||
AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
|
||||
private var currentEventUUID: String = ""
|
||||
@@ -93,8 +93,8 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
|
||||
private fun initView() {
|
||||
if (isPassengerScreen) {
|
||||
if (isB2) {
|
||||
setB2PassengerScreenView()
|
||||
if (isB1) {
|
||||
setTaxiPassengerScreenView()
|
||||
} else {
|
||||
setTaxiPassengerScreenView()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.SweepGradient;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils;
|
||||
|
||||
/**
|
||||
* 融合红绿灯红、黄、绿时间占比示意View
|
||||
* 鹰眼6.5.0需求
|
||||
*/
|
||||
public class ProportionChartTwoView extends View {
|
||||
|
||||
private static final int DEFAULT_RING_WIDTH = 5;
|
||||
private float mRingWidth = 0;
|
||||
private Paint mRingPaint;
|
||||
private RectF mRectF;
|
||||
//红绿灯绿灯、黄灯、红灯灯色时间
|
||||
private List<Integer> proportionList = new ArrayList<>();
|
||||
//红绿灯灯态
|
||||
private List<TrafficLightEnum> lightStatusList = new ArrayList<>();
|
||||
|
||||
//一轮灯态的总时长
|
||||
private int totalDuration = 0;
|
||||
|
||||
int[] greenColorArray = new int[]{Color.parseColor("#45E041"),Color.parseColor("#45E041")};
|
||||
int[] yellowColorArray = new int[]{Color.parseColor("#FFF000"),Color.parseColor("#FFF000")};
|
||||
int[] redColorArray = new int[]{Color.parseColor("#FF4E41"),Color.parseColor("#FF4E41")};
|
||||
|
||||
public ProportionChartTwoView(Context context) {
|
||||
super(context);
|
||||
initSize(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public ProportionChartTwoView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initAttr(context, attrs);
|
||||
initSize(context);
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新红绿灯时间
|
||||
* @param durationList 时间列表
|
||||
* @param colorList 灯态列表
|
||||
*/
|
||||
public void updateProportion(List<Integer> durationList, List<TrafficLightEnum> colorList){
|
||||
if(durationList != null && colorList != null){
|
||||
this.proportionList = durationList;
|
||||
totalDuration = 0;
|
||||
for(int element: proportionList){
|
||||
totalDuration += element;
|
||||
}
|
||||
this.lightStatusList = colorList;
|
||||
postInvalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public ProportionChartTwoView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initAttr(context, attrs);
|
||||
initSize(context);
|
||||
init();
|
||||
}
|
||||
|
||||
private void initAttr(Context context, AttributeSet attrs){
|
||||
if (attrs == null) {
|
||||
return;
|
||||
}
|
||||
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.ProportionChartTwoView);
|
||||
int n = array.getIndexCount();
|
||||
for (int i = 0; i < n; i++) {
|
||||
int attr = array.getIndex(i);
|
||||
if (attr == R.styleable.ProportionChartTwoView_chartRingWidth) {
|
||||
mRingWidth = array.getDimension(attr, AutoSizeUtils.dp2px(context, DEFAULT_RING_WIDTH));
|
||||
}
|
||||
}
|
||||
array.recycle();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化Size
|
||||
* @param context 上下文
|
||||
*/
|
||||
private void initSize(Context context){
|
||||
if (mRingWidth == 0) {
|
||||
mRingWidth = AutoSizeUtils.dp2px(context, AutoSizeUtils.dp2px(context, DEFAULT_RING_WIDTH));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化画笔
|
||||
*/
|
||||
private void init(){
|
||||
mRectF = new RectF();
|
||||
mRingPaint = new Paint();
|
||||
//抗锯齿
|
||||
mRingPaint.setAntiAlias(true);
|
||||
//防抖动
|
||||
mRingPaint.setDither(true);
|
||||
//仅描边(圆环)
|
||||
mRingPaint.setStyle(Paint.Style.STROKE);
|
||||
//圆环宽度
|
||||
mRingPaint.setStrokeWidth(mRingWidth);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
int size = Math.max(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(widthMeasureSpec));
|
||||
setMeasuredDimension(size, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
//宽和高分别去掉padding值,取min的一半即圆的半径(这里demo没有用到,可自行做一些其他计算使用)
|
||||
// mRadius = Math.min(w - getPaddingLeft() - getPaddingRight(), h - getPaddingTop() - getPaddingBottom()) / 2f;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
drawRingView(canvas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 画Ring
|
||||
*/
|
||||
private void drawRingView(Canvas canvas){
|
||||
float sweepAngle = 0f;
|
||||
float startAngle = -90f;
|
||||
//矩形坐标
|
||||
mRectF.set(getPaddingLeft() + mRingWidth / 2 , getPaddingTop() + mRingWidth / 2 ,
|
||||
getWidth() - getPaddingRight() - mRingWidth / 2, getHeight() - getPaddingBottom() - mRingWidth / 2 );
|
||||
|
||||
for(int i=0;i<proportionList.size();i++){
|
||||
startAngle += sweepAngle;
|
||||
sweepAngle = 360f*proportionList.get(i)/totalDuration;
|
||||
SweepGradient sweepGradient;
|
||||
//设置渐变颜色
|
||||
if(lightStatusList.get(i) == TrafficLightEnum.GREEN){
|
||||
//设置绿灯渐变色
|
||||
sweepGradient = new SweepGradient(getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f,
|
||||
greenColorArray,null);
|
||||
Matrix rotateMatrix = new Matrix();
|
||||
if(i == 0){
|
||||
rotateMatrix.setRotate(270,getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}else if(i == 1){
|
||||
rotateMatrix.setRotate(270+(360*proportionList.get(0)),getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}else{
|
||||
rotateMatrix.setRotate(270+(360*proportionList.get(0)+proportionList.get(1)),getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}
|
||||
sweepGradient.setLocalMatrix(rotateMatrix);
|
||||
}else if(lightStatusList.get(i) == TrafficLightEnum.YELLOW){
|
||||
//设置黄灯渐变色
|
||||
sweepGradient = new SweepGradient(getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f,
|
||||
yellowColorArray,null);
|
||||
Matrix rotateMatrix = new Matrix();
|
||||
if(i == 0){
|
||||
rotateMatrix.setRotate(270,getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}else if(i == 1){
|
||||
rotateMatrix.setRotate(270+(360*proportionList.get(0)),getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}else{
|
||||
rotateMatrix.setRotate(270+(360*proportionList.get(0)+proportionList.get(1)),getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}
|
||||
sweepGradient.setLocalMatrix(rotateMatrix);
|
||||
}else{
|
||||
//设置红灯渐变色
|
||||
sweepGradient = new SweepGradient(getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f,
|
||||
redColorArray,null);
|
||||
Matrix rotateMatrix = new Matrix();
|
||||
if(i == 0){
|
||||
rotateMatrix.setRotate(270,getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}else if(i == 1){
|
||||
rotateMatrix.setRotate(270+(360*proportionList.get(0)),getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}else{
|
||||
rotateMatrix.setRotate(270+(360*proportionList.get(0)+proportionList.get(1)),getWidth()/2f,(getPaddingTop() + getHeight() - getPaddingBottom())/2f);
|
||||
}
|
||||
sweepGradient.setLocalMatrix(rotateMatrix);
|
||||
}
|
||||
mRingPaint.setShader(sweepGradient);
|
||||
//画圆环
|
||||
canvas.drawArc(mRectF, startAngle, sweepAngle, false, mRingPaint);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,533 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerServicesEventManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
|
||||
/**
|
||||
* 8.1.0 信号灯统一方案
|
||||
*/
|
||||
class TrafficLightView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "TrafficLightView"
|
||||
}
|
||||
|
||||
private var user = 0 //使用方,driver:0 passenger 1
|
||||
|
||||
private lateinit var ivLightStatus: ImageView //灯态
|
||||
private lateinit var pcvLightProportion: ProportionChartTwoView //时长占比示意
|
||||
private lateinit var tvLightRemain: TypefaceTextView //倒计时
|
||||
private lateinit var tvLightSource: TextView //数据来源
|
||||
|
||||
private var totalDuration = 0 //一轮灯态的总时长
|
||||
private var currentAngle = 0f //指针指向角度
|
||||
|
||||
private var currentLightState = TrafficLightEnum.BLACK //当前灯态
|
||||
private var currentLightDuration = 0 //当前灯态倒计时
|
||||
private var previousLightStatus = TrafficLightEnum.BLACK //上一帧灯态
|
||||
private var previousLightDuration = 0 //上一帧灯态倒计时
|
||||
|
||||
private var redLightRoundNum = 0 //当前路口红灯出现的轮数
|
||||
private var greenLightRoundNum = 0 //当前路口绿灯出现的轮数
|
||||
private var yellowLightRoundNum = 0 //当前路口黄灯出现的轮数
|
||||
|
||||
private var isShowLight: Boolean = false
|
||||
|
||||
private var currentSource: Int = -1 //0:融合 1:云控基础平台 2:自车感知
|
||||
|
||||
init {
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.TrafficLightView)
|
||||
user = typedArray.getInt(R.styleable.TrafficLightView_lightUser,0)
|
||||
typedArray.recycle()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
when(user){
|
||||
//司机端
|
||||
0 -> {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_view_traffic_light_driver, this, true)
|
||||
}
|
||||
//乘客端
|
||||
1 -> {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_view_traffic_light_passenger, this, true)
|
||||
}
|
||||
}
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
ivLightStatus = findViewById(R.id.ivLightStatus)
|
||||
pcvLightProportion = findViewById(R.id.pcvLightProportion)
|
||||
tvLightRemain = findViewById(R.id.tvLightRemain)
|
||||
tvLightSource = findViewById(R.id.tvLightSource)
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警展示,并重制灯态
|
||||
*/
|
||||
override fun disableTrafficLight() {
|
||||
super.disableTrafficLight()
|
||||
UiThreadHandler.post{
|
||||
this@TrafficLightView.visibility = GONE
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(View.GONE, TAG)
|
||||
//将灯态轮归零
|
||||
returnToZero()
|
||||
resetLight()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将灯态轮归零
|
||||
*/
|
||||
private fun returnToZero(){
|
||||
redLightRoundNum = 0 //当前路口红灯出现的轮数
|
||||
greenLightRoundNum = 0 //当前路口绿灯出现的轮数
|
||||
yellowLightRoundNum = 0 //当前路口黄灯出现的轮数
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置灯态
|
||||
*/
|
||||
private fun resetLight(){
|
||||
currentLightState = TrafficLightEnum.BLACK
|
||||
currentLightDuration = 0
|
||||
previousLightStatus = TrafficLightEnum.BLACK
|
||||
previousLightDuration = 0
|
||||
currentSource = -1
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否进入新的一轮灯态
|
||||
* @param currentState 当前灯态
|
||||
*/
|
||||
private fun judgeRoundNum(currentState: TrafficLightEnum): Boolean{
|
||||
if(currentLightState == currentState){
|
||||
return false
|
||||
}else{
|
||||
currentLightState = currentState
|
||||
when(currentState){
|
||||
TrafficLightEnum.RED->{
|
||||
redLightRoundNum++
|
||||
return redLightRoundNum > greenLightRoundNum && redLightRoundNum > yellowLightRoundNum
|
||||
}
|
||||
TrafficLightEnum.GREEN->{
|
||||
greenLightRoundNum++
|
||||
return greenLightRoundNum > redLightRoundNum && greenLightRoundNum > yellowLightRoundNum
|
||||
}
|
||||
TrafficLightEnum.YELLOW->{
|
||||
yellowLightRoundNum++
|
||||
return yellowLightRoundNum > redLightRoundNum && yellowLightRoundNum > greenLightRoundNum
|
||||
}
|
||||
TrafficLightEnum.BLACK->{
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知 3:OBU
|
||||
*/
|
||||
override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
super.showTrafficLight(checkLightId, lightSource)
|
||||
UiThreadHandler.post {
|
||||
CallerLogger.d("$M_HMI$TAG","update checkLightId:$checkLightId, lightSource: $lightSource")
|
||||
isShowLight = true
|
||||
// currentLightState = checkLightId
|
||||
updateTrafficLightIcon(checkLightId, lightSource)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param redNum 红灯倒计时
|
||||
* @param yellowNum 黄灯倒计时
|
||||
* @param greenNum 绿灯倒计时
|
||||
*/
|
||||
override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) {
|
||||
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum)
|
||||
UiThreadHandler.post {
|
||||
when (currentLightState) {
|
||||
TrafficLightEnum.RED -> changeCountdownRed(redNum)
|
||||
TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum)
|
||||
TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum)
|
||||
else ->{}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeCountdownRed(redNum: Int) {
|
||||
super.changeCountdownRed(redNum)
|
||||
UiThreadHandler.post {
|
||||
if (redNum > 0) {
|
||||
tvLightRemain.text = redNum.toString()
|
||||
} else {
|
||||
disableTrafficLightCountDown()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeCountdownGreen(greenNum: Int) {
|
||||
super.changeCountdownGreen(greenNum)
|
||||
UiThreadHandler.post {
|
||||
if (greenNum > 0) {
|
||||
tvLightRemain.text = greenNum.toString()
|
||||
} else {
|
||||
disableTrafficLightCountDown()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeCountdownYellow(yellowNum: Int) {
|
||||
super.changeCountdownYellow(yellowNum)
|
||||
UiThreadHandler.post {
|
||||
if (yellowNum > 0) {
|
||||
tvLightRemain.text = yellowNum.toString()
|
||||
} else {
|
||||
disableTrafficLightCountDown()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新红绿灯icon
|
||||
*
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知; 3:OBU
|
||||
*/
|
||||
private fun updateTrafficLightIcon(lightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
if(currentSource == 0 || currentSource == 1){
|
||||
return
|
||||
}
|
||||
if(currentSource == -1){
|
||||
this@TrafficLightView.visibility = View.VISIBLE
|
||||
currentSource = 2
|
||||
}
|
||||
pcvLightProportion.visibility = View.INVISIBLE
|
||||
tvLightRemain.visibility = View.INVISIBLE
|
||||
tvLightSource.visibility = View.VISIBLE
|
||||
when (lightId) {
|
||||
TrafficLightEnum.RED -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_red_light_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_red_light_passenger))
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_yellow_light_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_yellow_light_passenger))
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.GREEN -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_green_light_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_green_light_passenger))
|
||||
}
|
||||
}
|
||||
else -> this@TrafficLightView.visibility = GONE
|
||||
}
|
||||
when (lightSource) {
|
||||
DataSourceType.AICLOUD -> {
|
||||
tvLightSource.text = context.getString(R.string.light_source_ai_cloud)
|
||||
}
|
||||
DataSourceType.TELEMATIC_UNION_V2I,
|
||||
DataSourceType.TELEMATIC_UNION_V2N,
|
||||
DataSourceType.TELEMATIC -> {
|
||||
tvLightSource.text = context.getString(R.string.light_source_perception)
|
||||
}
|
||||
DataSourceType.OBU -> {
|
||||
tvLightSource.text = context.getString(R.string.light_source_obu)
|
||||
}
|
||||
else -> {
|
||||
tvLightSource.visibility = GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示融合带有下一下二灯态的红绿灯
|
||||
* @param currentState 当前灯态
|
||||
* @param currentDuration 当前灯态倒计时
|
||||
* @param nextState 下一灯态
|
||||
* @param nextDuration 下一灯态倒计时
|
||||
* @param nextTwoState 下二灯态
|
||||
* @param nextTwoDuration 下二灯态倒计时
|
||||
* @param lightSource 数据来源
|
||||
*/
|
||||
override fun showFusionTrafficLight(currentState: TrafficLightEnum, currentDuration: Int, nextState: TrafficLightEnum,
|
||||
nextDuration: Int, nextTwoState: TrafficLightEnum, nextTwoDuration: Int, lightSource: DataSourceType
|
||||
) {
|
||||
super.showFusionTrafficLight(currentState, currentDuration, nextState, nextDuration, nextTwoState, nextTwoDuration, lightSource)
|
||||
if(currentLightState == currentState && currentLightDuration == currentDuration){
|
||||
return
|
||||
}
|
||||
currentLightDuration = currentDuration
|
||||
ThreadUtils.runOnUiThread {
|
||||
//如果初次获取的路口灯态倒计时时长小于1秒则返回不处理,灯态进入下一轮灯态开始进行显示
|
||||
if(this@TrafficLightView.visibility == View.GONE && currentDuration < 1){
|
||||
return@runOnUiThread
|
||||
}
|
||||
//兼容融合异常数据,当下一下二灯态时长均大于0时展示
|
||||
if(this@TrafficLightView.visibility == View.GONE && (nextDuration == 0) || nextTwoDuration == 0){
|
||||
return@runOnUiThread
|
||||
}
|
||||
/**
|
||||
* 如果红绿灯显示过程中遇到突然灯态发生改变即当前灯态未倒计时完成灯态发生变化
|
||||
* (正常情况下不会出现此情况,兼容异常状态)
|
||||
* 重置灯态占比和指针指向
|
||||
*/
|
||||
if(previousLightStatus == TrafficLightEnum.BLACK && previousLightDuration == 0
|
||||
&& currentState != TrafficLightEnum.BLACK && currentDuration != 0){
|
||||
previousLightStatus = currentState
|
||||
previousLightDuration = currentDuration
|
||||
}else{
|
||||
if((currentState != previousLightStatus && previousLightDuration >1)
|
||||
|| (currentState == previousLightStatus && previousLightDuration < currentDuration)){
|
||||
//灯态未倒计时到1,灯态发生变化(正常情况是倒计时到0,考虑到可能存在的异常情况,倒计时到1也算正常)
|
||||
returnToZero()
|
||||
resetLight()
|
||||
}else{
|
||||
previousLightStatus = currentState
|
||||
previousLightDuration = currentDuration
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//如果当前红绿灯视图为隐藏状态则设置为显示状态
|
||||
if(judgeRoundNum(currentState) || currentSource == 1){
|
||||
//从云控基础平台信号源切换到融合感知信号源
|
||||
currentSource = 0
|
||||
if(this@TrafficLightView.visibility == View.GONE){
|
||||
this@TrafficLightView.visibility = View.VISIBLE
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG)
|
||||
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.LIGHT)
|
||||
}
|
||||
|
||||
val colorList = ArrayList<TrafficLightEnum>()
|
||||
val durationList = ArrayList<Int>()
|
||||
|
||||
colorList.add(currentState)
|
||||
colorList.add(nextState)
|
||||
colorList.add(nextTwoState)
|
||||
|
||||
if(currentDuration < 3){
|
||||
durationList.add(3)
|
||||
totalDuration = 3 + nextDuration + nextTwoDuration
|
||||
currentAngle = 360f/totalDuration*(3-currentDuration) - 90f
|
||||
}else{
|
||||
durationList.add(currentDuration)
|
||||
totalDuration = currentDuration + nextDuration + nextTwoDuration
|
||||
currentAngle = -90f
|
||||
}
|
||||
durationList.add(nextDuration)
|
||||
durationList.add(nextTwoDuration)
|
||||
//没轮灯态绘制一次灯态时长比例
|
||||
pcvLightProportion.updateProportion(durationList,colorList)
|
||||
}else{
|
||||
if(currentAngle < 360f){
|
||||
currentAngle += 360f/totalDuration
|
||||
}
|
||||
}
|
||||
|
||||
//根据当前灯态设置转盘、刻度、指针背景
|
||||
when(currentState){
|
||||
TrafficLightEnum.GREEN -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_green_light_pointer_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_green_light_pointer_passenger))
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_yellow_light_pointer_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_yellow_light_pointer_passenger))
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_red_light_pointer_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_red_light_pointer_passenger))
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ivLightStatus.visibility != View.VISIBLE){
|
||||
ivLightStatus.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
if(pcvLightProportion.visibility != View.VISIBLE){
|
||||
pcvLightProportion.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
if(tvLightSource.visibility == View.VISIBLE){
|
||||
tvLightSource.visibility = View.INVISIBLE
|
||||
}
|
||||
if(tvLightRemain.visibility != View.VISIBLE){
|
||||
tvLightRemain.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
//更新当前灯态倒计时时间
|
||||
if(currentDuration>0){
|
||||
tvLightRemain.text = currentDuration.toString()
|
||||
}else{
|
||||
tvLightRemain.text = "0"
|
||||
}
|
||||
|
||||
//更新指针指向
|
||||
val pointerLayoutParams = ivLightStatus.layoutParams as LayoutParams
|
||||
pointerLayoutParams.circleAngle = currentAngle
|
||||
ivLightStatus.rotation = currentAngle
|
||||
ivLightStatus.layoutParams = pointerLayoutParams
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示云控基础平台数据红绿灯
|
||||
* @param currentState 当前灯态
|
||||
* @param currentDuration 当前灯态倒计时
|
||||
* @param nextState 下一灯态
|
||||
* @param nextDuration 下一灯态倒计时
|
||||
*/
|
||||
override fun showCloudTrafficLight(currentState: TrafficLightEnum, currentDuration: Int,
|
||||
nextState: TrafficLightEnum, nextDuration: Int) {
|
||||
super.showCloudTrafficLight(currentState, currentDuration, nextState, nextDuration)
|
||||
currentSource = 1
|
||||
if(currentLightState == currentState && currentLightDuration == currentDuration){
|
||||
return
|
||||
}
|
||||
currentLightDuration = currentDuration
|
||||
ThreadUtils.runOnUiThread{
|
||||
//如果初次获取的路口灯态倒计时时长小于1秒则返回不处理,灯态进入下一轮灯态开始进行显示
|
||||
if(this@TrafficLightView.visibility == View.GONE && currentDuration < 1){
|
||||
return@runOnUiThread
|
||||
}
|
||||
//如果当前红绿灯视图为隐藏状态则设置为显示状态
|
||||
if(judgeRoundNum(currentState)){
|
||||
if(this@TrafficLightView.visibility == View.GONE){
|
||||
this@TrafficLightView.visibility = View.VISIBLE
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG)
|
||||
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.LIGHT)
|
||||
}
|
||||
|
||||
val colorList = ArrayList<TrafficLightEnum>()
|
||||
val durationList = ArrayList<Int>()
|
||||
|
||||
colorList.add(currentState)
|
||||
colorList.add(nextState)
|
||||
|
||||
if(currentDuration < 3){
|
||||
durationList.add(3)
|
||||
totalDuration = 3 + nextDuration
|
||||
currentAngle = 360f/totalDuration*(3-currentDuration) - 90f
|
||||
}else{
|
||||
durationList.add(currentDuration)
|
||||
totalDuration = currentDuration + nextDuration
|
||||
currentAngle = -90f
|
||||
}
|
||||
durationList.add(nextDuration)
|
||||
//没轮灯态绘制一次灯态时长比例
|
||||
pcvLightProportion.updateProportion(durationList,colorList)
|
||||
}else{
|
||||
if(currentAngle < 360f){
|
||||
currentAngle += 360f/totalDuration
|
||||
}
|
||||
}
|
||||
//根据当前灯态设置转盘、刻度、指针背景
|
||||
when(currentState){
|
||||
TrafficLightEnum.GREEN -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_green_light_pointer_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_green_light_pointer_passenger))
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_yellow_light_pointer_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_yellow_light_pointer_passenger))
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
if(user == 0){
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_red_light_pointer_driver))
|
||||
}else{
|
||||
ivLightStatus.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_red_light_pointer_passenger))
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ivLightStatus.visibility != View.VISIBLE){
|
||||
ivLightStatus.visibility = View.VISIBLE
|
||||
}
|
||||
if(pcvLightProportion.visibility != View.VISIBLE){
|
||||
pcvLightProportion.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
if(tvLightSource.visibility == View.VISIBLE){
|
||||
tvLightSource.visibility = View.INVISIBLE
|
||||
}
|
||||
if(tvLightRemain.visibility != View.VISIBLE){
|
||||
tvLightRemain.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
//更新当前灯态倒计时时间
|
||||
if(currentDuration>0){
|
||||
tvLightRemain.text = currentDuration.toString()
|
||||
}else{
|
||||
tvLightRemain.text = "0"
|
||||
}
|
||||
|
||||
//更新指针指向
|
||||
val pointerLayoutParams = ivLightStatus.layoutParams as LayoutParams
|
||||
pointerLayoutParams.circleAngle = currentAngle
|
||||
ivLightStatus.rotation = currentAngle
|
||||
ivLightStatus.layoutParams = pointerLayoutParams
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
if(visibility == View.VISIBLE && isShowLight){
|
||||
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.LIGHT)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -75,6 +75,7 @@ class WifiStateView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private val txtSize: Float
|
||||
private val txtShow: Boolean
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_wifi_state, this, true)
|
||||
@@ -83,6 +84,7 @@ class WifiStateView @JvmOverloads constructor(
|
||||
R.styleable.WifiStateView_wifi_size,
|
||||
resources.getDimension(R.dimen.dp_30)
|
||||
)
|
||||
txtShow = a.getBoolean(R.styleable.WifiStateView_wifi_show_title,true)
|
||||
a.recycle()
|
||||
viewStatusBarTag.setTextSize(TypedValue.COMPLEX_UNIT_PX,AutoSizeUtils.dp2px(context,txtSize).toFloat())
|
||||
wifiManager =
|
||||
@@ -91,6 +93,11 @@ class WifiStateView @JvmOverloads constructor(
|
||||
val wifiInfo = wifiManager!!.connectionInfo
|
||||
Log.d(TAG, "wifi-info : $wifiInfo, ssid->: ${wifiInfo.ssid}")
|
||||
wifiName = wifiInfo.ssid.replace("\"","")
|
||||
if(txtShow){
|
||||
viewStatusBarTag.visibility = VISIBLE
|
||||
}else{
|
||||
viewStatusBarTag.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
private val wifiStateReceiver: BroadcastReceiver = object : BroadcastReceiver() {
|
||||
|
||||
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
@@ -0,0 +1,64 @@
|
||||
<?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"
|
||||
android:layout_width="@dimen/dp_900"
|
||||
android:layout_height="@dimen/dp_620"
|
||||
android:background="@drawable/bg_bone_dialog"
|
||||
app:roundLayoutRadius="@dimen/dp_50">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPowerOffFinish"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_87"
|
||||
android:contentDescription="@string/ota_result_image"
|
||||
android:src="@drawable/icon_ota_upgrade_success"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPowerOffContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivPowerOffFinish"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_45"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/ota_power_off_finish_title"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPowerOffTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPowerOffContent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:text="@string/ota_power_off_finish_tip"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPowerOffClose"
|
||||
android:layout_width="@dimen/dp_356"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:gravity="center"
|
||||
android:text="@string/ota_result_close"
|
||||
android:background="@drawable/bg_dialog_btn"
|
||||
android:textColor="@color/color_2EACFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_62"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -21,80 +21,104 @@
|
||||
android:layout_marginTop="@dimen/dp_82"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_222"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_one"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<ScrollView
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_one"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_206"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_272"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_two"
|
||||
/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_200"
|
||||
android:layout_marginBottom="@dimen/dp_200"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_two"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_256"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
/>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_372"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_three"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_one"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUpgradeContent"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
android:text="@string/ota_upgrade_tip_one"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivTipLogoTwo"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUpgradeContent"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_two"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTipContentTwo"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_two"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="@id/ivTipLogoTwo"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
android:layout_marginTop="@dimen/dp_m_17"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivTipLogoThree"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTipContentTwo"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_three"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_three"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ivTipLogoThree"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
android:layout_marginTop="@dimen/dp_m_17"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_three"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_356"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_upgrade_now"
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_295"
|
||||
android:layout_height="@dimen/dp_178"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_traffic_light_driver">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivLightStatus"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:contentDescription="@string/common_traffic_light_status"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.ProportionChartTwoView
|
||||
android:id="@+id/pcvLightProportion"
|
||||
android:layout_width="@dimen/dp_125"
|
||||
android:layout_height="@dimen/dp_125"
|
||||
app:layout_constraintTop_toTopOf="@id/ivLightStatus"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivLightStatus"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivLightStatus"
|
||||
app:layout_constraintRight_toRightOf="@id/ivLightStatus"
|
||||
app:chartRingWidth="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/tvLightRemain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivLightStatus"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivLightStatus"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivLightStatus"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_80"
|
||||
app:textType="DS_DIGIB_2"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLightSource"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvLightRemain"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvLightRemain"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvLightRemain"
|
||||
app:layout_constraintRight_toRightOf="@id/tvLightRemain"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_40"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_192"
|
||||
android:layout_height="@dimen/dp_122"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_traffic_light_passenger">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivLightStatus"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:contentDescription="@string/common_traffic_light_status"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.ProportionChartTwoView
|
||||
android:id="@+id/pcvLightProportion"
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
app:layout_constraintTop_toTopOf="@id/ivLightStatus"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivLightStatus"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivLightStatus"
|
||||
app:layout_constraintRight_toRightOf="@id/ivLightStatus"
|
||||
app:chartRingWidth="@dimen/dp_4"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/tvLightRemain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivLightStatus"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivLightStatus"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivLightStatus"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_50"
|
||||
app:textType="DS_DIGIB_2"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLightSource"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvLightRemain"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvLightRemain"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvLightRemain"
|
||||
app:layout_constraintRight_toRightOf="@id/tvLightRemain"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_26"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_804"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/dp_160"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box_v2x"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCloudImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvCloudContent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivCloudImage"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvCloudTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvCloudTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="@dimen/sp_24"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCloudTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvCloudTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvCloudTime"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="@dimen/sp_28"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clCloudLayout"
|
||||
android:layout_width="@dimen/dp_804"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/dp_160"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box_v2x"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCloudImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvCloudContent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivCloudImage"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvCloudTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvCloudTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="@dimen/sp_24"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCloudTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvCloudTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvCloudTime"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="@dimen/sp_28"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clCloudLayout"
|
||||
android:layout_width="@dimen/dp_694"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box_toast"
|
||||
android:layout_gravity="center_horizontal"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCloudImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudTitle"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivCloudImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/sp_40"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudContent"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCloudTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvCloudTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,39 +6,51 @@
|
||||
android:layout_marginTop="@dimen/dp_54"
|
||||
android:layout_marginBottom="@dimen/dp_14">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvProductName"
|
||||
android:layout_width="@dimen/dp_769"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_36"
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbDownloadProgress"
|
||||
android:layout_width="@dimen/dp_769"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvProductName"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:progressDrawable="@drawable/progressbar_ota_download"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvProductName"
|
||||
android:layout_width="@dimen/dp_600"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@id/pbDownloadProgress"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbDownloadProgress"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_36"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDownloadProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@id/pbDownloadProgress"
|
||||
app:layout_constraintTop_toBottomOf="@id/pbDownloadProgress"
|
||||
app:layout_constraintRight_toRightOf="@id/pbDownloadProgress"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:textColor="#999999"
|
||||
android:textSize="@dimen/sp_30"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDownloadTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/pbDownloadProgress"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbDownloadProgress"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:textColor="#999999"
|
||||
android:textSize="@dimen/sp_30"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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="wrap_content"
|
||||
android:minHeight="@dimen/dp_180"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCloudImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivCloudImage"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvCloudTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvCloudTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#999999"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCloudContent"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCloudTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvCloudTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvCloudTime"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#CCCCCC"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@android:color/transparent"
|
||||
tools:background="#83000000"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textColor="#FFFFFF"
|
||||
tools:ignore="SpUsage"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:paddingTop="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@android:color/transparent"
|
||||
tools:background="#83000000"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textColor="#FFFFFF"
|
||||
tools:ignore="SpUsage"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -2161,7 +2161,45 @@
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDebugCenter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:drawableEnd="@drawable/icon_right"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="调试中心"
|
||||
android:textOn="调试中心"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
<LinearLayout
|
||||
android:id="@+id/debugCenterLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
<Button
|
||||
android:id="@+id/btnFmd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:text="故障诊断"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/btnAutoCheck"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:text="自动驾驶检测"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<ToggleButton
|
||||
android:id="@+id/tbLogcatCenter"
|
||||
android:layout_width="match_parent"
|
||||
@@ -2625,6 +2663,19 @@
|
||||
android:textOff="开启QUIC协议(目前QA环境可用)"
|
||||
android:textOn="关闭QUIC协议"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbParking"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="点击开启进站点展示"
|
||||
android:textOn="点击关闭进站点展示"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@@ -78,31 +78,18 @@
|
||||
app:layout_constraintEnd_toStartOf="@+id/visualAngleToggle"
|
||||
app:layout_goneMarginEnd="@dimen/dp_50" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
|
||||
android:id="@+id/viewTrafficLightVr"
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TrafficLightView
|
||||
android:id="@+id/tlvDriver"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
|
||||
android:visibility="gone"
|
||||
app:pressed_enabled="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.FusionTrafficLightView
|
||||
android:id="@+id/viewFusionTrafficLight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"
|
||||
app:fusionLightUser="driver"
|
||||
app:lightUser="driver"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<!--红绿灯提醒-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.notice.traffic.TrafficLightPromptView
|
||||
@@ -124,8 +111,8 @@
|
||||
android:layout_height="@dimen/dp_129"
|
||||
android:layout_marginTop="@dimen/dp_71"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/viewTrafficLightVr"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewTrafficLightVr"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tlvDriver"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tlvDriver"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
app:layout_goneMarginEnd="40dp"
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
|
||||
<declare-styleable name="WifiStateView">
|
||||
<attr name="wifi_size" format="dimension"/>
|
||||
<attr name="wifi_show_title" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
||||
<style name="AudioFileInfoOverlayText">
|
||||
@@ -122,6 +123,10 @@
|
||||
<attr name="ringWidth" format="reference|dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="ProportionChartTwoView">
|
||||
<attr name="chartRingWidth" format="reference|dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="FusionTrafficLightView">
|
||||
<attr name="fusionLightUser">
|
||||
<enum name="driver" value="0"/>
|
||||
@@ -130,6 +135,13 @@
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="TrafficLightView">
|
||||
<attr name="lightUser">
|
||||
<enum name="driver" value="0"/>
|
||||
<enum name="passenger" value="1"/>
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="TrafficLightPromptView">
|
||||
<attr name="promptUser">
|
||||
<enum name="driver" value="0"/>
|
||||
|
||||
@@ -107,13 +107,13 @@
|
||||
|
||||
<string name="traffic_light_status">红绿灯灯态</string>
|
||||
<!--红绿灯数据来源-->
|
||||
<string name="light_source_ai_cloud">云端下发</string>
|
||||
<string name="light_source_ai_cloud">云端</string>
|
||||
<string name="light_source_driver_ai_cloud">云\n端</string>
|
||||
<string name="light_source_perception">自车感知</string>
|
||||
<string name="light_source_perception">自车</string>
|
||||
<string name="light_source_driver_perception">自\n车</string>
|
||||
<string name="light_source_perception_v2i">融合V2I</string>
|
||||
<string name="light_source_perception_v2n">融合V2N</string>
|
||||
<string name="light_source_obu">\u2000OBU\u2000</string>
|
||||
<string name="light_source_obu">OBU</string>
|
||||
<string name="light_source_driver_obu">O\nB\nU</string>
|
||||
<string name="parallel_drive">远程代驾</string>
|
||||
<string name="parallel_drive_requesting">请求中...</string>
|
||||
@@ -267,11 +267,13 @@
|
||||
<string name="ota_upgrade_later">稍后升级</string>
|
||||
<string name="ota_download_title">资源下载中</string>
|
||||
<string name="ota_result_image">OTA升级结果图片示例</string>
|
||||
<string name="ota_result_success">⻋辆部署任务执⾏成功</string>
|
||||
<string name="ota_result_success">⻋辆部署任务下载完成</string>
|
||||
<string name="ota_result_fail">⻋辆部署任务执⾏失败</string>
|
||||
<string name="ota_result_success_tip">请重启⻋辆</string>
|
||||
<string name="ota_result_success_tip">已自动发起优雅停服,%s后可操作车辆下电重启</string>
|
||||
<string name="ota_result_fail_tip">请联系管理员</string>
|
||||
<string name="ota_result_close">关闭</string>
|
||||
<string name="ota_power_off_finish_title">车辆优雅停服完成</string>
|
||||
<string name="ota_power_off_finish_tip">请操作车辆下电重启</string>
|
||||
|
||||
<string name="fsm_demo_mode_error">FSM美化模式状态下异常标识</string>
|
||||
|
||||
@@ -296,4 +298,6 @@
|
||||
<string name="disk_not_enough_space">剩余空间不足</string>
|
||||
<string name="date_cannot_copy">所选日期无法拷贝</string>
|
||||
|
||||
<string name="common_traffic_light_status">红绿灯灯态背景</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -2,87 +2,111 @@
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="V2X" android:layout="@layout/layout_operate_panel_preference_category_title">
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2x_total_switch"
|
||||
android:title="V2X总开关"
|
||||
android:key="nde_upward_switch"
|
||||
android:title="NDE(数据上车)上行"
|
||||
android:persistent="false"
|
||||
android:disableDependentsState="false"
|
||||
android:defaultValue="@bool/v2x_total_switch"
|
||||
android:defaultValue="@bool/nde_upward_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2n_total_switch"
|
||||
android:title="V2N总开关"
|
||||
android:key="image_upload_switch"
|
||||
android:title="车辆图像上传行云大模型"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/image_upload_switch"
|
||||
android:dependency="nde_upward_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="nde_downward_switch"
|
||||
android:title="NDE(数据上车)下行"
|
||||
android:persistent="false"
|
||||
android:disableDependentsState="false"
|
||||
android:dependency="v2x_total_switch"
|
||||
android:defaultValue="@bool/v2n_total_switch"
|
||||
android:defaultValue="@bool/nde_downward_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
<!-- <SwitchPreferenceCompat-->
|
||||
<!-- android:key="v2n_new_linked"-->
|
||||
<!-- android:title="V2N新链路"-->
|
||||
<!-- android:persistent="false"-->
|
||||
<!-- android:dependency="v2n_total_switch"-->
|
||||
<!-- android:defaultValue="@bool/v2n_new_linked"-->
|
||||
<!-- android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"-->
|
||||
<!-- android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>-->
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2n_new_linked_to_pnc"
|
||||
android:title="V2N场景进PNC"
|
||||
android:key="nde_event_data_to_pnc"
|
||||
android:title="事件数据进PNC应用"
|
||||
android:persistent="false"
|
||||
android:dependency="v2n_total_switch"
|
||||
android:defaultValue="@bool/v2n_new_linked_to_pnc"
|
||||
android:dependency="nde_downward_switch"
|
||||
android:defaultValue="@bool/nde_event_data_to_pnc"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2i_total_switch"
|
||||
android:title="V2I总开关"
|
||||
android:key="nde_perception_data_to_pnc"
|
||||
android:title="感知数据进PNC应用"
|
||||
android:persistent="false"
|
||||
android:dependency="v2x_total_switch"
|
||||
android:dependency="nde_downward_switch"
|
||||
android:defaultValue="@bool/nde_perception_data_to_pnc"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="cloud_control_upward"
|
||||
android:title="云控基础平台上行"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/cloud_control_upward"
|
||||
android:disableDependentsState="false"
|
||||
android:defaultValue="@bool/v2i_total_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:layout="@layout/layout_operate_panel_preference_top_divider"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2i_to_pnc"
|
||||
android:title="V2I场景进PNC"
|
||||
android:key="cloud_control_downward"
|
||||
android:title="云控基础平台下行"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/v2i_from_pnc"
|
||||
android:dependency="v2i_total_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2i_red_light_warning"
|
||||
android:title="闯红灯预警"
|
||||
android:persistent="false"
|
||||
android:dependency="v2i_total_switch"
|
||||
android:defaultValue="@bool/v2i_red_green_warning"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2i_weakness_traffic"
|
||||
android:title="路侧弱势交通参与者"
|
||||
android:persistent="false"
|
||||
android:dependency="v2i_total_switch"
|
||||
android:defaultValue="@bool/v2i_weakness_traffic"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2v_total_switch"
|
||||
android:title="V2V总开关"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/v2v_total_switch"
|
||||
android:defaultValue="@bool/cloud_control_downward"
|
||||
android:disableDependentsState="false"
|
||||
android:dependency="v2x_total_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:layout="@layout/layout_operate_panel_preference_bottom_divider"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="obu_total_switch"
|
||||
android:title="OBU总开关"
|
||||
android:key="obu_upward_switch"
|
||||
android:title="OBU上报(V2I、V2V上行)"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/obu_total_switch"
|
||||
android:dependency="v2x_total_switch"
|
||||
android:defaultValue="@bool/v2i_downward_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2i_downward_switch"
|
||||
android:title="V2I下行"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/v2i_downward_switch"
|
||||
android:disableDependentsState="false"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2i_weak_traffic_participant"
|
||||
android:title="弱势交通参与者"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/v2i_weak_traffic_participant"
|
||||
android:dependency="v2i_downward_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2i_perception_data_to_pnc"
|
||||
android:title="感知数据进PNC应用"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/v2i_perception_data_to_pnc"
|
||||
android:dependency="v2i_downward_switch"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="v2v_downward_switch"
|
||||
android:title="V2V下行"
|
||||
android:persistent="false"
|
||||
android:defaultValue="@bool/v2v_downward_switch"
|
||||
android:disableDependentsState="false"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
@@ -45,13 +45,6 @@
|
||||
android:title="考试功能面板"
|
||||
android:persistent="false"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
|
||||
<SwitchPreferenceCompat
|
||||
android:key="image_upload"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:title="车辆图像上传行云大模型"
|
||||
android:persistent="false"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"
|
||||
/>
|
||||
<CheckBoxPreference
|
||||
android:key="all_merge_mode"
|
||||
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
|
||||
|
||||