Merge branch 'master' into release_robosweeper-d_100-sweeper_220830_1.0.0.1_merge
# Conflicts: # app_ipc_monitoring/src/main/java/com/zhidao/adas/client/ui/MainActivity.java # core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt # core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt # core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasMsgConnectStatusListenerImpl.kt # core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java # core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt # core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt # gradle.properties # libraries/mogo-adas-data/src/main/proto/message_pad.proto # libraries/mogo-adas-data/src/main/proto/special_vehicle_task_cmd.proto # libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasChannel.java # libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasManager.java # libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/IAdasNetCommApi.java # libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/MessageType.java
@@ -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" />
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy.IViewNotificationProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
@@ -69,6 +70,7 @@ import com.mogo.eagle.core.function.hmi.ui.setting.IPCReportWindow
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ReportListFloatWindow
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AutoPilotAndCheckView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.MaskView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -87,8 +89,11 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.module.common.enums.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
import kotlinx.android.synthetic.main.view_auto_pilot_check.view.*
|
||||
import kotlinx.android.synthetic.main.view_och_bus_operation.view.*
|
||||
import kotlinx.coroutines.*
|
||||
import mogo_msg.MogoReportMsg
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.*
|
||||
|
||||
@@ -123,6 +128,9 @@ import java.util.*
|
||||
// 检测、自动驾驶速度设置
|
||||
private var toolsViewFloat: WarningFloat.Builder? = null
|
||||
|
||||
private var maskViewFloat: WarningFloat.Builder? = null
|
||||
private var maskView: MaskView? = null
|
||||
|
||||
private var upgradeTipsView: (() -> View)? = null
|
||||
|
||||
// HMI 视图控件代理
|
||||
@@ -150,6 +158,8 @@ import java.util.*
|
||||
private var showingV2XTip: IReminder? = null
|
||||
private var roadVideoDialog: RoadVideoDialog? = null
|
||||
|
||||
private var busOperationStatus: IOchBusView? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
@@ -172,7 +182,7 @@ import java.util.*
|
||||
}
|
||||
}
|
||||
|
||||
/*ivCameraIcon?.setOnLongClickListener {
|
||||
/**ivCameraIcon?.setOnLongClickListener {
|
||||
activity?.let { it1 -> CarcorderPreviewView.show(it1) }
|
||||
true
|
||||
}*/
|
||||
@@ -235,8 +245,8 @@ import java.util.*
|
||||
return
|
||||
}
|
||||
}
|
||||
//处于非美化模式下弹窗
|
||||
if (!FunctionBuildConfig.isDemoMode && (recordPanel.stat == 100 || recordPanel.stat == 101)) {
|
||||
//处于非美化模式下弹窗;是地图数据采集任务时即type=2时,不弹窗
|
||||
if (!FunctionBuildConfig.isDemoMode && (recordPanel.stat == 100 || recordPanel.stat == 101) && recordPanel.type!=2) {
|
||||
//只在司机屏生效,乘客屏不生效
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
activity?.let { CallerDevaToolsManager.onReceiveBadCaseRecord(recordPanel, it) }
|
||||
@@ -327,6 +337,15 @@ import java.util.*
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeBusOperationStatus(isOut: Boolean) {
|
||||
busOperationStatus?.changerOperationStatus(isOut)
|
||||
}
|
||||
|
||||
override fun setBusOperationView(view: IOchBusView) {
|
||||
busOperationStatus = view
|
||||
busOperationStatus?.showBusOperation()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
*/
|
||||
@@ -709,7 +728,9 @@ import java.util.*
|
||||
WarningFloat.dismiss(tag)
|
||||
}
|
||||
Log.d("$M_HMI$TAG", "--- disableWarningV2X ---")
|
||||
showingV2XTip?.takeIf { it.isShowing() }?.also { it.hide() }
|
||||
lifecycleScope.launch {
|
||||
showingV2XTip?.takeIf { it.isShowing() }?.also { it.hide() }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -941,6 +962,66 @@ import java.util.*
|
||||
cameraListView?.showNoSignal()
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示蒙层
|
||||
*/
|
||||
override fun showMaskView() {
|
||||
if (maskViewFloat == null) {
|
||||
context?.let {
|
||||
if (maskViewFloat == null) {
|
||||
if (maskView == null) {
|
||||
maskView = MaskView(it)
|
||||
}
|
||||
|
||||
maskViewFloat = WarningFloat.with(it)
|
||||
.setTag("MaskViewFloat")
|
||||
.setLayout(maskView!!)
|
||||
.setSidePattern(SidePattern.LEFT)
|
||||
.setGravity(Gravity.CENTER)
|
||||
.setImmersionStatusBar(true)
|
||||
.setWindowHeight(LayoutParams.MATCH_PARENT)
|
||||
.setWindowWidth(LayoutParams.MATCH_PARENT)
|
||||
// .setCountDownTime(6000)
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.enterAnim(view, params, windowManager, sidePattern)
|
||||
?.apply {
|
||||
interpolator = OvershootInterpolator()
|
||||
}
|
||||
|
||||
override fun exitAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.exitAnim(view, params, windowManager, sidePattern)
|
||||
?.setDuration(200)
|
||||
})
|
||||
.addWarningStatusListener(object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
maskViewFloat = null
|
||||
maskView = null
|
||||
// TODO:("")
|
||||
}
|
||||
})
|
||||
.show()
|
||||
} else {
|
||||
maskViewFloat?.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun hideMaskView() {
|
||||
dismissMaskView()
|
||||
}
|
||||
|
||||
override fun showToolsView() {
|
||||
if (toolsViewFloat == null) {
|
||||
showToolsFloat()
|
||||
@@ -1037,6 +1118,14 @@ import java.util.*
|
||||
}
|
||||
}
|
||||
|
||||
private fun dismissMaskView() {
|
||||
maskViewFloat?.let {
|
||||
WarningFloat.dismiss(it.config.floatTag, false)
|
||||
maskViewFloat = null
|
||||
maskView = null
|
||||
}
|
||||
}
|
||||
|
||||
private var isLeftLight :Boolean = false
|
||||
private var isRightLight :Boolean = false
|
||||
private var isDisappare :Boolean = false
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
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.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 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 = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,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.*
|
||||
@@ -152,6 +153,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()
|
||||
@@ -248,6 +251,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)
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本信息
|
||||
*/
|
||||
@@ -554,6 +574,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
//只在司机端设置美化模式开关功能
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
|
||||
tbIsDemoMode.visibility = View.GONE
|
||||
}
|
||||
|
||||
// 雨天模式,上一次勾选的数据
|
||||
tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
//雨天模式
|
||||
@@ -566,6 +591,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()
|
||||
@@ -616,6 +650,31 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化 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
|
||||
}
|
||||
R.id.trackerProviderObu -> {
|
||||
FunctionBuildConfig.debugTrackerProvider = 1
|
||||
// update tracker provider view
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化 ADAS感知数据是否绘制 选择情况
|
||||
tbIsDrawIdentifyData.isChecked = FunctionBuildConfig.isDrawIdentifyData
|
||||
@@ -802,6 +861,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()
|
||||
@@ -1380,6 +1450,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 感知障碍物
|
||||
*/
|
||||
@@ -1413,6 +1496,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
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.EventBusOperation
|
||||
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
|
||||
@@ -96,6 +99,9 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
ivCloseIcon.setOnClickListener {
|
||||
clickListener?.onClose(it)
|
||||
}
|
||||
rlKillLayout.setOnClickListener {
|
||||
killApp()
|
||||
}
|
||||
viewCheckStatus.setOnClickListener {
|
||||
clickListener?.go2CheckPage()
|
||||
}
|
||||
@@ -142,6 +148,7 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
if (speedLimit > 0) {
|
||||
etInputSpeed.setText((speedLimit * 3.6).toInt().toString())
|
||||
}
|
||||
initOchView()
|
||||
// // 比如需要设置默认速度
|
||||
// val speed = "30"
|
||||
// etInputSpeed.setText(speed)
|
||||
@@ -149,6 +156,35 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
private fun initOchView() {
|
||||
actvLoginout.onClick {
|
||||
EventBus.getDefault().post(EventLogout())
|
||||
}
|
||||
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
actvLoginout.visibility = View.VISIBLE
|
||||
}
|
||||
"fPadLenovoOchBus" ->{
|
||||
CallerHmiManager.setBusOperationView(toolBusOperationView)
|
||||
EventBus.getDefault().post(EventBusOperation(0))
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
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.data.temp.EventBusOperation
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
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), View.OnClickListener {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_och_bus_operation,this,true)
|
||||
ochBusOperationStatus.setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun showBusOperation() {
|
||||
ochBusOperationStatus.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changerOperationStatus(isOut: Boolean) {
|
||||
if (isOut){
|
||||
ochBusOperationStatusCTV.text = "收车"
|
||||
}else{
|
||||
ochBusOperationStatusCTV.text = "出车"
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
EventBus.getDefault().post(EventBusOperation(1))
|
||||
}
|
||||
}
|
||||
@@ -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"))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +1,16 @@
|
||||
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.hmi.R.drawable
|
||||
import com.mogo.map.*
|
||||
import com.mogo.map.uicontroller.*
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MODE_MEDIUM_SIGHT
|
||||
import com.mogo.module.common.constants.*
|
||||
import kotlinx.android.synthetic.main.view_perspective_switch.view.*
|
||||
|
||||
/**
|
||||
@@ -43,6 +42,11 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
.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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -25,6 +27,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
@@ -61,7 +64,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) {
|
||||
@@ -100,11 +103,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) {
|
||||
@@ -120,7 +119,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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -19,6 +22,10 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
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.cloud.commons.BuildConfig;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.mvp.BaseFragment;
|
||||
@@ -54,6 +61,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;
|
||||
@@ -274,6 +283,8 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
// 启动一些基本的服务:定位等
|
||||
startBaseService();
|
||||
// 启动Native内存泄漏监测
|
||||
startLeakMonitor();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,6 +299,38 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
// startService(intentCarcorderService);
|
||||
}
|
||||
|
||||
private void startLeakMonitor() {
|
||||
LeakMonitorConfig leakMonitorConfig = new LeakMonitorConfig.Builder()
|
||||
.setLoopInterval(50000)
|
||||
.setMonitorThreshold(16)
|
||||
.setNativeHeapAllocatedThreshold(0)
|
||||
.setEnableLocalSymbolic(true)
|
||||
.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 +431,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,17 @@ 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.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.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils;
|
||||
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 +43,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 +64,47 @@ 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,6 +209,188 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) { //向上长按 开启自动驾驶
|
||||
long currentTime = System.currentTimeMillis() / (1000);
|
||||
long oldTime = SharedPrefsMgr.getInstance(getContext()).getLong("old_time_up", 0);
|
||||
// Log.d("liyz", "time = " + (currentTime - oldTime));
|
||||
if (currentTime - oldTime > 6) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong("old_time_up", System.currentTimeMillis() / 1000);
|
||||
// ToastUtils.showShort("长按 ↑↑↑ 开启自动驾驶");
|
||||
CallerAutoPilotManager.INSTANCE.setControlAutopilotCarAuto(true);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { //下和中间键盘长按,减速为-2
|
||||
long currentTime = System.currentTimeMillis() / (1000);
|
||||
long oldTime = SharedPrefsMgr.getInstance(getContext()).getLong("old_time_down", 0);
|
||||
if (currentTime - oldTime > 6) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong("old_time_down", System.currentTimeMillis() / 1000);
|
||||
// ToastUtils.showShort("长按 ↓↓↓ 减速 -2 ");
|
||||
sendAcc(true, -2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Log.e("liyz", "onKeyDown keyCode = " + keyCode + "--action = " + event.getAction() + "---" + event);
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
// Log.d("liyz", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
|
||||
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);
|
||||
}
|
||||
numberE = 0;
|
||||
isLongPressE = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||
// Log.d("liyz", "dispatchTouchEvent event.getX() = " + event.getX() + "--event.getY() = " + event.getY() + "--action = " + event.getAction());
|
||||
if (event.getX() == -1469.6875 && event.getY() == 530.0) { //向左变道
|
||||
// ToastUtils.showShort("← 向左变道");
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneLeft();
|
||||
|
||||
return true;
|
||||
} else if (event.getX() == -1096.25 && event.getY() == 132.5) { //鸣笛
|
||||
// ToastUtils.showShort("↑ 鸣笛 ");
|
||||
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);
|
||||
|
||||
return true;
|
||||
} else if (event.getX() == -863.4375 && event.getY() == 690.0) { //向右变道
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight();
|
||||
// ToastUtils.showShort("→ 向右变道");
|
||||
return true;
|
||||
} else if (event.getX() == -1096.25 && event.getY() == 1099.0) { // -1减速
|
||||
sendAcc(true, -1);
|
||||
// ToastUtils.showShort("↓ 减速 -1 ");
|
||||
|
||||
return true;
|
||||
} else if (event.getX() == -1096.25 && event.getY() == 690.0) { //复原
|
||||
// ToastUtils.showShort("O 复原 ");
|
||||
sendAcc(false, 0.0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.dispatchTouchEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSkinModeChange(int skinMode) {
|
||||
if (skinMode == 0) {
|
||||
@@ -163,4 +399,117 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
BarUtils.setStatusBarLightMode(this, true);
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找蓝牙连接过的蓝牙设备
|
||||
*
|
||||
* @param bluetoothAdapter
|
||||
*/
|
||||
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);
|
||||
// Log.e("liyz", "showBondedDevice Name:" + device.getName() + " Mac:" + device.getAddress() + "---isConnected = " + isConnected);
|
||||
mAreadlyConnectedList.add(device);
|
||||
if (device.getName().equals("JX-05")) { //后面魔戒可能不使用了
|
||||
SharedPrefsMgr.getInstance(getContext()).putString("BT_MAC", device.getAddress());
|
||||
}
|
||||
if (!isConnected) {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
connectBluetooth(); //主动连接一次
|
||||
}, 4000L);
|
||||
}
|
||||
} 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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 主动连接最近的一次连接
|
||||
*/
|
||||
private void connectBluetooth() {
|
||||
// Log.d("liyz", "connectBluetooth ----> size() = " + mAreadlyConnectedList.size());
|
||||
if (mAreadlyConnectedList.size() > 0) {
|
||||
try {
|
||||
Method method = BluetoothDevice.class.getMethod("createBond");
|
||||
String macAddress = SharedPrefsMgr.getInstance(getContext()).getString("BT_MAC");
|
||||
int pos = -1;
|
||||
for (int i = 0; i < mAreadlyConnectedList.size(); i++) {
|
||||
if (macAddress.equals(mAreadlyConnectedList.get(i).getAddress())) {
|
||||
pos = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Log.d("liyz", "connectBluetooth macAddress = " + macAddress + "---pos = " + pos);
|
||||
if (mAreadlyConnectedList.size() > pos && (pos >= 0)) {
|
||||
method.invoke(mAreadlyConnectedList.get(pos));
|
||||
}
|
||||
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import android.os.Process;
|
||||
|
||||
import com.bytedance.boost_multidex.BoostMultiDex;
|
||||
import com.elegant.utils.UiThreadHandler;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.kwai.koom.base.DefaultInitTask;
|
||||
import com.mogo.cloud.socket.SocketBuildConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
@@ -28,8 +28,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 +41,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
|
||||
@@ -56,8 +58,10 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
initTipToast();
|
||||
initModules();
|
||||
|
||||
initKoom();
|
||||
//查询是否有版本的更新
|
||||
queryAppUpgrade();
|
||||
checkMonitorDb();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,6 +79,22 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
},5000);
|
||||
}
|
||||
|
||||
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() {
|
||||
DefaultInitTask.INSTANCE.init(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化异常采集配置
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
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();
|
||||
// Log.d("liyz", "蓝牙设备已连接 ----> ");
|
||||
// SharedPrefsMgr.getInstance(context).putBoolean("BLUETOOTH", true);
|
||||
break;
|
||||
|
||||
case BluetoothDevice.ACTION_ACL_DISCONNECTED:
|
||||
// SharedPrefsMgr.getInstance(context).putBoolean("BLUETOOTH", false);
|
||||
// Log.d("liyz", "蓝牙设备已断开 ----> ");
|
||||
// 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: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 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: 23 KiB |
@@ -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>
|
||||
@@ -181,6 +181,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_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<!--APP、MAP版本-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -107,6 +107,31 @@
|
||||
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>
|
||||
|
||||
<TextView
|
||||
@@ -252,10 +277,34 @@
|
||||
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" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.tools.BusOperationView
|
||||
android:id="@+id/toolBusOperationView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/systemVersionView"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actvLoginout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/systemVersionView"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/taxi_loginout_bg"
|
||||
android:layout_marginBottom="40px"
|
||||
android:text="退出登录"
|
||||
android:visibility="gone"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="42px"
|
||||
android:layout_width="790px"
|
||||
android:layout_height="126px"/>
|
||||
|
||||
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.tools.SpeedKeyboardView
|
||||
android:id="@+id/sKeyBoardView"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -232,6 +232,42 @@
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:background="@drawable/radio_button_normal_background_right"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbBeautyMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启感知优化模式"
|
||||
android:textOn="关闭感知优化模式"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:background="@drawable/radio_button_normal_background_right"/>
|
||||
|
||||
<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:visibility="gone"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnIpcReboot"
|
||||
android:layout_width="match_parent"
|
||||
@@ -1718,6 +1754,35 @@
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -2030,6 +2095,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,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,45 @@
|
||||
<?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:id="@+id/ochBusOperationStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40px"
|
||||
android:paddingBottom="40px"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:ignore="DuplicateIds">
|
||||
|
||||
<View
|
||||
android:id="@+id/bus_operation_view"
|
||||
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"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="113px"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="4px"
|
||||
android:text="@string/bus_operation_title"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="42px" />
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/ochBusOperationStatusCTV"
|
||||
android:layout_width="@dimen/och_bus_operation_status_bg_width"
|
||||
android:layout_height="@dimen/och_bus_operation_status_bg_height"
|
||||
android:layout_below="@+id/tv_bus_operation_title"
|
||||
android:layout_marginStart="113px"
|
||||
android:layout_marginTop="40px"
|
||||
android:background="@drawable/bus_operation_status_bg_selector1"
|
||||
android:gravity="center"
|
||||
android:text="出车"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/bus_autopilot_text_color_normal"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
@@ -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>
|
||||
@@ -8,4 +8,5 @@
|
||||
<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>
|
||||
</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,10 @@
|
||||
<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>
|
||||
|
||||
</resources>
|
||||
@@ -66,4 +66,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,9 @@
|
||||
<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>
|
||||
</resources>
|
||||
@@ -23,6 +23,7 @@
|
||||
<string name="debug_panel">调试面板</string>
|
||||
<string name="debug_panel_fb">录包设置</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>
|
||||
|
||||