[2.13.0-arch-opt] hmi proxy replace to view
This commit is contained in:
@@ -35,18 +35,21 @@ import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
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.IViewControlListener.Companion.AutoPilotStatusView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.CameraView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.PerspectiveSwitchView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.SpeedPanelView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.ToolsView_TAG
|
||||
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
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
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.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
@@ -66,9 +69,7 @@ import com.mogo.eagle.core.function.hmi.ui.setting.IPCReportWindow
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView.Companion.toggleDebugView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.*
|
||||
import com.mogo.eagle.core.function.main.DisplayEffectsHelper
|
||||
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -102,26 +103,19 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
IMoGoHmiProvider,
|
||||
IMoGoHmiViewProxy,
|
||||
MoGoHmiContract.View,
|
||||
IMoGoAutopilotRecordListener,
|
||||
IViewNotificationProvider {
|
||||
IMoGoAutopilotRecordListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MoGoHmiFragment"
|
||||
}
|
||||
|
||||
//StatusView
|
||||
private var statusBarView: StatusBarView? = null
|
||||
|
||||
// HMI 视图控件代理
|
||||
// 红绿灯 View代理
|
||||
// todo 需要统一数据源 红绿灯 View代理
|
||||
private var mViewTrafficLight: IViewTrafficLight? = null
|
||||
|
||||
// 限速 View代理
|
||||
// todo 需要统一数据源 限速 View代理
|
||||
private var mViewLimitingVelocity: IViewLimitingVelocity? = null
|
||||
|
||||
// V2X预警弹窗 View 代理
|
||||
private var mViewNotificationProvider: IViewNotificationProvider? = null
|
||||
|
||||
private var lastSpeakJob: Job? = null
|
||||
|
||||
private var lastShowV2XJob: Job? = null
|
||||
@@ -130,18 +124,9 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
override fun initViews() {
|
||||
initViewShowWithConfig()
|
||||
// 同步AppInfo Config信息
|
||||
CallerDevaToolsManager.syncConfig() //todo arrow 页面初始化 放到合适位置
|
||||
|
||||
//todo 抽象fragment能力 放入baseHmi
|
||||
val decorView = requireActivity().window.decorView as FrameLayout
|
||||
statusBarView = decorView.findViewWithTag<View>("status_bar") as StatusBarView?
|
||||
//设置StatusBar初始状态
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
statusBarView?.updateRightView(true, "demoMode", DemoModeView(requireContext()))
|
||||
} else {
|
||||
statusBarView?.updateRightView(false, "demoMode", DemoModeView(requireContext()))
|
||||
}
|
||||
CallerHmiViewControlListenerManager.updateStatusBarRightView(StatusBarView.TAG,FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(requireContext()))
|
||||
|
||||
ivCameraIcon?.setOnClickListener {
|
||||
cameraLiveView.showCameraList(
|
||||
@@ -156,38 +141,12 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
ivToolsIcon?.setOnClickListener {
|
||||
toolsView.showToolsFloat(requireContext())
|
||||
}
|
||||
|
||||
viewShowDebugView.setOnLongClickListener {
|
||||
toggleDebugView.toggle(requireContext())
|
||||
true
|
||||
}
|
||||
|
||||
//美化模式隐藏开关
|
||||
viewDemoModeSwitch.setOnClickListener {
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//单次查询,是否有行程信息(订单进行中时点击不生效),autopilotControlParameters为null代表不处于自动驾驶状态下
|
||||
if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().autopilotControlParameters == null) {
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
context?.let {
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(it)
|
||||
)
|
||||
}
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//todo 新超,封装至消息盒子
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
viewDriverMsgBoxList.visibility = View.VISIBLE
|
||||
@@ -202,6 +161,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
//todo 新超,封装至消息盒子
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
@@ -215,6 +175,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
//todo 加载端自己控制 --- 新超 本期我们设置到bus,taxi,sweep Fragment
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
cbMsgBoxDriver.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
@@ -227,6 +188,24 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
// todo 新超
|
||||
override fun updateDriverMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
// todo 新超
|
||||
override fun updatePassengerMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxPTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
@@ -234,15 +213,62 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
// 首次初始化使用默认视图
|
||||
setProxyTrafficLightView(viewTrafficLightVr)
|
||||
setProxyLimitingSpeedView(viewLimitingVelocity)
|
||||
setViewNotificationProvider(this)
|
||||
}
|
||||
|
||||
override fun getNotificationView(): IViewNotification? =
|
||||
context?.let { V2XNotificationView(it) }
|
||||
|
||||
override fun onAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) { //todo 数据中心
|
||||
/** todo ----------------------------------------------**/
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
*/
|
||||
override fun setProxyTrafficLightView(view: IViewTrafficLight) {
|
||||
mViewTrafficLight = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 限速 代理View
|
||||
*/
|
||||
override fun setProxyLimitingSpeedView(view: IViewLimitingVelocity) {
|
||||
mViewLimitingVelocity = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置文件初始化视图显示
|
||||
*/
|
||||
private fun initViewShowWithConfig() {
|
||||
// 控制 自动驾驶状态 展示
|
||||
if (HmiBuildConfig.isShowAutopilotStatusView) {
|
||||
setAutopilotStatusViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setAutopilotStatusViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 切换视角 展示
|
||||
if (HmiBuildConfig.isShowPerspectiveSwitchView) {
|
||||
setPerspectiveSwitchViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setPerspectiveSwitchViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 红绿灯 展示
|
||||
if (HmiBuildConfig.isShowTrafficLightView) {
|
||||
setTrafficLightVrVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setTrafficLightVrVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 远程摄像头图标 展示
|
||||
if (HmiBuildConfig.isShowCameraView) {
|
||||
setCameraViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setCameraViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
|
||||
override fun onAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) {
|
||||
CallerLogger.d("$M_HMI$TAG", "recordKey=${recordPanel.key},stat=${recordPanel.stat}")
|
||||
if (BadCaseConfig.recordKeyList.contains(recordPanel.key)) {
|
||||
if (BadCaseConfig.recordKeyList.contains(recordPanel.key)) { //todo InitiativeBadCaseWindow
|
||||
if (recordPanel.stat == 100 || recordPanel.stat == 101) {
|
||||
//成功结束录制
|
||||
TipToast.shortTip(
|
||||
@@ -279,7 +305,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
//处于非美化模式下弹窗;是地图数据采集任务时即type=2时,不弹窗
|
||||
if (!FunctionBuildConfig.isDemoMode && (recordPanel.stat == 100 || recordPanel.stat == 101) && recordPanel.type != 2) {
|
||||
//只在司机屏生效,乘客屏不生效
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { //todo 数据中心控制来源
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.RECORD, RecordBagMsg(
|
||||
@@ -290,7 +316,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
)
|
||||
}
|
||||
}
|
||||
if (!FunctionBuildConfig.isDemoMode && recordPanel.type == 2 && (
|
||||
if (!FunctionBuildConfig.isDemoMode && recordPanel.type == 2 && ( //todo CallerMapDataCollectorManager
|
||||
recordPanel.stat == 101 || //工控机采集完成-被动完成
|
||||
recordPanel.stat == 100 || //工控机采集完成-主动完成
|
||||
recordPanel.stat == 102 || //工控机达到最大采集时长
|
||||
@@ -310,7 +336,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
/**
|
||||
* ok
|
||||
* 工控机重启返回结果 todo 确认数据源
|
||||
* 工控机重启返回结果
|
||||
* @param code
|
||||
* @param msg
|
||||
*/
|
||||
@@ -352,121 +378,26 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
override fun setViewNotificationProvider(provider: IViewNotificationProvider) {
|
||||
mViewNotificationProvider = provider
|
||||
}
|
||||
|
||||
override fun setStatusBarDarkOrLight(light: Boolean) {
|
||||
statusBarView?.setStatusBarDarkOrLight(light)
|
||||
CallerHmiViewControlListenerManager.setStatusBarDarkOrLight(StatusBarView.TAG,light)
|
||||
}
|
||||
|
||||
override fun updateStatusBarRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
statusBarView?.updateRightView(insert, tag, viewGroup)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarRightView(StatusBarView.TAG,insert, tag, viewGroup)
|
||||
}
|
||||
|
||||
override fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
statusBarView?.updateLeftView(insert, tag, viewGroup)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarLeftView(StatusBarView.TAG,insert, tag, viewGroup)
|
||||
}
|
||||
|
||||
override fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
statusBarView?.updateProgressView(insert, tag, progress)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarDownloadView(StatusBarView.TAG,insert, tag, progress)
|
||||
}
|
||||
|
||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
||||
statusBarView?.updateMfStatus(tag, status)
|
||||
CallerHmiViewControlListenerManager.updateMfStatus(StatusBarView.TAG,tag, status)
|
||||
}
|
||||
|
||||
override fun updateDriverMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun updatePassengerMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxPTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
*/
|
||||
override fun setProxyTrafficLightView(view: IViewTrafficLight) {
|
||||
mViewTrafficLight = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 限速 代理View
|
||||
*/
|
||||
override fun setProxyLimitingSpeedView(view: IViewLimitingVelocity) {
|
||||
mViewLimitingVelocity = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置文件初始化视图显示
|
||||
*/
|
||||
private fun initViewShowWithConfig() {
|
||||
// 控制 速度 展示
|
||||
if (HmiBuildConfig.isShowSpeedView) {
|
||||
setSpeedChartViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setSpeedChartViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 自动驾驶状态 展示
|
||||
if (HmiBuildConfig.isShowAutopilotStatusView) {
|
||||
setAutopilotStatusViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setAutopilotStatusViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 切换视角 展示
|
||||
if (HmiBuildConfig.isShowPerspectiveSwitchView) {
|
||||
setPerspectiveSwitchViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setPerspectiveSwitchViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 切换视角 展示
|
||||
if (HmiBuildConfig.isShowToolsView) {
|
||||
setToolsViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setToolsViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 BadCase 按钮展示
|
||||
if (HmiBuildConfig.isShowBadCaseView) {
|
||||
ivBadCaseTools.visibility = View.VISIBLE
|
||||
ivAiCollectTools.visibility = View.VISIBLE
|
||||
CallerDevaToolsManager.initBadCase(ivBadCaseTools) //todo 新超 封装在hmi view
|
||||
CallerDevaToolsManager.initAiCollect(ivAiCollectTools) //todo 新超 封装在hmi view
|
||||
} else {
|
||||
ivBadCaseTools.visibility = View.GONE
|
||||
ivAiCollectTools.visibility = View.GONE
|
||||
}
|
||||
|
||||
// 控制 红绿灯 展示
|
||||
if (HmiBuildConfig.isShowTrafficLightView) {
|
||||
setTrafficLightVrVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setTrafficLightVrVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 远程摄像头图标 展示
|
||||
if (HmiBuildConfig.isShowCameraView) {
|
||||
setCameraViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setCameraViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_hmi
|
||||
}
|
||||
@@ -484,28 +415,28 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
override fun setSpeedChartViewVisibility(visibility: Int) {
|
||||
viewSpeedChart?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setTrafficLightVrVisibility(visibility: Int) {
|
||||
mViewTrafficLight?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setToolsViewVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(ToolsView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setSpeedChartViewVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(SpeedPanelView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setAutopilotStatusViewVisibility(visibility: Int) {
|
||||
viewAutopilotStatus?.visibility = visibility
|
||||
CallerHmiViewControlListenerManager.invokeVisible(AutoPilotStatusView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setPerspectiveSwitchViewVisibility(visibility: Int) {
|
||||
viewPerspectiveSwitch?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setToolsViewVisibility(visibility: Int) {
|
||||
ivToolsIcon?.visibility = visibility
|
||||
CallerHmiViewControlListenerManager.invokeVisible(PerspectiveSwitchView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setCameraViewVisibility(visibility: Int) {
|
||||
ivCameraIcon?.visibility = visibility
|
||||
CallerHmiViewControlListenerManager.invokeVisible(CameraView_TAG, visibility)
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
@@ -1035,7 +966,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
?.commitAllowingStateLoss()
|
||||
// context?.let { CallerDevaToolsManager.showStatusBar(it, statusBarContainer) }
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.switch
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
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.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
class DemoModeHiddenSwitch(context: Context?, attrs: AttributeSet?) : View(context, attrs) {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
setOnClickListener {
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//单次查询,是否有行程信息(订单进行中时点击不生效),autopilotControlParameters为null代表不处于自动驾驶状态下
|
||||
if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().autopilotControlParameters == null) {
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
context?.let {
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(it)
|
||||
)
|
||||
}
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ import kotlin.system.exitProcess
|
||||
* @author ChenFufeng
|
||||
* 设置自动驾驶速度和检测页入口
|
||||
*/
|
||||
class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.ToolsView_TAG
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
class ToolsImageView(context: Context, attrs: AttributeSet?) :
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs), IViewControlListener {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
setBackgroundResource(R.drawable.module_ext_check)
|
||||
setImageResource(R.drawable.icon_tools_nor)
|
||||
scaleType = ScaleType.CENTER
|
||||
|
||||
CallerHmiViewControlListenerManager.addListener(ToolsView_TAG, this)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(ToolsView_TAG)
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,14 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.AutoPilotStatusView_TAG
|
||||
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.CallerAutoPilotStatusListenerManager.getCurWgs84Lat
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lon
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
@@ -25,18 +28,21 @@ import kotlinx.android.synthetic.main.view_autopilot_status.view.*
|
||||
* @date 2021/9/22 3:59 下午
|
||||
* 自动驾驶状态按钮
|
||||
*/
|
||||
class AutoPilotStatusView @JvmOverloads constructor(
|
||||
class AutoPilotStatusView constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet
|
||||
) : ConstraintLayout(context, attrs),
|
||||
View.OnClickListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
IMoGoAutopilotStatusListener, IViewControlListener {
|
||||
|
||||
private val TAG = "AutopilotStatusView"
|
||||
companion object {
|
||||
const val TAG = "AutopilotStatusView"
|
||||
}
|
||||
|
||||
private var mAutopilotStatus: Int = 0
|
||||
|
||||
init {
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
initView(context)
|
||||
}
|
||||
|
||||
@@ -51,18 +57,22 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
setOnClickListener(this)
|
||||
// 自动驾驶状态监听
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(AutoPilotStatusView_TAG, this)
|
||||
|
||||
CallerLogger.d("$M_HMI$TAG", "autopilotStatus: $mAutopilotStatus")
|
||||
setAutoPilotStatus(mAutopilotStatus)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
when (mAutopilotStatus) {
|
||||
0 -> {// 不可自动驾驶,adas与工控机没有链接,或工控机异常
|
||||
CallerLogger.e("$M_HMI$TAG", "不可自动驾驶,adas与工控机没有链接,或工控机异常,请检查")
|
||||
ToastUtils.showShort("不可自动驾驶,adas与工控机没有链接,或工控机异常,请检查")
|
||||
// TODO 这里临时触发自动驾驶能力,测试功过这里删除
|
||||
//CallerHmiListenerManager.invokeCheckAutoPilotBtnListener(true)
|
||||
}
|
||||
1 -> {// 可自动驾驶,目前处于人工干预状态
|
||||
CallerHmiListenerManager.invokeCheckAutoPilotBtnListener(true)
|
||||
@@ -85,7 +95,7 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
currentAutopilot.endName = "HYJC"
|
||||
currentAutopilot.isSpeakVoice = false
|
||||
currentAutopilot.startLatLon =
|
||||
AutopilotControlParameters.AutoPilotLonLat(getCurWgs84Lat(),getCurWgs84Lon())
|
||||
AutopilotControlParameters.AutoPilotLonLat(getCurWgs84Lat(), getCurWgs84Lon())
|
||||
currentAutopilot.endLatLon =
|
||||
AutopilotControlParameters.AutoPilotLonLat(26.819716071924688, 112.57715442110867)
|
||||
currentAutopilot.vehicleType = 10
|
||||
@@ -126,4 +136,10 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
setAutoPilotStatus(autoPilotStatusInfo.state)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(AutoPilotStatusView_TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.CameraView_TAG
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
class CameraView(context: Context, attrs: AttributeSet?) :
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs), IViewControlListener {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
setBackgroundResource(R.drawable.icon_camera_nor)
|
||||
CallerHmiViewControlListenerManager.addListener(CameraView_TAG, this)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(CameraView_TAG)
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,9 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.PerspectiveSwitchView_TAG
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getMapUIController
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
@@ -19,12 +22,20 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr), View.OnClickListener {
|
||||
) : FrameLayout(context, attrs, defStyleAttr), View.OnClickListener, IViewControlListener{
|
||||
|
||||
init {
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
LayoutInflater.from(context).inflate(R.layout.view_perspective_switch, this, true)
|
||||
setBackgroundResource(R.drawable.module_switch_map_bg)
|
||||
setOnClickListener(this)
|
||||
|
||||
CallerHmiViewControlListenerManager.addListener(PerspectiveSwitchView_TAG,this)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
@@ -41,4 +52,10 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(PerspectiveSwitchView_TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,8 +6,11 @@ import android.util.AttributeSet
|
||||
import android.view.Gravity
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.SpeedPanelView_TAG
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -22,7 +25,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr), IMoGoChassisLocationGCJ02Listener {
|
||||
) : FrameLayout(context, attrs, defStyleAttr), IMoGoChassisLocationGCJ02Listener,IViewControlListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "SpeedPanelView"
|
||||
@@ -54,7 +57,10 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
private var timerTask: TimerTask? = null
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow() // 注册位置回调
|
||||
super.onAttachedToWindow()
|
||||
// 注册view控制显示隐藏监听
|
||||
CallerHmiViewControlListenerManager.addListener(SpeedPanelView_TAG,this)
|
||||
// 注册位置回调
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
// 开启定时查询速度
|
||||
timerTask?.cancel()
|
||||
@@ -83,9 +89,15 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 解除注册
|
||||
CallerHmiViewControlListenerManager.removeListener(SpeedPanelView_TAG)
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
try {
|
||||
timerTask?.cancel()
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.*
|
||||
import android.widget.*
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.mofang.MfConstants
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.devatools.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
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
|
||||
|
||||
@@ -20,7 +21,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener {
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener, IViewControlListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "StatusBarView"
|
||||
@@ -37,17 +38,19 @@ class StatusBarView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewStatusBarRight.addView(BatteryGroupView(this.context))
|
||||
|
||||
//将状态窗口中的状态移到状态栏上
|
||||
CallerDevaToolsManager.showStatusBar(context, status_container)
|
||||
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
|
||||
var isBluetoothConnect = SharedPrefsMgr.getInstance(context).getBoolean(MfConstants.BLUETOOTH_STATUS, false)
|
||||
val isBluetoothConnect =
|
||||
SharedPrefsMgr.getInstance(context).getBoolean(MfConstants.BLUETOOTH_STATUS, false)
|
||||
if (isBluetoothConnect) {
|
||||
updateMfStatus("MoFangManager", true)
|
||||
}
|
||||
|
||||
//添加view控制
|
||||
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
//将状态窗口中的状态移到状态栏上
|
||||
CallerDevaToolsManager.showStatusBar(context, status_container)
|
||||
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
@@ -57,15 +60,13 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun setStatusBarDarkOrLight(light: Boolean) {
|
||||
if (light) {
|
||||
setTextColor(resources.getColor(R.color.color_2C2E30))
|
||||
} else {
|
||||
setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
}
|
||||
override 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) {
|
||||
override fun updateStatusBarRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
if (insert) {
|
||||
rightViewList.add(0, tag)
|
||||
viewStatusBarRight.addView(viewGroup, 0)
|
||||
@@ -79,7 +80,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
override fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
if (insert) {
|
||||
leftViewList.add(0, tag)
|
||||
viewStatusBarLeft.addView(viewGroup, 0)
|
||||
@@ -93,7 +94,8 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateProgressView(insert: Boolean, tag: String, progress: Int) {
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
if (insert) {
|
||||
viewProgressTv.visibility = VISIBLE
|
||||
viewProgressTv.text = "$progress%"
|
||||
@@ -102,7 +104,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateMfStatus(tag: String, status: Boolean) {
|
||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
||||
if (status) {
|
||||
viewMofangStatus.setImageResource(R.drawable.icon_bluetooth_p)
|
||||
} else {
|
||||
@@ -117,6 +119,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import com.mogo.eagle.core.data.config.HdMapBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
|
||||
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.devatools.CallerDevaToolsManager;
|
||||
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;
|
||||
@@ -137,7 +138,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
View statusBarView = decorView.findViewWithTag("status_bar");
|
||||
if (statusBarView == null) {
|
||||
statusBarView = new StatusBarView(this);
|
||||
statusBarView = getStatusBarView();
|
||||
statusBarView.setTag("status_bar");
|
||||
}
|
||||
FrameLayout.LayoutParams statusBarLP =
|
||||
@@ -147,6 +148,14 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
decorView.addView(statusBarView, statusBarLP);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改statusBar 重写实现,需要继承 StatusBarView,xml中基础系统控件不要修改其id,拿来即用
|
||||
* @return StatusBarView
|
||||
*/
|
||||
protected StatusBarView getStatusBarView(){
|
||||
return new StatusBarView(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -163,6 +172,9 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
DisplayEffectsHelper.getInstance().init(clSpecialEffect);
|
||||
|
||||
mPresenter.checkPermission(this);
|
||||
|
||||
// 同步AppInfo Config信息
|
||||
CallerDevaToolsManager.INSTANCE.syncConfig();
|
||||
}
|
||||
|
||||
private void calculateStartTime() {
|
||||
|
||||
@@ -213,13 +213,13 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
|
||||
// BIZ
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_FUNC_BIZ, "IMoGoNoticeProvider"));
|
||||
// 车聊聊,IM
|
||||
// todo 后置 车聊聊,IM
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(ChatConsts.CHAT_PROVIDER_PATH, ChatConsts.CHAT_MODULE_NAME));
|
||||
// V2X 模块
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
|
||||
// 司机身份专属模块
|
||||
// 司机身份专属
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
// 地图数据收集模块
|
||||
// todo 后置 地图数据收集模块
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_MAP_DATA_COLLECT_PROVIDER, "MoGoMapDataCollector"));
|
||||
}
|
||||
CallerLogger.INSTANCE.i(M_HMI + TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
|
||||
@@ -28,26 +28,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="72dp">
|
||||
<!--脉速表-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SpeedPanelView
|
||||
android:id="@+id/viewSpeedChart"
|
||||
android:layout_width="@dimen/module_ext_speed_width"
|
||||
android:layout_height="@dimen/module_ext_speed_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_autopilot_status_margin_left"
|
||||
android:layout_marginTop="@dimen/module_ext_arcView_top"
|
||||
android:elevation="@dimen/dp_10"
|
||||
<!--Vip车辆标志-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--Vip车辆标志-->
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView-->
|
||||
<!-- android:id="@+id/flVipIdentificationView"-->
|
||||
<!-- android:layout_width="@dimen/module_vip_width"-->
|
||||
<!-- android:layout_height="@dimen/module_vip_height"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- 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"
|
||||
@@ -58,25 +47,13 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--自动驾驶按钮及状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.AutoPilotStatusView
|
||||
android:id="@+id/viewAutopilotStatus"
|
||||
android:layout_width="@dimen/module_mogo_autopilot_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_autopilot_status_bg_height"
|
||||
android:layout_marginTop="@dimen/module_mogo_autopilot_status_margin_top"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/viewSpeedChart"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewSpeedChart"
|
||||
app:layout_goneMarginStart="@dimen/module_mogo_autopilot_status_margin_left" />
|
||||
|
||||
<!--超视距-->
|
||||
<ImageView
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CameraView
|
||||
android:id="@+id/ivCameraIcon"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="45dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/icon_camera_nor"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewTrafficLightVr"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
@@ -102,7 +79,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<View
|
||||
<!--隐藏态下的 美化模式按钮-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.switch.DemoModeHiddenSwitch
|
||||
android:id="@+id/viewDemoModeSwitch"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="100dp"
|
||||
@@ -111,54 +89,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--工具箱-->
|
||||
<ImageView
|
||||
android:id="@+id/ivToolsIcon"
|
||||
android:layout_width="@dimen/module_hmi_check_size"
|
||||
android:layout_height="@dimen/module_hmi_check_size"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/module_ext_check"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_tools_nor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/viewPerspectiveSwitch"
|
||||
app:layout_goneMarginStart="50dp" />
|
||||
|
||||
<!--问题反馈-->
|
||||
<ImageView
|
||||
android:id="@+id/ivBadCaseTools"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@drawable/bad_case_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivToolsIcon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAiCollectTools"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@drawable/ai_collect_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivBadCaseTools" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUpgradeTips"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/ivToolsIcon"
|
||||
app:layout_constraintCircleAngle="45"
|
||||
app:layout_constraintCircleRadius="60dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<!--限速牌子-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.LimitingVelocityView
|
||||
android:id="@+id/viewLimitingVelocity"
|
||||
@@ -188,7 +118,7 @@
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:button="@null"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />
|
||||
|
||||
@@ -245,7 +175,7 @@
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver" />
|
||||
|
||||
@@ -289,6 +219,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.pnc.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user