同步212 版本
@@ -2,8 +2,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.hmi">
|
||||
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.bindingcar
|
||||
|
||||
import android.content.Context
|
||||
import android.opengl.Visibility
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
@@ -21,22 +23,23 @@ class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleOb
|
||||
private val TAG = "UpgradeAppDialog"
|
||||
private var confirmTv: TextView? = null
|
||||
private var cancleTv: TextView? = null
|
||||
private var upgradeTitleTv: TextView? = null
|
||||
private var upgradeContentTv: TextView? = null
|
||||
private var verticalLineView: View? = null
|
||||
private var confirmForceTv: TextView? = null
|
||||
private var tag: String? = null
|
||||
private var downloarUrl: String? = null
|
||||
|
||||
private var mServiceApis: IMogoServiceApis? = null
|
||||
private val statusChangedListenerForCheckNotice = IMogoStatusChangedListener { descriptor, isTrue ->
|
||||
if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
setContentView(R.layout.dialog_upgrade_app)
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
upgradeTitleTv = findViewById(R.id.tv_upgrade_title)
|
||||
upgradeContentTv = findViewById(R.id.tv_upgrade_content)
|
||||
confirmTv = findViewById(R.id.tv_upgrade_confirm)
|
||||
cancleTv = findViewById(R.id.tv_upgrade_cancel)
|
||||
verticalLineView = findViewById(R.id.view_vertical_line)
|
||||
confirmForceTv = findViewById(R.id.tv_upgrade_confirm_force)
|
||||
|
||||
confirmTv?.setOnClickListener {
|
||||
downloadApp()
|
||||
@@ -45,6 +48,11 @@ class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleOb
|
||||
cancleTv?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
confirmForceTv?.setOnClickListener {
|
||||
downloadApp()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,12 +69,31 @@ class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleOb
|
||||
super.dismiss()
|
||||
}
|
||||
|
||||
fun showUpgradeAppDialog(name: String, url: String) {
|
||||
// 升级类型 1:提示升级 2:静默升级 3:强制升级
|
||||
fun showUpgradeAppDialog(name: String, url: String, title: String, content: String, installType: String) {
|
||||
if (isShowing) {
|
||||
return
|
||||
}
|
||||
tag = name
|
||||
downloarUrl = url
|
||||
upgradeTitleTv?.text = title
|
||||
upgradeContentTv?.text = content
|
||||
|
||||
if (installType.equals("1")) {
|
||||
confirmForceTv?.visibility = View.GONE
|
||||
confirmTv?.visibility = View.VISIBLE
|
||||
cancleTv?.visibility = View.VISIBLE
|
||||
verticalLineView?.visibility = View.VISIBLE
|
||||
} else if (installType.equals("3")) {
|
||||
confirmTv?.visibility = View.GONE
|
||||
cancleTv?.visibility = View.GONE
|
||||
verticalLineView?.visibility = View.GONE
|
||||
|
||||
confirmForceTv?.visibility = View.VISIBLE
|
||||
} else if (installType.equals("2")) {
|
||||
//静默安装
|
||||
}
|
||||
|
||||
show()
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.pnc
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.autopilot.pnc.PncActionsHelper
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_PNC_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.trafficlight.currentRoadTrafficLight
|
||||
import com.mogo.eagle.core.data.trafficlight.isRed
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.Companion.STATUS_AUTOPILOT_RUNNING
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlinx.android.synthetic.main.view_pnc_actions.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
class PncActionsView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotPlanningActionsListener,
|
||||
IMoGoTrafficLightListener, IMoGoAutopilotStatusListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "PncActionsView"
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var mTrafficLightResult: TrafficLightResult? = null
|
||||
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_pnc_actions, this, true)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotPlanningActionsListenerManager.addListener(TAG, this)
|
||||
CallerTrafficLightListenerManager.registerTrafficLightListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerAutopilotPlanningActionsListenerManager.removeListener(TAG)
|
||||
CallerTrafficLightListenerManager.unRegisterTrafficLightListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
super.onAutopilotStatusResponse(autoPilotStatusInfo)
|
||||
mAutoPilotStatusInfo = autoPilotStatusInfo
|
||||
if (mAutoPilotStatusInfo!!.state != STATUS_AUTOPILOT_RUNNING) {
|
||||
UiThreadHandler.post {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@BizConfig(FOUNDATION, "", BIZ_PNC_ACTIONS)
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
mAutoPilotStatusInfo?.let {
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
UiThreadHandler.post {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let {
|
||||
actions = PncActionsHelper.getAction(it.drivingState.number, it.drivingAction.number)
|
||||
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficlightTime().isNotBlank()) {
|
||||
actions += ",预计${getWaitTrafficlightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
}
|
||||
}
|
||||
// update view
|
||||
if (actions.isNullOrEmpty()) {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
this.background = AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
mTrafficLightResult = trafficLightResult
|
||||
}
|
||||
|
||||
private fun getWaitTrafficlightTime(): String {
|
||||
return if (mTrafficLightResult != null
|
||||
&& mTrafficLightResult!!.currentRoadTrafficLight() != null
|
||||
&& mTrafficLightResult!!.currentRoadTrafficLight()!!.isRed()
|
||||
) {
|
||||
mTrafficLightResult!!.currentRoadTrafficLight()!!.remain.toString()
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,9 @@ import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.text.Html
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -21,12 +21,17 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import chassis.Chassis
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.*
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_BAG_RECORD
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_BEAUTY_MODE
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_FULL_LOG
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RAIN_MODE
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_WARNING_UPLOAD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
@@ -36,10 +41,12 @@ import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.data.upgrade.UpgradeVersionEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -50,12 +57,11 @@ import com.mogo.eagle.core.function.call.map.CallerSmpManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
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.logcatch.ILogViewListener
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
|
||||
import com.mogo.eagle.core.function.hmi.ui.upgrade.UpgradeListAdapter
|
||||
import com.mogo.eagle.core.network.*
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
@@ -65,6 +71,7 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.module.service.routeoverlay.*
|
||||
@@ -92,8 +99,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener,
|
||||
IMoGoMapLocationListener, IMoGoAutopilotIdentifyListener,
|
||||
IMoGoAutopilotPlanningListener, IMoGoAutopilotCarConfigListener,
|
||||
IMoGoAutopilotVehicleStateListener {
|
||||
IMoGoAutopilotPlanningListener,
|
||||
IMoGoAutopilotVehicleStateListener, IMoGoDevaToolsFuncConfigListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -151,6 +158,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")
|
||||
}
|
||||
|
||||
private var isStarted = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_debug_setting, this, true)
|
||||
initView()
|
||||
@@ -177,15 +186,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
// 添加 ADAS车辆状态&定位 监听
|
||||
CallerAutopilotCarStatusListenerManager.addListener(TAG, this)
|
||||
// 添加 地图样式改变 监听
|
||||
CallerMapLocationListenerManager.addListener(TAG, this)
|
||||
CallerMapLocationListenerManager.addListener(TAG, this, false)
|
||||
// 添加 域控制器感知数据 监听
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
// 添加 规划路径相关回调 监听
|
||||
CallerAutopilotPlanningListenerManager.addListener(TAG, this)
|
||||
// 添加 工控机基础信息回调 监听
|
||||
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
||||
//添加 车辆底盘数据回调 监听
|
||||
CallerAutopilotVehicleStateListenerManager.addListener(TAG, this)
|
||||
|
||||
//添加 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION, TAG, true, this
|
||||
)
|
||||
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterForeground()
|
||||
}
|
||||
@@ -206,16 +219,17 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
// 移除 ADAS车辆状态&定位 监听
|
||||
CallerAutopilotCarStatusListenerManager.removeListener(TAG)
|
||||
// 移除 地图样式改变 监听
|
||||
CallerMapLocationListenerManager.removeListener(TAG)
|
||||
CallerMapLocationListenerManager.removeListener(TAG, false)
|
||||
// 移除 域控制器感知数据 监听
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
// 移除 规划路径相关回调 监听
|
||||
CallerAutopilotPlanningListenerManager.removeListener(TAG)
|
||||
// 移除 工控机基础信息回调 监听
|
||||
CallerAutopilotCarConfigListenerManager.removeListener(TAG)
|
||||
//移除 车辆底盘数据回调 监听
|
||||
// 移除 车辆底盘数据回调 监听
|
||||
CallerAutopilotVehicleStateListenerManager.removeListener(TAG)
|
||||
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG)
|
||||
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterBackground()
|
||||
}
|
||||
@@ -247,6 +261,23 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 魔戒控制
|
||||
*/
|
||||
tbMojie.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (isChecked) {
|
||||
buttonView.setCompoundDrawables(null, null, iconDown, null)
|
||||
btnOpenAllGestures.visibility = View.VISIBLE
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
btnOpenAllGestures.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
btnOpenAllGestures.setOnClickListener {
|
||||
MogoMapUIController.getInstance().setAllGesturesEnabled(true)
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本信息
|
||||
*/
|
||||
@@ -535,24 +566,33 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
Log.i(
|
||||
"1026-emArrow",
|
||||
"debug setting FunctionBuildConfig.isDemoMode : ${FunctionBuildConfig.isDemoMode}"
|
||||
)
|
||||
// 演示模式,上一次勾选的数据
|
||||
tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerHmiManager.updateStatusBarRightView(isChecked, "demoMode", DemoModeView(context))
|
||||
CallerAutoPilotManager.setDemoMode(isChecked)
|
||||
if(!isChecked){
|
||||
if (!isChecked) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotManager.setIPCDemoMode(isChecked)
|
||||
}
|
||||
FunctionBuildConfig.isDemoMode = isChecked
|
||||
tbIsDrawAutopilotTrajectoryData.isEnabled = !isChecked
|
||||
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = isChecked
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
tbIsDrawAutopilotTrajectoryData.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbIsDemoMode.visibility = View.GONE
|
||||
}
|
||||
|
||||
// 雨天模式,上一次勾选的数据
|
||||
tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
//雨天模式
|
||||
@@ -565,6 +605,15 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsRainMode.visibility = View.GONE
|
||||
}
|
||||
|
||||
tbBeautyMode.isChecked = FunctionBuildConfig.isBeautyMode
|
||||
//感知优化模式
|
||||
tbBeautyMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isBeautyMode = isChecked
|
||||
if (!FunctionBuildConfig.isBeautyMode) {
|
||||
tbBeautyMode.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
btnIpcReboot.onClick {
|
||||
CallerAutoPilotManager.sendIpcReboot()
|
||||
@@ -585,36 +634,64 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 初始化 GSP数据源 数据
|
||||
rgGpsProvider.check(
|
||||
when (FunctionBuildConfig.gpsProvider) {
|
||||
0 -> {
|
||||
R.id.rbGpsProviderAndroid
|
||||
}
|
||||
1 -> {
|
||||
R.id.rbGpsProviderRTK
|
||||
}
|
||||
2 -> {
|
||||
R.id.rbGpsProviderOBU
|
||||
}
|
||||
0 -> R.id.rbGpsProviderAndroid
|
||||
1 -> R.id.rbGpsProviderRTK
|
||||
2 -> R.id.rbGpsProviderOBU
|
||||
else -> R.id.rbGpsProviderAndroid
|
||||
}
|
||||
)
|
||||
rgGpsProvider.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rbGpsProviderAndroid -> {
|
||||
FunctionBuildConfig.gpsProvider = 0
|
||||
R.id.rbGpsProviderAndroid -> FunctionBuildConfig.gpsProvider = 0
|
||||
R.id.rbGpsProviderRTK -> FunctionBuildConfig.gpsProvider = 1
|
||||
R.id.rbGpsProviderOBU -> FunctionBuildConfig.gpsProvider = 2
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化 tracker感知数据源 数据
|
||||
trackerProvider.check(
|
||||
when (FunctionBuildConfig.debugTrackerProvider) {
|
||||
0 -> R.id.trackerProviderOrigin
|
||||
1 -> R.id.trackerProviderObu
|
||||
else -> R.id.trackerProviderOrigin
|
||||
}
|
||||
)
|
||||
trackerProvider.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.trackerProviderOrigin -> {
|
||||
FunctionBuildConfig.debugTrackerProvider = 0
|
||||
// update tracker provider view
|
||||
trackerIPCProvider.visibility = View.VISIBLE
|
||||
}
|
||||
R.id.rbGpsProviderRTK -> {
|
||||
FunctionBuildConfig.gpsProvider = 1
|
||||
}
|
||||
R.id.rbGpsProviderOBU -> {
|
||||
FunctionBuildConfig.gpsProvider = 2
|
||||
R.id.trackerProviderObu -> {
|
||||
FunctionBuildConfig.debugTrackerProvider = 1
|
||||
// update tracker provider view
|
||||
trackerIPCProvider.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化 trackerIPC 感知数据源 数据
|
||||
trackerIPCProvider.check(
|
||||
when (FunctionBuildConfig.trackerIPCProvider) {
|
||||
0 -> R.id.trackerIPCUnion
|
||||
1 -> R.id.trackerIPC
|
||||
2 -> R.id.trackerIPCObu
|
||||
3 -> R.id.trackerIPCV2I
|
||||
else -> R.id.trackerIPCUnion
|
||||
}
|
||||
)
|
||||
trackerIPCProvider.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.trackerIPCUnion -> FunctionBuildConfig.trackerIPCProvider = 0
|
||||
R.id.trackerIPC -> FunctionBuildConfig.trackerIPCProvider = 1
|
||||
R.id.trackerIPCObu -> FunctionBuildConfig.trackerIPCProvider = 2
|
||||
R.id.trackerIPCV2I -> FunctionBuildConfig.trackerIPCProvider = 3
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化 ADAS感知数据是否绘制 选择情况
|
||||
tbIsDrawIdentifyData.isChecked = FunctionBuildConfig.isDrawIdentifyData
|
||||
@@ -751,20 +828,21 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
//状态中心-后台优化状态
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
val backgroundStatus = "后台运行:" + if (BackgrounderPermission.getInstance()
|
||||
.isPermissionLongBackgroundRunning(context)
|
||||
) "<font color='green'>已优化</font>" else "<font color='red'>未优化</font>"
|
||||
tvBackgroundOperation.text = Html.fromHtml(backgroundStatus, Html.FROM_HTML_MODE_LEGACY)
|
||||
tvBackgroundOperation.setOnClickListener {
|
||||
BackgrounderPermission.getInstance().showPermissionLongBackgroundRunningDialog(context)
|
||||
BackgrounderPermission.getInstance()
|
||||
.showPermissionLongBackgroundRunningDialog(context)
|
||||
}
|
||||
BackgrounderPermission.getInstance().setListener {
|
||||
val str =
|
||||
"后台运行:" + if (it) "<font color='green'>已优化</font>" else "<font color='red'>未优化</font>"
|
||||
tvBackgroundOperation.text = Html.fromHtml(str, Html.FROM_HTML_MODE_LEGACY)
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
tvBackgroundOperation.visibility = GONE
|
||||
}
|
||||
//设置工控机连接状态
|
||||
@@ -774,7 +852,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 设置鹰眼本地参数配置监听
|
||||
*/
|
||||
@SuppressLint("SetTextI18n") private fun setEagleEyeConfigListener() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setEagleEyeConfigListener() {
|
||||
//初始化刹车加速度阈值信息
|
||||
val brakeThreshold = SharedPrefsMgr.getInstance(context)
|
||||
.getFloat(MoGoConfig.BRAKE_ACCELERATION_THRESHOLD, -2.5F)
|
||||
@@ -801,6 +880,17 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
btnBrakeThreshold.setOnLongClickListener {
|
||||
if (!isStarted) {
|
||||
CallerDevaToolsManager.startMonitor()
|
||||
isStarted = true
|
||||
} else {
|
||||
CallerDevaToolsManager.stopMonitor()
|
||||
isStarted = false
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
//设置连接司机屏IP
|
||||
btnConnectServerIp.setOnClickListener {
|
||||
val ip = etConnectServerIp.text.toString()
|
||||
@@ -815,7 +905,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isReportWarning = isChecked
|
||||
}
|
||||
//异常上报开关只在司机端展示
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbReportWarning.visibility = GONE
|
||||
}
|
||||
|
||||
@@ -826,7 +916,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
p.menuInflater.inflate(R.menu.menu_env_pop, p.menu)
|
||||
MenuCompat.setGroupDividerEnabled(p.menu, true)
|
||||
p.setOnMenuItemClickListener { item ->
|
||||
when(item.itemId) {
|
||||
when (item.itemId) {
|
||||
R.id.group_hy -> {
|
||||
return@setOnMenuItemClickListener false
|
||||
}
|
||||
@@ -1034,7 +1124,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
accelerationIsShow = isChecked
|
||||
}
|
||||
|
||||
tbRouteDynamicEffect.isChecked = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) && !AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
tbRouteDynamicEffect.isChecked =
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) && !AppIdentityModeUtils.isBus(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
|
||||
tbRouteDynamicEffect.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
@@ -1379,6 +1472,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ADAS红绿灯数据
|
||||
*/
|
||||
cbAdasTrafficlight.setOnCheckedChangeListener { _, isChecked ->
|
||||
val map = CallerDevaToolsManager.getTraceInfo()
|
||||
val param = map[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_TRAFFIC_LIGHT]
|
||||
param?.let {
|
||||
it.record = isChecked
|
||||
map[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_TRAFFIC_LIGHT] = param
|
||||
CallerDevaToolsManager.refreshTraceInfo(map)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ADAS PLANNING OBJ 感知障碍物
|
||||
*/
|
||||
@@ -1412,6 +1518,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
vehicle?.let {
|
||||
cbAdasVehicle.isChecked = it.record
|
||||
}
|
||||
val trafficlight = traceInfoMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_TRAFFIC_LIGHT]
|
||||
trafficlight?.let {
|
||||
cbAdasTrafficlight.isChecked = it.record
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1499,50 +1609,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
*/
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun drawAppInfo() {
|
||||
AppConfigInfo.appName = AppUtils.getAppName()
|
||||
if (AppConfigInfo.appVersionCode == 0) {
|
||||
AppConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
|
||||
}
|
||||
if (AppConfigInfo.appVersionName.isNullOrEmpty()) {
|
||||
AppConfigInfo.appVersionName = AppUtils.getAppVersionName()
|
||||
}
|
||||
if (AppConfigInfo.appPackageName.isNullOrEmpty()) {
|
||||
AppConfigInfo.appPackageName = AppUtils.getAppPackageName()
|
||||
}
|
||||
if (AppConfigInfo.uniqueDeviceId.isNullOrEmpty()) {
|
||||
AppConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
|
||||
}
|
||||
if (AppConfigInfo.widevineIDMd5.isNullOrEmpty()) {
|
||||
AppConfigInfo.widevineIDMd5 =
|
||||
DeviceIdUtils.getWidevineIDWithMd5(AbsMogoApplication.getApp())
|
||||
}
|
||||
if (MoGoAiCloudClient.getInstance().aiCloudClientConfig != null) {
|
||||
AppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
|
||||
AppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
}
|
||||
|
||||
AppConfigInfo.netMode = DebugConfig.getNetMode()
|
||||
if (MogoMap.getInstance().mogoMap != null) {
|
||||
AppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
}
|
||||
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
AppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
|
||||
|
||||
when {
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> {// 司机端
|
||||
AppConfigInfo.isDriver = true
|
||||
AppConfigInfo.isConnectedNetty = CallerTelematicManager.getServerStarted()
|
||||
}
|
||||
AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) -> {
|
||||
AppConfigInfo.isDriver = false
|
||||
AppConfigInfo.isConnectedNetty = CallerTelematicManager.getClientConnStatus()
|
||||
AppConfigInfo.serverSn = CallerTelematicManager.getServerToken()
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
AppConfigInfo.teleTimeStamp = CallerAutoPilotManager.getTeleTimeStamp()
|
||||
|
||||
/**
|
||||
* 设备绑定关系
|
||||
*/
|
||||
@@ -1738,16 +1804,14 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
*/
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
mAutoPilotStatusInfo = autoPilotStatusInfo
|
||||
AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
|
||||
AppConfigInfo.connectStatusDescribe = autoPilotStatusInfo.connectStatusDescribe
|
||||
setAutopilotConnectStatus()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置工控机连接状态
|
||||
*/
|
||||
private fun setAutopilotConnectStatus(){
|
||||
ThreadUtils.runOnUiThread{
|
||||
private fun setAutopilotConnectStatus() {
|
||||
ThreadUtils.runOnUiThread {
|
||||
tvAutopilotConnectStatus.text = Html.fromHtml(
|
||||
"工控机连接状态:${
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
@@ -1793,6 +1857,62 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateBizView(type: String, lock: Boolean) {
|
||||
when (type) {
|
||||
BIZ_BEAUTY_MODE -> {
|
||||
tbIsDemoMode.isClickable = !lock
|
||||
if (lock) {
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
}
|
||||
BIZ_RAIN_MODE -> {
|
||||
tbIsRainMode.isClickable = !lock
|
||||
if (lock) {
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
}
|
||||
BIZ_WARNING_UPLOAD -> {
|
||||
tbReportWarning.isClickable = !lock
|
||||
if (lock) {
|
||||
tbReportWarning.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbReportWarning.background = null
|
||||
}
|
||||
}
|
||||
BIZ_BAG_RECORD -> {
|
||||
if (lock) {
|
||||
btnRecordBag.isClickable = false
|
||||
btnRecordBag.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
btnRecordBag.isClickable = true
|
||||
btnRecordBag.requestFocus()
|
||||
btnRecordBag.background = null
|
||||
}
|
||||
}
|
||||
BIZ_FULL_LOG -> {
|
||||
if (lock) {
|
||||
tbLogCatch.isClickable = false
|
||||
tbLogCatch.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbLogCatch.isClickable = true
|
||||
tbLogCatch.requestFocus()
|
||||
tbLogCatch.background = null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) {
|
||||
mGnssInfo = gnssInfo
|
||||
//实时加速度列表
|
||||
@@ -1858,18 +1978,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
mRouteInfoSize = globalPathResp?.wayPointsList?.size ?: 0
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机基础信息回调
|
||||
*/
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
carConfigResp.let {
|
||||
AppConfigInfo.plateNumber = it.plateNumber//车牌号
|
||||
AppConfigInfo.iPCMacAddress = it.macAddress//工控机MAC地址
|
||||
AppConfigInfo.protocolVersionNumber = it.protocolVersionValue//工控机协议版本
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机异常回调
|
||||
*/
|
||||
@@ -1915,7 +2023,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int) {
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1990,7 +2098,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
private fun toastMsg(msg: String) {
|
||||
//当司机屏处于美化(演示)模式、msg为空时不弹吐司
|
||||
if (!FunctionBuildConfig.isDemoMode && msg.isNotEmpty()
|
||||
&& AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
&& AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
ToastUtils.showLong(msg)
|
||||
}
|
||||
}
|
||||
@@ -2048,4 +2157,5 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
fun showReportListWindow(show: Boolean)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.module.service.routeoverlay.RouteStrategy
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
|
||||
|
||||
/**
|
||||
* SOP设置窗口
|
||||
*/
|
||||
class SOPSettingView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoDevaToolsFuncConfigListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "SOPSettingView"
|
||||
}
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_sop_setting, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
//绕障类功能开关
|
||||
tbObstacleAvoidance.isChecked = FunctionBuildConfig.isDetouring
|
||||
tbObstacleAvoidance.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerAutoPilotManager.sendDetouring(isChecked)
|
||||
FunctionBuildConfig.isDetouring = isChecked
|
||||
}
|
||||
|
||||
tbMarkingObstacles.isChecked = FunctionBuildConfig.isPNCWarning
|
||||
//危险障碍物颜色标记开关
|
||||
tbMarkingObstacles.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isPNCWarning = isChecked
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbMarkingObstacles.visibility = View.GONE
|
||||
}
|
||||
|
||||
//引导线动态效果
|
||||
tbRouteDynamicEffect.isChecked =
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) && !AppIdentityModeUtils.isBus(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
tbRouteDynamicEffect.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
RouteStrategy.enable(true)
|
||||
} else {
|
||||
RouteStrategy.enable(false)
|
||||
}
|
||||
}
|
||||
|
||||
//红绿灯标识
|
||||
tbTrafficLight.isChecked = HmiBuildConfig.isShowTrafficLightView
|
||||
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
HmiBuildConfig.isShowTrafficLightView = false
|
||||
} else {
|
||||
HmiBuildConfig.isShowTrafficLightView = true
|
||||
CallerHmiManager.disableWarningTrafficLight()
|
||||
}
|
||||
}
|
||||
|
||||
//限速标识
|
||||
tbSpeedLimit.isChecked = HmiBuildConfig.isShowLimitingVelocityView
|
||||
tbSpeedLimit.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = true
|
||||
} else {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
CallerHmiManager.disableLimitingVelocity()
|
||||
}
|
||||
}
|
||||
|
||||
// 演示模式,上一次勾选的数据
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
// 演示模式
|
||||
tbDemoMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerAutoPilotManager.setDemoMode(isChecked)
|
||||
if (!isChecked) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotManager.setIPCDemoMode(isChecked)
|
||||
}
|
||||
FunctionBuildConfig.isDemoMode = isChecked
|
||||
}
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbDemoMode.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
||||
// 雨天模式,上一次勾选的数据
|
||||
tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
//雨天模式
|
||||
tbRainMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerAutoPilotManager.setRainMode(isChecked)
|
||||
FunctionBuildConfig.isRainMode = isChecked
|
||||
}
|
||||
//雨天模式按钮只在司机屏生效,乘客屏不显示
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbRainMode.visibility = View.GONE
|
||||
}
|
||||
|
||||
//OBU控制总开关
|
||||
tbObu.isChecked = CallerOBUManager.isConnected()
|
||||
tbObu.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.8.199")
|
||||
}
|
||||
} else {
|
||||
//断开链接
|
||||
CallerOBUManager.disConnectObu()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//是否开启异常上报
|
||||
tbIPCReport.isChecked = FunctionBuildConfig.isReportWarning
|
||||
tbIPCReport.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isReportWarning = isChecked
|
||||
}
|
||||
|
||||
//变道绕障的目标障碍物速度阈值
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
ivSpeedReduce.setOnClickListener {
|
||||
if (FunctionBuildConfig.detouringSpeed <= 3) {
|
||||
ToastUtils.showShort("阈值最小可为3 m/s")
|
||||
} else {
|
||||
FunctionBuildConfig.detouringSpeed--
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
}
|
||||
}
|
||||
ivSpeedAdd.setOnClickListener {
|
||||
if (FunctionBuildConfig.detouringSpeed >= 7) {
|
||||
ToastUtils.showShort("阈值最大可为7 m/s")
|
||||
} else {
|
||||
FunctionBuildConfig.detouringSpeed++
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
}
|
||||
}
|
||||
btnSpeedSet.setOnClickListener {
|
||||
val isSuccess =
|
||||
CallerAutoPilotManager.sendDetouringSpeed(FunctionBuildConfig.detouringSpeed.toDouble())
|
||||
if (isSuccess == true) {
|
||||
ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置成功")
|
||||
} else {
|
||||
ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置失败")
|
||||
}
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
tvSpeedThresholdTitle.visibility = View.GONE
|
||||
ivSpeedReduce.visibility = View.GONE
|
||||
tvSpeed.visibility = View.GONE
|
||||
ivSpeedAdd.visibility = View.GONE
|
||||
btnSpeedSet.visibility = View.GONE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
//添加 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION, TAG, true, this
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG)
|
||||
}
|
||||
|
||||
override fun updateBizView(type: String, lock: Boolean) {
|
||||
when (type) {
|
||||
FuncBizConfig.BIZ_BEAUTY_MODE -> {
|
||||
tbDemoMode.isClickable = !lock
|
||||
if (lock) {
|
||||
tbDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
}
|
||||
FuncBizConfig.BIZ_RAIN_MODE -> {
|
||||
tbRainMode.isClickable = !lock
|
||||
if (lock) {
|
||||
tbRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
}
|
||||
FuncBizConfig.BIZ_PNC_WARNING -> {
|
||||
tbMarkingObstacles.isClickable = !lock
|
||||
if (lock) {
|
||||
tbMarkingObstacles.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbMarkingObstacles.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.takeover
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
class TakeOverView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_take_over, this, true)
|
||||
}
|
||||
}
|
||||
@@ -2,32 +2,35 @@ package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Process
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.temp.EventLogout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_auto_pilot_check.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
/**
|
||||
* @author ChenFufeng
|
||||
@@ -57,15 +60,13 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
|
||||
companion object {
|
||||
private var maxAcceleration: Double = 2.0
|
||||
private var speedLimit: Double = 0.0
|
||||
private var speedLimit: Int = 0
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private fun initView() {
|
||||
background = ColorDrawable(Color.parseColor("#F0151D41"))
|
||||
if (keyBoardUtil == null) {
|
||||
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)
|
||||
}
|
||||
|
||||
keyBoardUtil?.setActionListener { inputContent ->
|
||||
inputContent.toIntOrNull()?.let { speed ->
|
||||
when {
|
||||
@@ -74,10 +75,6 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
ToastUtils.showShort("超过最大限速值60,设置失败")
|
||||
}
|
||||
else -> {
|
||||
llSpeedPosition.background =
|
||||
resources.getDrawable(R.drawable.pilot_speed_bg)
|
||||
keyBoardUtil?.hideKeyboard()
|
||||
etInputSpeed.clearFocus()
|
||||
// 设置自动驾驶速度
|
||||
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speed)
|
||||
when {
|
||||
@@ -92,10 +89,15 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
KeyBoardUtil.hideSystemSoftKeyboard(context, etInputSpeed)
|
||||
ivCloseIcon.setOnClickListener {
|
||||
clickListener?.onClose(it)
|
||||
}
|
||||
rlKillLayout.setOnClickListener {
|
||||
killApp()
|
||||
}
|
||||
sopLayout.setOnClickListener {
|
||||
clickListener?.showSOPSettingView()
|
||||
}
|
||||
viewCheckStatus.setOnClickListener {
|
||||
clickListener?.go2CheckPage()
|
||||
}
|
||||
@@ -105,59 +107,90 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
ivDebugFeedback.onClick {
|
||||
clickListener?.showFeedbackView()
|
||||
}
|
||||
etInputSpeed.setOnFocusChangeListener { v, hasFocus ->
|
||||
when {
|
||||
hasFocus -> {
|
||||
llSpeedPosition.background =
|
||||
resources.getDrawable(R.drawable.pilot_speed_high_light_bg)
|
||||
if (keyBoardUtil == null) {
|
||||
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)
|
||||
}
|
||||
keyBoardUtil?.showKeyboard()
|
||||
}
|
||||
else -> llSpeedPosition.background =
|
||||
resources.getDrawable(R.drawable.pilot_speed_bg)
|
||||
}
|
||||
}
|
||||
etInputSpeed.setOnTouchListener { v, event ->
|
||||
var curTime = System.currentTimeMillis()
|
||||
if (curTime - lastTime < 1000) {
|
||||
return@setOnTouchListener true
|
||||
}
|
||||
if (!connectStatus) {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
keyBoardUtil?.hideKeyboard()
|
||||
return@setOnTouchListener true
|
||||
} else {
|
||||
return@setOnTouchListener false
|
||||
}
|
||||
}
|
||||
updateSpeedSettingViews()
|
||||
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
CallerAutoPilotManager.getCarConfig()
|
||||
}
|
||||
if (maxAcceleration > 0) {
|
||||
tvAcceleration.text = "加速度 $maxAcceleration m/s²"
|
||||
}
|
||||
// if (maxAcceleration > 0) {
|
||||
// tvAcceleration.text = "加速度 $maxAcceleration m/s²"
|
||||
// }
|
||||
tvAcceleration.text = "每次调整车速±5km/h,点击确定生效"
|
||||
if (speedLimit > 0) {
|
||||
etInputSpeed.setText((speedLimit * 3.6).toInt().toString())
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}else{
|
||||
tvSpeed.text = "0"
|
||||
}
|
||||
// // 比如需要设置默认速度
|
||||
// val speed = "30"
|
||||
// etInputSpeed.setText(speed)
|
||||
// etInputSpeed.setSelection(speed.length)
|
||||
|
||||
ivSpeedReduce.setOnClickListener {
|
||||
if(speedLimit>=5){
|
||||
speedLimit -= 5
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}else{
|
||||
ToastUtils.showShort("车速不能再减了")
|
||||
}
|
||||
}
|
||||
|
||||
ivSpeedAdd.setOnClickListener {
|
||||
if(speedLimit<=55){
|
||||
speedLimit += 5
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}else{
|
||||
ToastUtils.showShort("车速不能再加了")
|
||||
}
|
||||
}
|
||||
|
||||
//速度确认
|
||||
tvSureModify.setOnClickListener {
|
||||
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit)
|
||||
when {
|
||||
isSuccess -> {
|
||||
//速度显示
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
initOchView()
|
||||
}
|
||||
|
||||
private fun initOchView() {
|
||||
actvLoginout.onClick {
|
||||
EventBus.getDefault().post(EventLogout())
|
||||
}
|
||||
actvLoginout.visibility = View.VISIBLE
|
||||
CallerHmiManager.setBusOperationView(toolBusOperationView)
|
||||
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
//出租车司机
|
||||
}
|
||||
"fPadLenovoOchBus" ->{
|
||||
//小巴车司机
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun killApp() {
|
||||
Intent(Intent.ACTION_MAIN).apply {
|
||||
addCategory(Intent.CATEGORY_HOME)
|
||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
context.startActivity(this)
|
||||
Process.killProcess(Process.myPid())
|
||||
exitProcess(0)
|
||||
}
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
private fun updateSpeedSettingViews() {
|
||||
tvSpeedTitle.visibility = View.VISIBLE
|
||||
llSpeedPosition.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
fun showAdUpgradeStatus(ipcUpgradeStateInfo: IPCUpgradeStateInfo) {
|
||||
systemVersionView?.showAdUpgradeStatus(ipcUpgradeStateInfo)
|
||||
}
|
||||
@@ -184,19 +217,20 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
fun onClose(v: View)
|
||||
fun showDebugPanelView()
|
||||
fun showFeedbackView()
|
||||
fun showSOPSettingView()
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
UiThreadHandler.post {
|
||||
tvAcceleration?.let {
|
||||
maxAcceleration = carConfigResp.maxAcceleration
|
||||
speedLimit = carConfigResp.speedLimit
|
||||
tvAcceleration.text = "加速度 ${carConfigResp.maxAcceleration} m/s²"
|
||||
etInputSpeed.setText((carConfigResp.speedLimit * 3.6).toInt().toString())
|
||||
AppConfigInfo.plateNumber = carConfigResp.plateNumber//车牌号
|
||||
AppConfigInfo.iPCMacAddress = carConfigResp.macAddress//工控机MAC地址
|
||||
AppConfigInfo.protocolVersionNumber = carConfigResp.protocolVersionValue//工控机协议版本
|
||||
}
|
||||
// tvAcceleration?.let {
|
||||
// maxAcceleration = carConfigResp.maxAcceleration
|
||||
// speedLimit = carConfigResp.speedLimit
|
||||
//// tvAcceleration.text = "加速度 ${carConfigResp.maxAcceleration} m/s²"
|
||||
// tvSpeed.text = (carConfigResp.speedLimit * 3.6).toInt().toString()
|
||||
// }
|
||||
maxAcceleration = carConfigResp.maxAcceleration
|
||||
speedLimit = (carConfigResp.speedLimit * 3.6).toInt()
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import kotlinx.android.synthetic.main.view_och_bus_operation.view.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/8/23
|
||||
*/
|
||||
class BusOperationView @JvmOverloads constructor(
|
||||
context: Context?,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0)
|
||||
: IOchBusView(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_och_bus_operation,this,true)
|
||||
context?.let {
|
||||
actvAccountPhone.text = phoneMask(SharedPrefs.getInstance(it).getString("och_account",""))
|
||||
}
|
||||
}
|
||||
|
||||
override fun showBusOperation() {
|
||||
ochBusOperationStatus.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changerOperationStatus(isOut: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
context?.let {
|
||||
actvAccountPhone.text = phoneMask(SharedPrefs.getInstance(it).getString("och_account",""))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户电话号码的打码隐藏加星号加*
|
||||
* 一般都是中间四位
|
||||
* @return 处理完成的手机号码
|
||||
*/
|
||||
fun phoneMask(phone: String?): String? {
|
||||
var res = ""
|
||||
if (!StringUtils.isEmpty(phone)&&phone?.length==11) {
|
||||
val stringBuilder = StringBuilder(phone)
|
||||
res = stringBuilder.replace(3, 7, "****").toString()
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* 蒙层view
|
||||
*/
|
||||
class MaskView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
) {
|
||||
|
||||
private val TAG = "MaskView"
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_mask, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private var speedLimit: Double = 0.0
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private fun initView() {
|
||||
// background = ColorDrawable(Color.parseColor("#F0151D41"))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.BatteryManager
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
class BatteryGroupView : LinearLayout, IMoGoSkinModeChangeListener {
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : super(context, attrs, defStyleAttr) {
|
||||
}
|
||||
|
||||
private var batteryHandler: BatteryHandler = BatteryHandler(this)
|
||||
private var view: View =
|
||||
LayoutInflater.from(context).inflate(R.layout.view_battery_group, this, true)
|
||||
private var batteryView: BatteryView = (view as BatteryGroupView).findViewById(R.id.viewBattery)
|
||||
private var ivBatteryCharge: ImageView = (view as BatteryGroupView).findViewById(R.id.ivBatteryCharge)
|
||||
private var mSkinMode = 0
|
||||
|
||||
private val batteryStateReceiver: BroadcastReceiver = object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
when (intent.action) {
|
||||
Intent.ACTION_BATTERY_CHANGED -> {
|
||||
val level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0)
|
||||
val scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, 0)
|
||||
val charge = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1)
|
||||
val percentage = (level * 100) / scale
|
||||
val message = Message.obtain()
|
||||
message.what = 0
|
||||
message.arg1 = percentage
|
||||
message.arg2 = charge
|
||||
batteryHandler.sendMessage(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
const val TAG = "BatteryGroupView"
|
||||
|
||||
class BatteryHandler(batteryGroupView: BatteryGroupView) : Handler() {
|
||||
|
||||
//虚引用
|
||||
private var stateViewWeakReference: WeakReference<BatteryGroupView>? = null
|
||||
|
||||
init {
|
||||
stateViewWeakReference = WeakReference(batteryGroupView)
|
||||
}
|
||||
|
||||
override fun handleMessage(msg: Message) {
|
||||
super.handleMessage(msg)
|
||||
val batteryGroupView = stateViewWeakReference?.get()
|
||||
batteryGroupView?.let {
|
||||
if (msg.what == 0) {
|
||||
it.batteryView.setPower(msg.arg1)
|
||||
val isCharging = msg.arg2 == BatteryManager.BATTERY_STATUS_CHARGING ||
|
||||
msg.arg2 == BatteryManager.BATTERY_STATUS_FULL
|
||||
it.batteryView.setCharging(isCharging)
|
||||
if (isCharging) {
|
||||
it.ivBatteryCharge.visibility = View.VISIBLE
|
||||
when(it.mSkinMode){
|
||||
0 -> it.ivBatteryCharge.setImageResource(R.drawable.battery_charge_light)
|
||||
1 -> it.ivBatteryCharge.setImageResource(R.drawable.battery_charge_dark)
|
||||
}
|
||||
} else {
|
||||
it.ivBatteryCharge.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val intentFilter = IntentFilter()
|
||||
intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED)
|
||||
context.registerReceiver(batteryStateReceiver, intentFilter)
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
context.unregisterReceiver(batteryStateReceiver)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
mSkinMode = skinMode
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
import android.graphics.RectF
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlin.math.abs
|
||||
|
||||
|
||||
class BatteryView : View , IMoGoSkinModeChangeListener {
|
||||
|
||||
companion object{
|
||||
const val TAG = "BatteryView"
|
||||
}
|
||||
|
||||
private val radius = context.resources.getDimension(R.dimen.dp_4) // 圆角角度
|
||||
private val border = context.resources.getDimension(R.dimen.dp_3) // 外边缘宽度
|
||||
private val margin = context.resources.getDimension(R.dimen.dp_6) // 边框与内部电量距离
|
||||
private val width = context.resources.getDimension(R.dimen.dp_57) // 电池宽度
|
||||
private val height = context.resources.getDimension(R.dimen.dp_28) // 电池高度
|
||||
private val headWidth = context.resources.getDimension(R.dimen.dp_3) // 电池头宽度
|
||||
private val headHeight = context.resources.getDimension(R.dimen.dp_8) // 电池头高度
|
||||
private val headRadius = context.resources.getDimension(R.dimen.dp_1) // 电池头圆角角度
|
||||
private val batteryNumSize = context.resources.getDimension(R.dimen.dp_20) // 电量显示文字大小
|
||||
private var batteryColor = context.resources.getColor(R.color.color_27FFFFFF) // 电量内部颜色
|
||||
private var powerColor = Color.WHITE
|
||||
|
||||
//默认满电
|
||||
private var mPower = 100
|
||||
|
||||
//是否充电
|
||||
private var mIsCharging = false
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null
|
||||
) : super(context, attrs, 0) {
|
||||
|
||||
}
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : super(context, attrs, defStyleAttr) {
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||
setMeasuredDimension(width.toInt(), height.toInt())
|
||||
}
|
||||
|
||||
@SuppressLint("DrawAllocation")
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
//电池头
|
||||
val paint = Paint()
|
||||
paint.style = Paint.Style.FILL
|
||||
paint.strokeWidth = 0f
|
||||
paint.isAntiAlias = true
|
||||
paint.color = powerColor
|
||||
|
||||
val rectHead =
|
||||
RectF(width - headWidth, (height - headHeight) / 2, width, (height + headHeight) / 2)
|
||||
canvas.drawRoundRect(rectHead, headRadius, headRadius, paint)
|
||||
|
||||
//边框
|
||||
paint.strokeWidth = border
|
||||
paint.style = Paint.Style.STROKE
|
||||
val rectF =
|
||||
RectF(radius / 2, radius / 2, width - headWidth - radius / 2, height - radius / 2)
|
||||
canvas.drawRoundRect(rectF, radius, radius, paint)
|
||||
|
||||
//文字画笔
|
||||
val textPaint = Paint()
|
||||
textPaint.color = powerColor
|
||||
textPaint.isAntiAlias = true
|
||||
textPaint.textSize = batteryNumSize
|
||||
textPaint.textAlign = Paint.Align.CENTER
|
||||
//画数字
|
||||
val fontMetrics = textPaint.fontMetrics
|
||||
canvas.drawText(mPower.toString(), rectF.centerX(), abs(fontMetrics.top), textPaint)
|
||||
|
||||
//电池电量
|
||||
val powerValues = mPower / 100.0f
|
||||
val paintPower = Paint(paint)
|
||||
paintPower.style = Paint.Style.FILL
|
||||
|
||||
//低电量
|
||||
val lowerPaint = Paint(paint)
|
||||
lowerPaint.style = Paint.Style.FILL
|
||||
lowerPaint.color = powerColor
|
||||
if (mPower < 20) {
|
||||
lowerPaint.color = Color.RED
|
||||
} else {
|
||||
lowerPaint.color = batteryColor
|
||||
}
|
||||
|
||||
//画电量
|
||||
if (powerValues != 0f) {
|
||||
val right = (width - margin - headWidth) * powerValues
|
||||
val bottom = height - margin
|
||||
val rect = RectF(margin, margin, right, bottom)
|
||||
//画矩形
|
||||
canvas.drawRoundRect(rect, radius, radius, lowerPaint)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前电量
|
||||
*/
|
||||
fun setPower(power: Int) {
|
||||
if (this.mPower < 0) {
|
||||
this.mPower = 0
|
||||
}
|
||||
if (this.mPower > 100) {
|
||||
this.mPower = 100
|
||||
}
|
||||
this.mPower = power
|
||||
if(isAttachedToWindow){
|
||||
invalidate()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否充电中
|
||||
*/
|
||||
fun setCharging(charging: Boolean) {
|
||||
this.mIsCharging = charging
|
||||
invalidate()
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
when (skinMode) {
|
||||
0 -> {
|
||||
batteryColor = resources.getColor(R.color.color_27FFFFFF)
|
||||
powerColor = Color.WHITE
|
||||
}
|
||||
1 -> {
|
||||
batteryColor = resources.getColor(R.color.color_1E111111)
|
||||
powerColor = resources.getColor(R.color.color_2C2E30)
|
||||
}
|
||||
}
|
||||
invalidate()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.RelativeLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
/**
|
||||
* 魔戒蓝牙控件
|
||||
* 放置于StatusBar右侧位置
|
||||
*/
|
||||
class BlueToothView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : RelativeLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_blue_tooth, this, true)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import android.content.res.TypedArray
|
||||
import android.graphics.*
|
||||
import android.util.AttributeSet
|
||||
import android.util.DisplayMetrics
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.view.animation.OvershootInterpolator
|
||||
@@ -81,7 +80,6 @@ class CircularProgressView @JvmOverloads constructor(
|
||||
mRectF = RectF(mRectL.toFloat(), mRectT.toFloat(), (mRectL + mRectLength).toFloat(),
|
||||
(mRectT + mRectLength).toFloat())
|
||||
|
||||
Log.d(TAG, "onMeasure:" + mRectF.toString() + "," + "width:" + measuredWidth.toString() + "," + "PaddingLeft:" + getPaddingLeft().toString())
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,7 +105,6 @@ class CircularProgressView @JvmOverloads constructor(
|
||||
|
||||
override fun onDraw(canvas: Canvas?) {
|
||||
super.onDraw(canvas)
|
||||
Log.d(TAG, "onDraw")
|
||||
canvas?.let {
|
||||
mRectF?.let { it1 -> it.drawArc(it1, 0.0f, 360.0f, false, mBackPaint) }
|
||||
mRectF?.let { it1 ->
|
||||
@@ -154,7 +151,6 @@ class CircularProgressView @JvmOverloads constructor(
|
||||
val animator = ValueAnimator.ofInt(mProgress, progress)
|
||||
animator.addUpdateListener {
|
||||
mProgress = it.animatedValue as Int
|
||||
Log.d(TAG, "setProgress" + mProgress.toString())
|
||||
invalidate()
|
||||
}
|
||||
animator.interpolator = LinearInterpolator()
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.RelativeLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
/**
|
||||
* 演示模式控件
|
||||
* 放置于StatusBar右侧位置
|
||||
*/
|
||||
class DemoModeView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : RelativeLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_demo_mode, this, true)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +1,15 @@
|
||||
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.FrameLayout
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import android.content.*
|
||||
import android.util.*
|
||||
import android.view.*
|
||||
import android.widget.*
|
||||
import com.mogo.commons.*
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.MogoMarkerManager
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.constants.DataTypes
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.*
|
||||
import com.mogo.map.*
|
||||
import com.mogo.map.uicontroller.*
|
||||
import com.mogo.module.common.constants.*
|
||||
import kotlinx.android.synthetic.main.view_perspective_switch.view.*
|
||||
|
||||
/**
|
||||
@@ -34,15 +32,20 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
override fun onClick(v: View?) {
|
||||
//切换地图的远近视图
|
||||
if (MogoMapUIController.getInstance().currentMapVisualAngle.isLongSight) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.visibleAllMarkers()
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .visibleAllMarkers()
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
} else if (MogoMapUIController.getInstance().currentMapVisualAngle.isMediumSight) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS)
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS)
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_faster)
|
||||
} else {
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .visibleAllMarkers()
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -49,7 +50,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
|
||||
super.showWarningTrafficLight(checkLightId,lightSource)
|
||||
mCurrentLightId = checkLightId
|
||||
updateTrafficLightIcon(checkLightId,lightSource)
|
||||
if(!HmiBuildConfig.isShowTrafficLightView){
|
||||
updateTrafficLightIcon(checkLightId,lightSource)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.*
|
||||
import android.location.Location
|
||||
import android.util.AttributeSet
|
||||
import android.util.*
|
||||
import android.view.Gravity
|
||||
import android.widget.FrameLayout
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.*
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import java.util.*
|
||||
@@ -38,6 +38,11 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
|
||||
var mSpeedLimmit = 60;
|
||||
|
||||
|
||||
private val timer by lazy {
|
||||
Timer()
|
||||
}
|
||||
|
||||
init {
|
||||
initEvent(context)
|
||||
|
||||
@@ -61,29 +66,30 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private val timerTask = object : TimerTask() {
|
||||
override fun run() {
|
||||
if (mLatLng != null) {
|
||||
mSpeedLimmit = MogoMapUIController.getInstance()
|
||||
.getLimitSpeed(mLatLng!!.longitude, mLatLng!!.latitude, mLatLng!!.bearing)
|
||||
UiThreadHandler.post {
|
||||
val speed = (mLatLng!!.speed * 3.6f).toInt()
|
||||
mSpeedChartView.setArcColor(Color.parseColor(if (speed > mSpeedLimmit) "#DB3137" else "#3E77F6"))
|
||||
mSpeedChartView.setValues(speed)
|
||||
setBackgroundResource(if (speed > mSpeedLimmit) R.drawable.yi_biao_pan_bg_speeding else R.drawable.yi_biao_pan_bg_nor)
|
||||
private var timerTask : TimerTask? = null
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow() // 注册位置回调
|
||||
mMogoServiceApis.registerCenterApi.registerCarLocationChangedListener(TAG, this)
|
||||
// 开启定时查询速度
|
||||
timerTask?.cancel()
|
||||
val task = object : TimerTask() {
|
||||
override fun run() {
|
||||
if (mLatLng != null) {
|
||||
|
||||
mSpeedLimmit = MogoMapUIController.getInstance()
|
||||
.getLimitSpeed(mLatLng!!.longitude, mLatLng!!.latitude, mLatLng!!.bearing)
|
||||
UiThreadHandler.post {
|
||||
val speed = (mLatLng!!.speed * 3.6f).toInt()
|
||||
mSpeedChartView.setArcColor(Color.parseColor(if (speed > mSpeedLimmit) "#DB3137" else "#3E77F6"))
|
||||
mSpeedChartView.setValues(speed)
|
||||
setBackgroundResource(if (speed > mSpeedLimmit) R.drawable.yi_biao_pan_bg_speeding else R.drawable.yi_biao_pan_bg_nor)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
// 注册位置回调
|
||||
mMogoServiceApis.registerCenterApi
|
||||
.registerCarLocationChangedListener(TAG, this)
|
||||
|
||||
// 开启定时查询速度
|
||||
Timer().schedule(timerTask, Date(), 100)
|
||||
this.timerTask = task
|
||||
timer.schedule(task, Date(), 100)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -92,7 +98,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
mMogoServiceApis.registerCenterApi
|
||||
.unregisterMogoLocationListener(TAG)
|
||||
try {
|
||||
timerTask.cancel()
|
||||
timerTask?.cancel()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RelativeLayout
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ScreenUtils
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
|
||||
class StatusBarView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : RelativeLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "StatusBarView"
|
||||
}
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_status_bar, this, true)
|
||||
}
|
||||
|
||||
private val rightViewList = CopyOnWriteArrayList<String>()
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val layoutParamsLeft =
|
||||
LayoutParams(ScreenUtils.getScreenWidth() / 3, BarUtils.getStatusBarHeight())
|
||||
viewStatusBarLeft.layoutParams = layoutParamsLeft
|
||||
val layoutParamsRight =
|
||||
LayoutParams(ScreenUtils.getScreenWidth() / 3 * 2, BarUtils.getStatusBarHeight())
|
||||
layoutParamsRight.addRule(ALIGN_PARENT_END)
|
||||
layoutParamsRight.addRule(CENTER_HORIZONTAL)
|
||||
layoutParamsRight.addRule(CENTER_IN_PARENT)
|
||||
layoutParamsRight.marginEnd = context.resources.getDimension(R.dimen.dp_44).toInt()
|
||||
viewStatusBarRight.layoutParams = layoutParamsRight
|
||||
viewStatusBarRight.addView(BatteryGroupView(this.context))
|
||||
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
when (skinMode) {
|
||||
0 -> setStatusBarDarkOrLight(false)
|
||||
1 -> setStatusBarDarkOrLight(true)
|
||||
}
|
||||
}
|
||||
|
||||
fun setStatusBarDarkOrLight(light: Boolean) {
|
||||
if (light) {
|
||||
setTextColor(resources.getColor(R.color.color_2C2E30))
|
||||
} else {
|
||||
setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
}
|
||||
}
|
||||
|
||||
fun updateRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
if (insert) {
|
||||
rightViewList.add(0, tag)
|
||||
viewStatusBarRight.addView(viewGroup, 0)
|
||||
} else {
|
||||
rightViewList.forEachIndexed { index, s ->
|
||||
if (s == tag) {
|
||||
rightViewList.removeAt(index)
|
||||
viewStatusBarRight.removeViewAt(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setTextColor(color: Int) {
|
||||
viewTextClock.setTextColor(color)
|
||||
viewStatusBarTag.setTextColor(color)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
import android.content.Context;
|
||||
import android.graphics.BlurMaskFilter;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.animation.RotateAnimation;
|
||||
@@ -54,12 +53,10 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
|
||||
public SteeringWheelView(@NonNull Context context) {
|
||||
super(context);
|
||||
Log.d(TAG, "1");
|
||||
}
|
||||
|
||||
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
Log.d(TAG, "2");
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this);
|
||||
} else {
|
||||
@@ -94,12 +91,10 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
|
||||
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
Log.d(TAG, "3");
|
||||
}
|
||||
|
||||
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
Log.d(TAG, "4");
|
||||
}
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener() {
|
||||
@@ -127,7 +122,6 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
int state = autopilotStatusInfo.getState();
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "state = %s", state);
|
||||
if (autopilotIV != null) {
|
||||
Log.d(TAG, "autopilotIV != null");
|
||||
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
// TODO
|
||||
@@ -151,7 +145,7 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "autopilotIV=null");
|
||||
CallerLogger.INSTANCE.d(TAG, "autopilotIV=null");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -192,7 +186,6 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotLightSwitchData(@org.jetbrains.annotations.Nullable Chassis.LightSwitch lightSwitch) {
|
||||
Log.d(TAG, "车辆转向灯:" + lightSwitch.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,7 +194,6 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotBrakeLightData(boolean brakeLight) {
|
||||
Log.d(TAG, "刹车灯:" + String.valueOf(brakeLight));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,7 +211,6 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotSteeringData(float steering) {
|
||||
Log.d(TAG, "steering原始值====" + String.valueOf(steering));
|
||||
if (Math.abs(steering) < 1) {
|
||||
steering = 0;
|
||||
}
|
||||
@@ -227,7 +218,6 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.d(TAG, "steering忽略小数点后====" + String.valueOf((int) steeringValue));
|
||||
if (steeringTVL != null && steeringValue > 0) {
|
||||
steeringTVR.setVisibility(View.INVISIBLE);
|
||||
steeringTVL.setVisibility(View.VISIBLE);
|
||||
@@ -237,7 +227,7 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
steeringTVR.setVisibility(View.VISIBLE);
|
||||
steeringTVR.setText(String.valueOf((int) -steeringValue) + "°");
|
||||
} else {
|
||||
Log.d(TAG, "onAutopilotSteeringData error");
|
||||
CallerLogger.INSTANCE.d(TAG, "onAutopilotSteeringData error");
|
||||
}
|
||||
animationWithSteeringData(-steeringValue);
|
||||
if (steeringCircularV != null) {
|
||||
@@ -260,7 +250,7 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.d(TAG, "乘客屏档位" + gear.toString());
|
||||
CallerLogger.INSTANCE.d(TAG, "乘客屏档位" + gear.toString());
|
||||
if (tapPositionView != null) {
|
||||
tapPositionView.updateWithGear(gear);
|
||||
}
|
||||
@@ -288,7 +278,6 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
* @param steering
|
||||
*/
|
||||
private void animationWithSteeringData(float steering) {
|
||||
Log.d(TAG, "方向盘转动" + String.valueOf(steering));
|
||||
rotateAnimation = new RotateAnimation(fromDegrees, steering,
|
||||
RotateAnimation.RELATIVE_TO_SELF, 0.5f,
|
||||
RotateAnimation.RELATIVE_TO_SELF, 0.5f);
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.mogo.eagle.core.function.call.bindingcar.CallerBindingCarListenerMana
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
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.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import static com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
@@ -15,7 +17,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -24,6 +26,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
@@ -60,7 +63,7 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
accTextView.setText("- " + accStr);
|
||||
}
|
||||
int state = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState();
|
||||
if (state < 2) {
|
||||
if (state < STATUS_AUTOPILOT_RUNNING) {
|
||||
if (mBrake > 0) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_brake);
|
||||
} else if (mThrottle >= 0 && mBrake == 0) {
|
||||
@@ -99,11 +102,7 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
super.onAttachedToWindow();
|
||||
handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L);
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener);
|
||||
CallerAutopilotCarStatusListenerManager.INSTANCE.addListener(TAG, gnssInfo -> {
|
||||
if (gnssInfo != null) {
|
||||
acceleration = gnssInfo.getAcceleration();
|
||||
}
|
||||
});
|
||||
CallerAutopilotPlanningActionsListenerManager.INSTANCE.addListener(TAG, planningActionMsg -> acceleration = planningActionMsg.getDestinationAcc());
|
||||
}
|
||||
|
||||
private void initView(@NonNull Context context) {
|
||||
@@ -119,7 +118,7 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerAutopilotCarStatusListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerAutopilotPlanningActionsListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.RelativeLayout
|
||||
@@ -53,7 +52,6 @@ class V2XWarningView @JvmOverloads constructor(
|
||||
* @param closeTime 倒计时
|
||||
*/
|
||||
fun showWarning(direction: WarningDirectionEnum, closeTime: Long) {
|
||||
Log.d(TAG, "预警红边:预警方向->$direction 预警倒计时->$closeTime")
|
||||
UiThreadHandler.post {
|
||||
// 如果传入的不是关闭显示,则设置倒计时,定时关闭红框警示
|
||||
if (direction != ALERT_WARNING_NON) {
|
||||
|
||||
@@ -26,12 +26,17 @@ class VipIdentificationView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val lp = this.layoutParams as LayoutParams
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_bus).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_bus).toInt()
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_bus_passenger).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_passenger).toInt()
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_taxi_passenger).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_passenger).toInt()
|
||||
} else {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_taxi).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_taxi).toInt()
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top).toInt()
|
||||
}
|
||||
this.layoutParams = lp
|
||||
invalidate()
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.net.wifi.WifiManager
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
|
||||
class WifiStateView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : AppCompatImageView(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "WifiStateView"
|
||||
|
||||
class WifiHandler(wifiStateView: WifiStateView) : Handler() {
|
||||
|
||||
//虚引用
|
||||
private var stateViewWeakReference: WeakReference<WifiStateView>? = null
|
||||
|
||||
init {
|
||||
stateViewWeakReference = WeakReference(wifiStateView)
|
||||
}
|
||||
|
||||
override fun handleMessage(msg: Message) {
|
||||
super.handleMessage(msg)
|
||||
val wifiStateView = stateViewWeakReference?.get()
|
||||
wifiStateView?.updateView(msg.what) {
|
||||
wifiStateView.setImageResource(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var wifiManager: WifiManager? = null
|
||||
private var wifiHandler: WifiHandler? = null
|
||||
|
||||
@Volatile
|
||||
private var mSkinMode: Int = 0
|
||||
|
||||
@Volatile
|
||||
private var level: Int = 0
|
||||
|
||||
init {
|
||||
wifiManager =
|
||||
context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
|
||||
wifiHandler = WifiHandler(this)
|
||||
}
|
||||
|
||||
private val wifiStateReceiver: BroadcastReceiver = object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
when (intent.action) {
|
||||
WifiManager.WIFI_STATE_CHANGED_ACTION, WifiManager.RSSI_CHANGED_ACTION -> {
|
||||
if (wifiManager!!.wifiState == WifiManager.WIFI_STATE_DISABLED
|
||||
|| wifiManager!!.wifiState == WifiManager.WIFI_STATE_DISABLING
|
||||
) {
|
||||
wifiHandler?.sendEmptyMessage(-1)
|
||||
return
|
||||
}
|
||||
val wifiInfo = wifiManager!!.connectionInfo
|
||||
level = WifiManager.calculateSignalLevel(wifiInfo.rssi, 5)
|
||||
wifiHandler?.sendEmptyMessage(level)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val intentFilter = IntentFilter()
|
||||
//Wifi连接状态变化
|
||||
intentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION)
|
||||
//Wifi信号强度变化
|
||||
intentFilter.addAction(WifiManager.RSSI_CHANGED_ACTION)
|
||||
context.registerReceiver(wifiStateReceiver, intentFilter)
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
wifiHandler?.removeCallbacksAndMessages(null)
|
||||
context.unregisterReceiver(wifiStateReceiver)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
mSkinMode = skinMode
|
||||
wifiHandler?.sendEmptyMessage(level)
|
||||
}
|
||||
|
||||
fun updateView(wifiState: Int, resId: ((Int) -> Unit)) {
|
||||
when (mSkinMode) {
|
||||
0 -> {
|
||||
when (wifiState) {
|
||||
-1 -> resId.invoke(R.drawable.wifi_light_state_close)
|
||||
0 -> resId.invoke(R.drawable.wifi_light_state_one)
|
||||
1 -> resId.invoke(R.drawable.wifi_light_state_two)
|
||||
2 -> resId.invoke(R.drawable.wifi_light_state_three)
|
||||
3 -> resId.invoke(R.drawable.wifi_light_state_four)
|
||||
4 -> resId.invoke(R.drawable.wifi_light_state_five)
|
||||
}
|
||||
}
|
||||
1 -> {
|
||||
when (wifiState) {
|
||||
-1 -> resId.invoke(R.drawable.wifi_light_state_close)
|
||||
0 -> resId.invoke(R.drawable.wifi_dark_state_one)
|
||||
1 -> resId.invoke(R.drawable.wifi_dark_state_two)
|
||||
2 -> resId.invoke(R.drawable.wifi_dark_state_three)
|
||||
3 -> resId.invoke(R.drawable.wifi_dark_state_four)
|
||||
4 -> resId.invoke(R.drawable.wifi_dark_state_five)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mogo.eagle.core.function.main
|
||||
|
||||
import android.app.Application
|
||||
import android.os.Build
|
||||
import com.kwai.koom.base.CommonConfig
|
||||
import com.kwai.koom.base.InitTask
|
||||
import com.kwai.koom.base.MonitorManager
|
||||
|
||||
object KoomInitTask : InitTask {
|
||||
override fun init(application: Application) {
|
||||
val config = CommonConfig.Builder()
|
||||
.setApplication(application) // Set application
|
||||
.setDebugMode(false)
|
||||
.setVersionNameInvoker { "1.0.0" } // Set version name, java leak feature use it
|
||||
.setSdkVersionMatch(
|
||||
Build.VERSION.SDK_INT <= 31 && Build.VERSION.SDK_INT
|
||||
>= Build.VERSION_CODES.LOLLIPOP
|
||||
) // Set if current sdk version is supported
|
||||
.build()
|
||||
|
||||
MonitorManager.initCommonConfig(config)
|
||||
.apply { onApplicationCreate() }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.mogo.eagle.core.function.main;
|
||||
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_RECORD_NATIVE_LEAK;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LEAK;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_NATIVE_LEAK;
|
||||
import static com.mogo.eagle.core.function.main.MainPresenter.MOGO_PERMISSION_REQUEST_CODE;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
|
||||
|
||||
@@ -8,7 +11,9 @@ import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -19,8 +24,12 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.commons.BuildConfig;
|
||||
import com.kwai.koom.base.MonitorManager;
|
||||
import com.kwai.koom.nativeoom.leakmonitor.LeakMonitor;
|
||||
import com.kwai.koom.nativeoom.leakmonitor.LeakMonitorConfig;
|
||||
import com.kwai.koom.nativeoom.leakmonitor.LeakRecord;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.BaseFragment;
|
||||
import com.mogo.commons.mvp.MvpActivity;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
@@ -31,6 +40,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView;
|
||||
import com.mogo.eagle.core.function.main.cards.MogoModulesManager;
|
||||
import com.mogo.eagle.core.function.main.service.MogoMainService;
|
||||
import com.mogo.eagle.core.function.main.stagetwo.AutopilotStartup;
|
||||
@@ -40,6 +50,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.permissions.PermissionsDialogUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper;
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.map.listener.IMogoHosListenerRegister;
|
||||
@@ -54,6 +65,8 @@ import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.rousetime.android_startup.StartupManager;
|
||||
import com.rousetime.android_startup.model.LoggerLevel;
|
||||
import com.rousetime.android_startup.model.StartupConfig;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
import com.zhjt.service.chain.TracingConstants;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -106,6 +119,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
injectStatusBar();
|
||||
getWindow().setBackgroundDrawable(null);
|
||||
|
||||
mFloatingLayout = findViewById(R.id.module_main_id_floating_view);
|
||||
@@ -126,6 +140,24 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
}
|
||||
}
|
||||
|
||||
private void injectStatusBar() {
|
||||
FrameLayout decorView =(FrameLayout) this.getWindow().getDecorView();
|
||||
View contentView = ((ViewGroup)decorView.findViewById(android.R.id.content)).getChildAt(0);
|
||||
contentView.setFitsSystemWindows(false);
|
||||
decorView.setClipToPadding(false);
|
||||
|
||||
View statusBarView = decorView.findViewWithTag("status_bar");
|
||||
if (statusBarView == null) {
|
||||
statusBarView = new StatusBarView(this);
|
||||
statusBarView.setTag("status_bar");
|
||||
}
|
||||
FrameLayout.LayoutParams statusBarLP =
|
||||
new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, BarUtils.getStatusBarHeight());
|
||||
statusBarLP.topMargin = 0;
|
||||
statusBarLP.gravity = Gravity.TOP;
|
||||
decorView.addView(statusBarView, statusBarLP);
|
||||
}
|
||||
|
||||
// 隐藏布局
|
||||
protected void hideLayout() {
|
||||
mFloatingLayout.setVisibility(View.GONE);
|
||||
@@ -164,6 +196,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
if (hasFocus) {
|
||||
// 统计代码
|
||||
final Map<String, Object> properties = new HashMap<>();
|
||||
@@ -208,7 +241,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
*/
|
||||
public void startUpInStage2() {
|
||||
StartupConfig config = null;
|
||||
if (BuildConfig.DEBUG) {
|
||||
if (DebugConfig.isDebug()) {
|
||||
config = new StartupConfig.Builder()
|
||||
.setLoggerLevel(LoggerLevel.DEBUG)
|
||||
.setOpenStatistics(true)
|
||||
@@ -274,6 +307,10 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
// 启动一些基本的服务:定位等
|
||||
startBaseService();
|
||||
if (DebugConfig.isDebug()) {
|
||||
// 启动Native内存泄漏监测
|
||||
startLeakMonitor();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,6 +325,42 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
// startService(intentCarcorderService);
|
||||
}
|
||||
|
||||
private void startLeakMonitor() {
|
||||
LeakMonitorConfig leakMonitorConfig = new LeakMonitorConfig.Builder()
|
||||
.setLoopInterval(50000)
|
||||
.setMonitorThreshold(16)
|
||||
.setNativeHeapAllocatedThreshold(0)
|
||||
.setSelectedSoList(new String[]{"libhdmap", "libmap",
|
||||
"libAMapSDK_NAVI_v8_0_1", "libZegoExpressEngine",
|
||||
"libcntts"
|
||||
})
|
||||
.setEnableLocalSymbolic(DebugConfig.isDebug())
|
||||
.setLeakListener(leaks -> {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (!leaks.isEmpty()) {
|
||||
for (LeakRecord leakRecord : leaks) {
|
||||
stringBuilder.append(leakRecord.toString());
|
||||
}
|
||||
printLeakMsg(stringBuilder.toString());
|
||||
}
|
||||
})
|
||||
.build();
|
||||
MonitorManager.addMonitorConfig(leakMonitorConfig);
|
||||
LeakMonitor.INSTANCE.start();
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_NATIVE_LEAK,
|
||||
linkCode = CHAIN_LINK_LEAK,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_RECORD_NATIVE_LEAK,
|
||||
paramIndexes = {0},
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
private void printLeakMsg(String leakRecord) {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "内存泄漏日志如下:\n" + leakRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideCoverUpLayout() {
|
||||
mConnectInfoRV.setVisibility(View.GONE);
|
||||
@@ -388,7 +461,8 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotIpcConnectStatusChanged(int status, @Nullable String reason) { }
|
||||
public void onAutopilotIpcConnectStatusChanged(int status, @Nullable String reason) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotSNRequest() {
|
||||
|
||||
@@ -5,11 +5,17 @@ import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_INIT;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -19,11 +25,18 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.main.moujie.BluetoothMonitorReceiver;
|
||||
import com.mogo.eagle.core.function.main.moujie.ConnectBluetoothEvent;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.rousetime.android_startup.model.CostTimesModel;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
@@ -31,8 +44,15 @@ import com.zhjt.service.chain.TracingConstants;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/**
|
||||
* 针对作为Launcher的情况,做个性化操作
|
||||
@@ -45,12 +65,45 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
private final static Handler handlerV2XEvent = new Handler();
|
||||
private static Runnable runnableV2XEvent;
|
||||
|
||||
private volatile double accelerated;//加速度
|
||||
private Timer timerHorn;
|
||||
private Timer timerAcc;
|
||||
|
||||
private BluetoothMonitorReceiver mBluetoothReceiver = null;
|
||||
private BluetoothAdapter mBluetoothAdapter;
|
||||
// private List<BluetoothDevice> mAreadlyConnectedList = new ArrayList<>();//已连接设备集合
|
||||
private int numberA = 0;
|
||||
private boolean isLongPressA = false;
|
||||
private int numberB = 0;
|
||||
private boolean isLongPressB = false;
|
||||
private int numberC = 0;
|
||||
private boolean isLongPressC = false;
|
||||
private int numberD = 0;
|
||||
private boolean isLongPressD = false;
|
||||
private int numberE = 0;
|
||||
private boolean isLongPressE = false;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
DebugConfig.setNeedRequestUserInfo(true);
|
||||
EventBus.getDefault().register(this);
|
||||
CallerLogger.INSTANCE.i(M_HMI + TAG, "onCreate");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
initBluetooth();
|
||||
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
if (!mBluetoothAdapter.isEnabled()) {
|
||||
mBluetoothAdapter.enable();
|
||||
}
|
||||
mBluetoothAdapter.startDiscovery();
|
||||
showBondedDevice(mBluetoothAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -155,12 +208,209 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
// Log.d("liyz", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
|
||||
String bluetoothName = SharedPrefsMgr.getInstance(getContext()).getString("BLUETOOTH");
|
||||
if (bluetoothName.equals("MINI_KEYBOARD")) {
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_A) { //单击向左变道,长按-1
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
numberA++;
|
||||
if (numberA > 2) {
|
||||
if (!isLongPressA) {
|
||||
ToastUtils.showShort("方块 长按A -2 ");
|
||||
sendAcc(true, -2);
|
||||
isLongPressA = true;
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
if (numberA == 1) {
|
||||
ToastUtils.showShort("方块 点击A -1 ");
|
||||
sendAcc(true, -1);
|
||||
}
|
||||
numberA = 0;
|
||||
isLongPressA = false;
|
||||
}
|
||||
return true;
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_B) { //单击向右变道,长按-2
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
numberB++;
|
||||
if (numberB > 2) {
|
||||
if (!isLongPressB) {
|
||||
ToastUtils.showShort("方块 长按B 无操作 ");
|
||||
isLongPressB = true;
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
if (numberB == 1) {
|
||||
ToastUtils.showShort("方块 单击B 复原 ");
|
||||
sendAcc(false, 0.0);
|
||||
}
|
||||
numberB = 0;
|
||||
isLongPressB = false;
|
||||
}
|
||||
return true;
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_C) { //单击鸣笛,
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
numberC++;
|
||||
if (numberC > 2) {
|
||||
if (!isLongPressC) {
|
||||
ToastUtils.showShort("方块 长按C 无操作");
|
||||
isLongPressC = true;
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
if (numberC == 1) {
|
||||
ToastUtils.showShort("方块 单击C ← 向左变道 ");
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneLeft();
|
||||
}
|
||||
numberC = 0;
|
||||
isLongPressC = false;
|
||||
}
|
||||
return true;
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_D) { //单击开启自动驾驶,
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
numberD++;
|
||||
if (numberD > 2) {
|
||||
if (!isLongPressD) {
|
||||
ToastUtils.showShort("方块 长按D 无操作");
|
||||
isLongPressD = true;
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
if (numberD == 1) {
|
||||
ToastUtils.showShort("方块 单击D → 向右变道 ");
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight();
|
||||
}
|
||||
numberD = 0;
|
||||
isLongPressD = false;
|
||||
}
|
||||
return true;
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_E) { //单击复原,
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
numberE++;
|
||||
if (numberE > 2) {
|
||||
if (!isLongPressE) {
|
||||
ToastUtils.showShort("方块 长按E 鸣笛 ");
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1);
|
||||
if (timerHorn == null) {
|
||||
timerHorn = new Timer();
|
||||
}
|
||||
timerHorn.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(2);
|
||||
timerHorn = null;
|
||||
}
|
||||
}, 500);
|
||||
isLongPressE = true;
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
if (numberE == 1) {
|
||||
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
|
||||
// CallerAutoPilotManager.INSTANCE.setControlAutopilotCarAuto(true);
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
|
||||
}
|
||||
numberE = 0;
|
||||
isLongPressE = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||
|
||||
return super.dispatchTouchEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSkinModeChange(int skinMode) {
|
||||
if (skinMode == 0) {
|
||||
BarUtils.setStatusBarLightMode(this, false);
|
||||
|
||||
}
|
||||
|
||||
private synchronized void sendAcc(boolean isSend, double acc) {
|
||||
if (isSend) {
|
||||
accelerated = acc;
|
||||
if (timerAcc == null) {
|
||||
timerAcc = new Timer();
|
||||
timerAcc.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetAcceleratedSpeed(accelerated);
|
||||
}
|
||||
}, 0, 500);
|
||||
}
|
||||
} else {
|
||||
BarUtils.setStatusBarLightMode(this, true);
|
||||
if (timerAcc != null) {
|
||||
timerAcc.cancel();
|
||||
timerAcc = null;
|
||||
}
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorSetAcceleratedSpeed(acc);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化蓝牙广播
|
||||
*/
|
||||
private void initBluetooth() {
|
||||
this.mBluetoothReceiver = new BluetoothMonitorReceiver();
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
// 监视蓝牙关闭和打开的状态
|
||||
intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
|
||||
|
||||
// 监视蓝牙设备与APP连接的状态
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
|
||||
|
||||
// 注册广播
|
||||
registerReceiver(this.mBluetoothReceiver, intentFilter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找蓝牙连接过的蓝牙设备
|
||||
*
|
||||
*/
|
||||
private void showBondedDevice(BluetoothAdapter bluetoothAdapter) {
|
||||
// mAreadlyConnectedList.clear();
|
||||
Set<BluetoothDevice> deviceList = bluetoothAdapter.getBondedDevices();
|
||||
for (BluetoothDevice device : deviceList) {
|
||||
try {
|
||||
//使用反射调用获取设备连接状态方法
|
||||
Method isConnectedMethod = BluetoothDevice.class.getDeclaredMethod("isConnected", (Class[]) null);
|
||||
isConnectedMethod.setAccessible(true);
|
||||
boolean isConnected = (boolean) isConnectedMethod.invoke(device, (Object[]) null);
|
||||
// mAreadlyConnectedList.add(device);
|
||||
// Log.d("liyz", "-- device.getName() = " + device.getName()); //device.getAddress()
|
||||
if (device.getName().equals("MINI_KEYBOARD")) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putString("BLUETOOTH", device.getName());
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onAutoConnection(ConnectBluetoothEvent event) {
|
||||
// connectBluetooth();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@ import android.os.Process;
|
||||
|
||||
import com.bytedance.boost_multidex.BoostMultiDex;
|
||||
import com.elegant.utils.UiThreadHandler;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.socket.SocketBuildConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
@@ -28,8 +29,12 @@ import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.CpuInfo;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MemInfo;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 默认初始化一些基础服务配置
|
||||
@@ -37,8 +42,6 @@ import java.lang.reflect.Field;
|
||||
public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
|
||||
private static final String TAG = "MogoApplication";
|
||||
// 配置云服务API
|
||||
protected MoGoAiCloudClientConfig clientConfig = MoGoAiCloudClientConfig.getInstance();
|
||||
private long start;
|
||||
|
||||
@Override
|
||||
@@ -54,10 +57,14 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
initCrashConfig();
|
||||
initLogConfig();
|
||||
initTipToast();
|
||||
AIAssist.getInstance(this);
|
||||
initModules();
|
||||
|
||||
if (DebugConfig.isDebug()) {
|
||||
initKoom();
|
||||
}
|
||||
//查询是否有版本的更新
|
||||
queryAppUpgrade();
|
||||
checkMonitorDb();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,7 +79,23 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
public void run() {
|
||||
CallerBindingcarManager.getBindingcarProvider().queryAppUpgrade();
|
||||
}
|
||||
},5000);
|
||||
},9000);
|
||||
}
|
||||
|
||||
private void checkMonitorDb() {
|
||||
new Thread(() -> {
|
||||
long limitId = 50001;
|
||||
List<CpuInfo> cpuList = MonitorDb.getDb(this).monitorDao().getAllCPUById(limitId);
|
||||
List<MemInfo> memList = MonitorDb.getDb(this).monitorDao().getAllMemById(limitId);
|
||||
// 大于5w条清除
|
||||
if (cpuList.size() > 0 || memList.size() > 0) {
|
||||
this.deleteDatabase(MonitorDb.INTERNAL_DB_NAME);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
private void initKoom() {
|
||||
KoomInitTask.INSTANCE.init(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +117,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
}
|
||||
SocketBuildConfig.isPrintLog = false;
|
||||
// 初始化DevaTools,开始链路记录
|
||||
CallerDevaToolsManager.INSTANCE.init(this);
|
||||
CallerDevaToolsManager.INSTANCE.init();
|
||||
}
|
||||
|
||||
private void initOverviewDb() {
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.mogo.eagle.core.function.main.moujie;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2022/7/29
|
||||
*/
|
||||
public class BluetoothMonitorReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
if (action != null) {
|
||||
switch (action) {
|
||||
case BluetoothAdapter.ACTION_STATE_CHANGED:
|
||||
int blueState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, 0);
|
||||
switch (blueState) {
|
||||
case BluetoothAdapter.STATE_TURNING_ON:
|
||||
// Toast.makeText(context, "蓝牙正在打开", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case BluetoothAdapter.STATE_ON:
|
||||
// Toast.makeText(context, "蓝牙已经打开", Toast.LENGTH_SHORT).show();
|
||||
EventBus.getDefault().post(new ConnectBluetoothEvent());
|
||||
break;
|
||||
case BluetoothAdapter.STATE_TURNING_OFF:
|
||||
// Toast.makeText(context, "蓝牙正在关闭", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case BluetoothAdapter.STATE_OFF:
|
||||
// Toast.makeText(context, "蓝牙已经关闭", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case BluetoothDevice.ACTION_ACL_CONNECTED:
|
||||
// Toast.makeText(context, "蓝牙设备已连接", Toast.LENGTH_SHORT).show();
|
||||
// SharedPrefsMgr.getInstance(context).putBoolean("BLUETOOTH", true);
|
||||
break;
|
||||
|
||||
case BluetoothDevice.ACTION_ACL_DISCONNECTED:
|
||||
// SharedPrefsMgr.getInstance(context).putBoolean("BLUETOOTH", false);
|
||||
// Toast.makeText(context, "蓝牙设备已断开", Toast.LENGTH_SHORT).show();
|
||||
EventBus.getDefault().post(new ConnectBluetoothEvent());
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.eagle.core.function.main.moujie;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 连接蓝牙事件
|
||||
* @since 2022/8/16
|
||||
*/
|
||||
public class ConnectBluetoothEvent {
|
||||
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
return START_STICKY;
|
||||
return START_NOT_STICKY;
|
||||
}
|
||||
|
||||
private void initAndStartLocation() {
|
||||
|
||||
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 399 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 387 B |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 640 B |
|
After Width: | Height: | Size: 467 B |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/bus_autopilot_text_color_normal"/>
|
||||
</selector>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/icon_bus_operation_status" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/icon_bus_operation_status" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/icon_bus_operation_status" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/icon_bus_operation_status" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/icon_bus_operation_status_un" />
|
||||
</selector>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 399 KiB |
|
After Width: | Height: | Size: 23 KiB |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/darker_gray" />
|
||||
<stroke
|
||||
android:width="1px"
|
||||
android:color="#337CC4" />
|
||||
<padding
|
||||
android:bottom="1px"
|
||||
android:left="1px"
|
||||
android:right="1px"
|
||||
android:top="1px" />
|
||||
|
||||
<corners android:topRightRadius="4dp" android:bottomRightRadius="4dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="24px"/>
|
||||
|
||||
<gradient android:startColor="#029DFF" android:endColor="#0056FF"/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="24px"/>
|
||||
<solid android:color="#1E3062" />
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -2,7 +2,7 @@
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="840px"
|
||||
android:layout_height="470px"
|
||||
android:layout_height="530px"
|
||||
android:background="@color/dialog_bg_color"
|
||||
app:roundLayoutRadius="32px">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
android:id="@+id/tv_upgrade_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50px"
|
||||
android:layout_marginTop="30px"
|
||||
android:text="@string/application_upgrade"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="56px"
|
||||
@@ -22,7 +22,7 @@
|
||||
android:id="@+id/tv_upgrade_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50px"
|
||||
android:layout_marginTop="30px"
|
||||
android:text="@string/application_upgrade_confirm"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="43px"
|
||||
@@ -30,15 +30,32 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_upgrade_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_upgrade_content"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="130px"
|
||||
android:layout_marginStart="50px"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginEnd="50px"
|
||||
android:layout_marginBottom="15px"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_horizontal_line"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_upgrade_tips" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_horizontal_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:layout_marginTop="80px"
|
||||
android:layout_marginTop="20px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_upgrade_tips" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_upgrade_content" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_vertical_line"
|
||||
@@ -76,5 +93,18 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_upgrade_confirm_force"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100px"
|
||||
android:gravity="center"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="46px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/view_vertical_line"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewShowDebugView"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -48,6 +48,16 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.takeover.TakeOverView
|
||||
android:id="@+id/clTakeOverView"
|
||||
android:layout_width="@dimen/hmi_take_over_request_width"
|
||||
android:layout_height="@dimen/hmi_take_over_request_height"
|
||||
android:layout_marginTop="@dimen/hmi_take_over_request_m_top"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--自动驾驶按钮及状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.AutoPilotStatusView
|
||||
android:id="@+id/viewAutopilotStatus"
|
||||
@@ -181,6 +191,14 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.pnc.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--APP、MAP版本-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -195,10 +213,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30px"
|
||||
app:layout_constraintTop_toTopOf="@+id/viewLimitingVelocity"
|
||||
app:layout_constraintEnd_toStartOf="@+id/viewLimitingVelocity"
|
||||
app:layout_goneMarginTop="30px"
|
||||
app:layout_goneMarginEnd="40px"/>
|
||||
app:layout_constraintTop_toTopOf="@+id/viewLimitingVelocity"
|
||||
app:layout_goneMarginEnd="40px"
|
||||
app:layout_goneMarginTop="30px" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
|
||||
@@ -17,24 +17,35 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:layout_width="14px"
|
||||
android:layout_height="50px"
|
||||
android:layout_marginStart="80px"
|
||||
android:layout_marginTop="158px"
|
||||
android:background="@color/color_FF2966EC"
|
||||
<com.mogo.eagle.core.function.hmi.ui.tools.BusOperationView
|
||||
android:id="@+id/toolBusOperationView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="162px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_second_group"
|
||||
android:layout_width="14px"
|
||||
android:layout_height="50px"
|
||||
android:layout_marginStart="80px"
|
||||
android:layout_marginTop="90px"
|
||||
android:background="@color/color_FF2966EC"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolBusOperationView" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/checkLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_216"
|
||||
android:layout_marginTop="@dimen/dp_266"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_90"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginStart="113px"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_check_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v_second_group">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/check"
|
||||
@@ -107,19 +118,71 @@
|
||||
android:textSize="32px" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rlKillLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="142px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivKillImg"
|
||||
android:layout_width="150px"
|
||||
android:layout_height="150px"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/close_nor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvKillContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42px"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="23px"
|
||||
android:text="杀死APP"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32px" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/sopLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_216"
|
||||
android:layout_marginTop="@dimen/dp_90"
|
||||
app:layout_constraintTop_toBottomOf="@id/checkLayout"
|
||||
app:layout_constraintLeft_toLeftOf="@id/checkLayout">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="150px"
|
||||
android:layout_height="150px"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/debug_icon_sop" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42px"
|
||||
android:text="@string/debug_sop"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32px"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_check_title"
|
||||
android:layout_width="84px"
|
||||
android:layout_height="86px"
|
||||
android:layout_marginStart="113px"
|
||||
android:layout_marginTop="140px"
|
||||
android:layout_marginStart="19px"
|
||||
android:gravity="center"
|
||||
android:text="检测"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="42px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_second_group"
|
||||
app:layout_constraintStart_toEndOf="@+id/v_second_group"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_second_group" />
|
||||
|
||||
<View
|
||||
android:layout_width="14px"
|
||||
@@ -128,7 +191,7 @@
|
||||
android:layout_marginTop="94px"
|
||||
android:background="@color/color_FF2966EC"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/checkLayout" />
|
||||
app:layout_constraintTop_toBottomOf="@id/sopLayout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeedTitle"
|
||||
@@ -141,43 +204,68 @@
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="42px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/checkLayout" />
|
||||
app:layout_constraintTop_toBottomOf="@id/sopLayout" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/llSpeedPosition"
|
||||
android:layout_width="390px"
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedReduce"
|
||||
android:layout_width="105px"
|
||||
android:layout_height="140px"
|
||||
android:layout_marginStart="113px"
|
||||
android:layout_marginTop="40px"
|
||||
android:background="@drawable/pilot_speed_bg"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="horizontal"
|
||||
android:src="@drawable/icon_speed_reduce"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSpeedTitle">
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSpeedTitle"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etInputSpeed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="92px"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="80px"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
<TextView
|
||||
android:id="@+id/tvSpeed"
|
||||
android:layout_width="189px"
|
||||
android:layout_height="140px"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedReduce"
|
||||
android:background="#1E3062"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="80px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="93px"
|
||||
android:layout_height="53px"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="28px"
|
||||
android:text="km/h"
|
||||
android:textColor="@color/color_B3FFFFFF"
|
||||
android:textSize="38px" />
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedAdd"
|
||||
android:layout_width="105px"
|
||||
android:layout_height="140px"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSpeed"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSpeed"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvSpeed"
|
||||
android:src="@drawable/icon_speed_add"
|
||||
/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<TextView
|
||||
android:id="@+id/tvUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="km/h"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedAdd"
|
||||
android:layout_marginStart="40px" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvSureModify"
|
||||
android:layout_width="200px"
|
||||
android:layout_height="135px"
|
||||
android:background="@drawable/taxi_loginout_sure_bg"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="42px"
|
||||
android:layout_marginLeft="50px"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSpeed"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSpeed"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvUnit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAcceleration"
|
||||
@@ -188,7 +276,7 @@
|
||||
android:textColor="#A7B6F0"
|
||||
android:textSize="32px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/llSpeedPosition" />
|
||||
app:layout_constraintTop_toBottomOf="@id/ivSpeedReduce" />
|
||||
|
||||
<View
|
||||
android:layout_width="14px"
|
||||
@@ -252,10 +340,27 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40px"
|
||||
android:layout_marginBottom="40px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewSystemVersion" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actvLoginout"
|
||||
android:layout_width="790px"
|
||||
android:layout_height="126px"
|
||||
android:layout_marginBottom="40px"
|
||||
android:background="@drawable/taxi_loginout_bg"
|
||||
android:gravity="center"
|
||||
android:text="退出登录"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="42px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/systemVersionView"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.tools.SpeedKeyboardView
|
||||
android:id="@+id/sKeyBoardView"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.BatteryView
|
||||
android:id="@+id/viewBattery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBatteryCharge"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/battery_charge_light"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_54">
|
||||
|
||||
<ImageView
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/blue_tooth"
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -5,8 +5,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/notice_check_dialog_bg_color"
|
||||
android:minWidth="777px"
|
||||
android:minHeight="485px"
|
||||
android:minWidth="882px"
|
||||
android:minHeight="550px"
|
||||
app:roundLayoutRadius="30px">
|
||||
|
||||
<TextView
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvCameraList"
|
||||
android:layout_width="778px"
|
||||
android:layout_width="882px"
|
||||
android:layout_height="664px"
|
||||
android:layout_marginTop="24px"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -59,8 +59,8 @@
|
||||
|
||||
<com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
|
||||
android:id="@+id/svpPlayer"
|
||||
android:layout_width="778px"
|
||||
android:layout_height="487px"
|
||||
android:layout_width="882px"
|
||||
android:layout_height="550px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -68,8 +68,8 @@
|
||||
<!--摄像头数据需要两种播放方式-->
|
||||
<TextureView
|
||||
android:id="@+id/textureView"
|
||||
android:layout_width="778px"
|
||||
android:layout_height="487px"
|
||||
android:layout_width="882px"
|
||||
android:layout_height="550px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/shadowView"
|
||||
android:layout_width="778px"
|
||||
android:layout_width="882px"
|
||||
android:layout_height="120px"
|
||||
android:background="@drawable/camera_gradient_shadow_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tbReportMore"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tbReportMore"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportLine"
|
||||
app:layout_constraintTop_toTopOf="@id/tbReportMore"
|
||||
android:gravity="center_vertical"/>
|
||||
app:layout_constraintTop_toTopOf="@id/tbReportMore" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportSrcLine"
|
||||
@@ -143,8 +143,7 @@
|
||||
android:id="@+id/tvAppVersionNameKey"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -155,8 +154,7 @@
|
||||
android:id="@+id/tvPadSnKey"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -167,8 +165,7 @@
|
||||
android:id="@+id/tvMoGoMapVersionKey"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -179,8 +176,7 @@
|
||||
android:id="@+id/tvIpcVersionInfoKey"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -203,7 +199,7 @@
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="7"/>
|
||||
android:minLines="7" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -215,32 +211,67 @@
|
||||
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:textColor="#000"
|
||||
android:textOff="开启美化模式"
|
||||
android:textOn="关闭美化模式"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:background="@drawable/radio_button_normal_background_right"/>
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbIsRainMode"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启雨天模式"
|
||||
android:textOn="关闭雨天模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbBeautyMode"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启感知优化模式"
|
||||
android:textOn="关闭感知优化模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbMojie"
|
||||
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="魔戒控制" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnOpenAllGestures"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:text="开启手势滑动"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:background="@drawable/radio_button_normal_background_right"/>
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnIpcReboot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:text="重启IPC节点"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
/>
|
||||
android:text="重启IPC节点"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDeviceBind"
|
||||
@@ -275,18 +306,16 @@
|
||||
android:id="@+id/tvPadSnClip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="复制"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textSize="14sp"
|
||||
android:text="复制"
|
||||
android:textColor="#0000FF"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
@@ -405,12 +434,11 @@
|
||||
android:id="@+id/tvIpcVersionInfoClip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="复制"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#0000FF"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
/>
|
||||
android:text="复制"
|
||||
android:textColor="#0000FF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -588,13 +616,12 @@
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swDevelopMode"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="开发者模式"
|
||||
style="@style/DebugSettingText"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/commonLayout"
|
||||
@@ -616,8 +643,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIpcInfo"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIpcInfo" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRecordBag"
|
||||
@@ -628,7 +654,7 @@
|
||||
android:text="录制Bag包"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIpcInfoDivider"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIpcInfoDivider" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
@@ -684,12 +710,11 @@
|
||||
android:id="@+id/tvCarInfoCopyClip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="复制经纬度"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:textSize="14sp"
|
||||
android:text="复制经纬度"
|
||||
android:textColor="#0000FF"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCarInfoCopy"
|
||||
/>
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCarInfoCopy" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIdentifyInfoCopy"
|
||||
@@ -859,7 +884,7 @@
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnRecordPackage" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCarInfo"
|
||||
style="@style/DebugSettingText"
|
||||
@@ -1041,33 +1066,33 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@drawable/debug_setting_edit_bg"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCurEnv"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:gravity="start"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:layout_weight="1"
|
||||
tools:text="当前环境:"/>
|
||||
android:gravity="start"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24"
|
||||
tools:text="当前环境:" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btChangeEnv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_8"
|
||||
android:text="切换环境"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="#1A1A1A"/>
|
||||
android:textColor="#1A1A1A"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<Button
|
||||
@@ -1080,8 +1105,8 @@
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:text="设置刹车加速度阈值"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/llChangeEnv"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/llChangeEnv" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
@@ -1169,6 +1194,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/btnConnectServerIp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbHmiController"
|
||||
android:layout_width="match_parent"
|
||||
@@ -1582,9 +1608,9 @@
|
||||
android:textOff="强制绘制路径规划"
|
||||
android:textOn="强制绘制路径规划"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawIdentifyData"/>
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawIdentifyData" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbChangeAutoPilotStatus"
|
||||
@@ -1595,9 +1621,9 @@
|
||||
android:textOff="开启模拟自动驾驶中"
|
||||
android:textOn="关闭模拟自动驾驶中"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintRight_toRightOf="@id/tbIsDrawAutopilotTrajectoryData"/>
|
||||
app:layout_constraintRight_toRightOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawPointCloudData"
|
||||
@@ -1609,23 +1635,21 @@
|
||||
android:textOff="开启渲染点云数据"
|
||||
android:textOn="关闭渲染点云数据"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbChangeAutoPilotStatus"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnPointCloudSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:layout_margin="2dp"
|
||||
android:text="设置点云大小"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbDrawPointCloudData"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tbDrawPointCloudData" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etPointCloudSize"
|
||||
@@ -1640,24 +1664,22 @@
|
||||
android:hint="请输入点云大小"
|
||||
android:textColor="#1A1A1A"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnPointCloudSize"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnPointCloudSize"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/btnPointCloudSize"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnPointCloudSize"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="@id/btnPointCloudSize" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnPointCloudColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:layout_margin="2dp"
|
||||
android:text="设置点云颜色"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnPointCloudSize"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/btnPointCloudSize" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etPointCloudColor"
|
||||
@@ -1672,11 +1694,10 @@
|
||||
android:hint="请输入点云颜色"
|
||||
android:textColor="#1A1A1A"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnPointCloudColor"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnPointCloudColor"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/btnPointCloudColor"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnPointCloudColor"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="@id/btnPointCloudColor" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgGpsProvider"
|
||||
@@ -1718,6 +1739,83 @@
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/trackerProvider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/rgGpsProvider">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/trackerProviderOrigin"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="使用工控感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/trackerProviderObu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="使用debugOBU感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/trackerIPCProvider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/trackerProvider">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/trackerIPCUnion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="融合全部感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/trackerIPC"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="融合感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/trackerIPCObu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="融合OBU感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/trackerIPCV2I"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="融合V2I感知数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -1813,8 +1911,7 @@
|
||||
android:gravity="center"
|
||||
android:textOff="打开「HD-MAP」Log"
|
||||
android:textOn="关闭「HD-MAP」Log"
|
||||
android:textSize="@dimen/dp_24"
|
||||
/>
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
@@ -2030,6 +2127,16 @@
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbAdasTrafficlight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="ADAS红绿灯数据"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbAdasPlanningObj"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_54">
|
||||
|
||||
<ImageView
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/demo_mode"
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="#00000000"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivWaringIcon"
|
||||
android:layout_width="132px"
|
||||
android:layout_height="132px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/ochBusOperationStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:visibility="visible"
|
||||
tools:ignore="DuplicateIds">
|
||||
|
||||
<View
|
||||
android:id="@+id/bus_operation_view"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_width="14px"
|
||||
android:layout_height="50px"
|
||||
android:layout_marginStart="80px"
|
||||
android:background="@color/color_FF2966EC" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bus_operation_title"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_operation_view"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_operation_view"
|
||||
app:layout_constraintStart_toEndOf="@+id/bus_operation_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="19px"
|
||||
android:text="@string/bus_operation_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="42px" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ochBusOperationStatusCTV"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_bus_operation_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_bus_operation_title"
|
||||
android:src="@drawable/icon_account_head"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_below="@+id/tv_bus_operation_title"
|
||||
android:layout_marginTop="40px"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_account_line"
|
||||
app:layout_constraintTop_toTopOf="@+id/ochBusOperationStatusCTV"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ochBusOperationStatusCTV"
|
||||
app:layout_constraintStart_toEndOf="@+id/ochBusOperationStatusCTV"
|
||||
android:layout_marginStart="@dimen/dp_60"
|
||||
android:background="@android:color/white"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="60px"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actvAccountPhone"
|
||||
app:layout_constraintTop_toTopOf="@+id/ochBusOperationStatusCTV"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ochBusOperationStatusCTV"
|
||||
app:layout_constraintStart_toEndOf="@+id/v_account_line"
|
||||
android:layout_marginStart="@dimen/dp_60"
|
||||
android:text="138***1268"
|
||||
android:textSize="@dimen/dp_54"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_height="@dimen/dp_100">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHmiPncActions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_68"
|
||||
android:paddingEnd="@dimen/dp_68"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_34"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_800"
|
||||
android:layout_height="@dimen/dp_1100"
|
||||
android:background="#FFFFFF"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!--绕障类功能-->
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObstacleAvoidance"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启绕障类功能"
|
||||
android:textOn="关闭绕障类功能"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
<!--危险障碍物颜色标记-->
|
||||
<ToggleButton
|
||||
android:id="@+id/tbMarkingObstacles"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启「危险障碍物颜色标记」"
|
||||
android:textOn="关闭「危险障碍物颜色标记」"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbObstacleAvoidance"
|
||||
/>
|
||||
<!--引导线动态效果-->
|
||||
<ToggleButton
|
||||
android:id="@+id/tbRouteDynamicEffect"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启「引导线动态效果」"
|
||||
android:textOn="关闭「引导线动态效果」"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbMarkingObstacles"
|
||||
/>
|
||||
<!--红绿灯标识-->
|
||||
<ToggleButton
|
||||
android:id="@+id/tbTrafficLight"
|
||||
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:textColor="#000"
|
||||
android:textOff="隐藏红绿灯标识"
|
||||
android:textOn="展示红绿灯标识"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbRouteDynamicEffect"
|
||||
/>
|
||||
<!--限速标识-->
|
||||
<ToggleButton
|
||||
android:id="@+id/tbSpeedLimit"
|
||||
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:textColor="#000"
|
||||
android:textOff="展示限速标识"
|
||||
android:textOn="隐藏限速标识"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbTrafficLight"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDemoMode"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启美化模式"
|
||||
android:textOn="关闭美化模式"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbSpeedLimit"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbRainMode"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启雨天模式"
|
||||
android:textOn="关闭雨天模式"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbDemoMode"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObu"
|
||||
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:textColor="#000"
|
||||
android:textOff="关闭OBU"
|
||||
android:textOn="开启OBU"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbRainMode"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbIPCReport"
|
||||
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:textColor="#000"
|
||||
android:textOff="开启异常上报提示"
|
||||
android:textOn="关闭异常上报提示"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbObu"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeedThresholdTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
|
||||
android:text="变道速度阈值:"
|
||||
android:textSize="18sp"
|
||||
android:textColor="#1A1A1A"
|
||||
android:layout_margin="10dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedReduce"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvSpeedThresholdTitle"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSpeedThresholdTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSpeedThresholdTitle"
|
||||
android:src="@drawable/icon_reduce"
|
||||
android:padding="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedReduce"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/debug_setting_edit_bg"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedAdd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSpeed"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSpeed"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvSpeed"
|
||||
android:src="@drawable/icon_add"
|
||||
android:padding="10dp"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSpeedSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedAdd"
|
||||
android:text="设置阈值"
|
||||
android:layout_marginStart="10dp"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnSpeedSet"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_72">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewStatusBarLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_72"
|
||||
android:layout_alignParentStart="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextClock
|
||||
android:id="@+id/viewTextClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:format12Hour="HH:mm"
|
||||
android:format24Hour="HH:mm"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_2C2E30"
|
||||
android:textSize="@dimen/dp_45"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewStatusBarTag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_27"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/status_bar_tag"
|
||||
android:textColor="@color/color_2C2E30"
|
||||
android:textSize="@dimen/dp_35" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_18" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewStatusBarRight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_44"
|
||||
android:gravity="end|center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/hmi_take_over_request_width"
|
||||
android:layout_height="@dimen/hmi_take_over_request_height">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/icon_take_over_request"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -8,4 +8,7 @@
|
||||
<color name="notice_dialog_back">#3B4577</color>
|
||||
<color name="acc_default_txt_color">#FF343C63</color>
|
||||
<color name="hmi_check_keyboard_input_field">#FF282F62</color>
|
||||
<color name="bus_autopilot_text_color_normal">#FFFFFF</color>
|
||||
<color name="color_2C2E30">#2C2E30</color>
|
||||
<color name="color_D4D8DC">#D4D8DC</color>
|
||||
</resources>
|
||||
@@ -15,19 +15,25 @@
|
||||
<dimen name="dp_18">18px</dimen>
|
||||
<dimen name="dp_30">30px</dimen>
|
||||
<dimen name="dp_36">36px</dimen>
|
||||
<dimen name="dp_34">34px</dimen>
|
||||
<dimen name="dp_38">38px</dimen>
|
||||
<dimen name="dp_42">42px</dimen>
|
||||
<dimen name="dp_45">45px</dimen>
|
||||
<dimen name="dp_46">46px</dimen>
|
||||
<dimen name="dp_48">48px</dimen>
|
||||
<dimen name="dp_50">50px</dimen>
|
||||
<dimen name="dp_52">52px</dimen>
|
||||
<dimen name="dp_54">54px</dimen>
|
||||
<dimen name="dp_56">56px</dimen>
|
||||
<dimen name="dp_62">62px</dimen>
|
||||
<dimen name="dp_68">68px</dimen>
|
||||
<dimen name="dp_70">70px</dimen>
|
||||
<dimen name="dp_75">80px</dimen>
|
||||
<dimen name="dp_72">72px</dimen>
|
||||
<dimen name="dp_75">75px</dimen>
|
||||
<dimen name="dp_80">80px</dimen>
|
||||
<dimen name="dp_96">96px</dimen>
|
||||
<dimen name="dp_100">100px</dimen>
|
||||
<dimen name="dp_110">110px</dimen>
|
||||
<dimen name="dp_140">140px</dimen>
|
||||
<dimen name="dp_150">150px</dimen>
|
||||
<dimen name="dp_180">180px</dimen>
|
||||
@@ -54,4 +60,13 @@
|
||||
<dimen name="hmi_traffic_light_time_size">60px</dimen>
|
||||
<dimen name="hmi_traffic_light_source_size">32px</dimen>
|
||||
|
||||
<dimen name="och_bus_operation_status_bg_width">150px</dimen>
|
||||
<dimen name="och_bus_operation_status_bg_height">150px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_size">42px</dimen>
|
||||
<dimen name="module_mogo_och_margin_left">40px</dimen>
|
||||
<dimen name="module_mogo_och_margin_bottom">46px</dimen>
|
||||
|
||||
<dimen name="hmi_take_over_request_width">810px</dimen>
|
||||
<dimen name="hmi_take_over_request_height">560px</dimen>
|
||||
<dimen name="hmi_take_over_request_m_top">524px</dimen>
|
||||
</resources>
|
||||
@@ -18,6 +18,10 @@
|
||||
<color name="color_FF0006">#FF0006</color>
|
||||
<color name="color_0099dd">#0099dd</color>
|
||||
<color name="color_FFFFFF">#FFFFFF</color>
|
||||
<color name="color_2C2E30">#2C2E30</color>
|
||||
<color name="color_D4D8DC">#D4D8DC</color>
|
||||
<color name="color_27FFFFFF">#27FFFFFF</color>
|
||||
<color name="color_1E111111">#1E111111</color>
|
||||
|
||||
<color name="background_wtf">#FF999900</color>
|
||||
<color name="background_error">#FFCC0000</color>
|
||||
@@ -66,4 +70,5 @@
|
||||
<color name="dark_mode_select_txt_color">#FFFFFFFF</color>
|
||||
|
||||
<color name="hmi_check_keyboard_input_field">#FF282F62</color>
|
||||
<color name="bus_autopilot_text_color_normal">#FFFFFF</color>
|
||||
</resources>
|
||||
@@ -60,4 +60,13 @@
|
||||
<dimen name="hmi_traffic_light_time_size">60px</dimen>
|
||||
<dimen name="hmi_traffic_light_source_size">32px</dimen>
|
||||
|
||||
<dimen name="och_bus_operation_status_bg_width">150px</dimen>
|
||||
<dimen name="och_bus_operation_status_bg_height">150px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_size">42px</dimen>
|
||||
<dimen name="module_mogo_och_margin_left">40px</dimen>
|
||||
<dimen name="module_mogo_och_margin_bottom">46px</dimen>
|
||||
|
||||
<dimen name="hmi_take_over_request_width">810px</dimen>
|
||||
<dimen name="hmi_take_over_request_height">560px</dimen>
|
||||
<dimen name="hmi_take_over_request_m_top">524px</dimen>
|
||||
</resources>
|
||||
@@ -22,7 +22,9 @@
|
||||
<string name="check_vehicle_detection">车辆检测</string>
|
||||
<string name="debug_panel">调试面板</string>
|
||||
<string name="debug_panel_fb">录包设置</string>
|
||||
<string name="debug_sop">运营面板</string>
|
||||
<string name="check_vehicle_speed_setting">车速设置</string>
|
||||
<string name="bus_operation_title">账户信息</string>
|
||||
<string name="check_system_operation">系统运行</string>
|
||||
<string name="check_system_shut_down">关机</string>
|
||||
<string name="check_system_reboot">重启</string>
|
||||
@@ -50,5 +52,5 @@
|
||||
<string name="modify_binding_car">是否修改车机绑定?</string>
|
||||
<string name="to_binding_car">是否绑定车机?</string>
|
||||
|
||||
|
||||
<string name="status_bar_tag">蘑菇星云</string>
|
||||
</resources>
|
||||
|
||||