Merge branch 'dev/dev_eagle_architecture_upgrade' into dev/dev_eagle_wuhan_sikua_obu
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -20,7 +20,9 @@
|
|||||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="1.0" />
|
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="1.0" />
|
||||||
<entry key="modules/mogo-module-adas/src/main/res/drawable/module_adas_left_corner_bg.xml" value="0.22125" />
|
<entry key="modules/mogo-module-adas/src/main/res/drawable/module_adas_left_corner_bg.xml" value="0.22125" />
|
||||||
<entry key="modules/mogo-module-adas/src/main/res/layout/dialog_adas_dispatch_remind.xml" value="0.22658490296325878" />
|
<entry key="modules/mogo-module-adas/src/main/res/layout/dialog_adas_dispatch_remind.xml" value="0.22658490296325878" />
|
||||||
|
<entry key="modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps.xml" value="0.28125" />
|
||||||
<entry key="modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps_navigator.xml" value="0.27395833333333336" />
|
<entry key="modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps_navigator.xml" value="0.27395833333333336" />
|
||||||
|
<entry key="modules/mogo-module-apps/src/main/res/layout/module_apps_item_app.xml" value="0.28125" />
|
||||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.375" />
|
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.375" />
|
||||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/fragment_warning.xml" value="0.34427083333333336" />
|
<entry key="modules/mogo-module-hmi/src/main/res/layout/fragment_warning.xml" value="0.34427083333333336" />
|
||||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/module_hmi_warning_v2x.xml" value="0.246875" />
|
<entry key="modules/mogo-module-hmi/src/main/res/layout/module_hmi_warning_v2x.xml" value="0.246875" />
|
||||||
|
|||||||
@@ -203,6 +203,11 @@ dependencies {
|
|||||||
implementation project(':core:function-impl:mogo-core-function-obu-mogo')
|
implementation project(':core:function-impl:mogo-core-function-obu-mogo')
|
||||||
implementation project(':core:function-impl:mogo-core-function-smp')
|
implementation project(':core:function-impl:mogo-core-function-smp')
|
||||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||||
|
implementation project(':core:function-impl:mogo-core-function-autopilot')
|
||||||
|
implementation project(':core:function-impl:mogo-core-function-check')
|
||||||
|
implementation project(':core:function-impl:mogo-core-function-map')
|
||||||
|
implementation project(':core:function-impl:mogo-core-function-notice')
|
||||||
|
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ import com.mogo.utils.ProcessUtils;
|
|||||||
import com.mogo.utils.logger.LogLevel;
|
import com.mogo.utils.logger.LogLevel;
|
||||||
import com.mogo.utils.logger.Logger;
|
import com.mogo.utils.logger.Logger;
|
||||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||||
//import com.squareup.leakcanary.LeakCanary;
|
|
||||||
//import com.squareup.leakcanary.RefWatcher;
|
|
||||||
import com.zhidao.boot.persistent.lib.PersistentManager;
|
import com.zhidao.boot.persistent.lib.PersistentManager;
|
||||||
import com.zhidao.mogo.module.left.panel.LeftPanelConst;
|
import com.zhidao.mogo.module.left.panel.LeftPanelConst;
|
||||||
|
|
||||||
@@ -288,25 +286,30 @@ public class MogoApplication extends AbsMogoApplication {
|
|||||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_STRATEGY_SHARE, "StrategyShare"));
|
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_STRATEGY_SHARE, "StrategyShare"));
|
||||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GAODE_AIMLESS_SHARE, "GaoDeAimlessShare"));
|
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GAODE_AIMLESS_SHARE, "GaoDeAimlessShare"));
|
||||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor"));
|
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor"));
|
||||||
|
|
||||||
|
// 域控制器模块(新)
|
||||||
|
MogoModulePaths.addModuleFunction(new MogoModule(MogoServicePaths.PATH_AUTO_PILOT, "IMoGoAutoPilotProvider"));
|
||||||
|
// OBU 模块
|
||||||
|
MogoModulePaths.addModuleFunction(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
|
||||||
|
// 小地图模块
|
||||||
|
MogoModulePaths.addModuleFunction(new MogoModule(MogoServicePaths.PATH_SMALL_MAP, "IMogoSmallMapProvider"));
|
||||||
|
// widgets 模块
|
||||||
|
MogoModulePaths.addModuleFunction(new MogoModule(MogoServicePaths.PATH_V2X_WARNING, "IMoGoWaringProvider"));
|
||||||
|
|
||||||
// 自动驾驶系统检测模块
|
// 自动驾驶系统检测模块
|
||||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_CHECK, "CheckProvider"));
|
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_CHECK, "CheckProvider"));
|
||||||
// 推送模块
|
// 推送模块
|
||||||
MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, PushUIConstants.NAME));
|
MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, PushUIConstants.NAME));
|
||||||
// 碰撞报警模块
|
// 碰撞报警模块
|
||||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_CRASH_WARNING, "CrashWarning"));
|
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_CRASH_WARNING, "IMogoCrashWarnProvider"));
|
||||||
// OBU 模块
|
// ADAS模块(旧,慢慢被 域控制器模块 替换掉)
|
||||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
|
|
||||||
// 小地图模块
|
|
||||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_SMALL_MAP, "IMogoSmallMapProvider"));
|
|
||||||
// widgets 模块
|
|
||||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_WARNING, "IMoGoWaringProvider"));
|
|
||||||
// ADAS模块
|
|
||||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider"));
|
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider"));
|
||||||
// 前方碰撞预警
|
// 前方碰撞预警
|
||||||
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_FRONT_CRASH_WARNING, "IV2XManagerProvider"));
|
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_FRONT_CRASH_WARNING, "IV2XManagerProvider"));
|
||||||
// 全局语音唤醒
|
// 全局语音唤醒
|
||||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake"));
|
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake"));
|
||||||
|
|
||||||
|
|
||||||
if (!DebugConfig.isLauncher()) {
|
if (!DebugConfig.isLauncher()) {
|
||||||
PersistentManager.getInstance().initManager(this);
|
PersistentManager.getInstance().initManager(this);
|
||||||
Intent intent = new Intent(this, MogoMainService.class);
|
Intent intent = new Intent(this, MogoMainService.class);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ ext {
|
|||||||
callchatprovider : "com.mogo.module.carchatout:module-carchatting-provider:${CARCHATTINGPROVIDER_VERSION}",
|
callchatprovider : "com.mogo.module.carchatout:module-carchatting-provider:${CARCHATTINGPROVIDER_VERSION}",
|
||||||
|
|
||||||
guideshow : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDESHOW_VERSION}",
|
guideshow : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDESHOW_VERSION}",
|
||||||
mogomodulecheck : "com.mogo.module:mogo-module-check:${MOGO_MODULE_CHECK_VERSION}",
|
mogomodulecheck : "com.mogo.module:mogo-module-check:${MOGO_MODULE_CHECK_VERSION}",
|
||||||
// V2X
|
// V2X
|
||||||
moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}",
|
moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}",
|
||||||
moduleSmallMap : "com.mogo.module:module-small-map:${MOGO_MODULE_SMP_VERSION}",
|
moduleSmallMap : "com.mogo.module:module-small-map:${MOGO_MODULE_SMP_VERSION}",
|
||||||
@@ -130,7 +130,7 @@ ext {
|
|||||||
// OBU
|
// OBU
|
||||||
moduleobu : "com.mogo.module:module-obu:${MOGO_MODULE_OBU_VERSION}",
|
moduleobu : "com.mogo.module:module-obu:${MOGO_MODULE_OBU_VERSION}",
|
||||||
moduleobumogo : "com.mogo.module:module-obu:${MOGO_MODULE_OBU_MOGO_VERSION}",
|
moduleobumogo : "com.mogo.module:module-obu:${MOGO_MODULE_OBU_MOGO_VERSION}",
|
||||||
carmanager : "com.zhidao.carmanager:common:1.0.30@aar",
|
carmanager : "com.zhidao.carmanager:common:1.0.30@aar",
|
||||||
|
|
||||||
//
|
//
|
||||||
jetbrainsannotationsjava5 : "org.jetbrains:annotations-java5:15.0",
|
jetbrainsannotationsjava5 : "org.jetbrains:annotations-java5:15.0",
|
||||||
@@ -166,9 +166,9 @@ ext {
|
|||||||
|
|
||||||
// obu sdk
|
// obu sdk
|
||||||
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
||||||
// mebulaobu : 'com.zhidao.support.nebulaobu:nebulaobu:1.0.0.3',
|
|
||||||
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.15',
|
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.15',
|
||||||
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.3',
|
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.3',
|
||||||
|
adasHigh : 'com.zhidao.support.adas:high:1.2.0.4',
|
||||||
|
|
||||||
// 左侧面板
|
// 左侧面板
|
||||||
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_MODULE_LEFT_PANEL_VERSION}",
|
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_MODULE_LEFT_PANEL_VERSION}",
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ dependencies {
|
|||||||
|
|
||||||
kapt rootProject.ext.dependencies.aroutercompiler
|
kapt rootProject.ext.dependencies.aroutercompiler
|
||||||
|
|
||||||
implementation "com.zhidao.support.adas:high:1.2.0.2"
|
implementation rootProject.ext.dependencies.adasHigh
|
||||||
|
|
||||||
if (Boolean.valueOf(RELEASE)) {
|
if (Boolean.valueOf(RELEASE)) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,20 @@ import com.zhidao.support.adas.high.AdasManager
|
|||||||
*/
|
*/
|
||||||
@Route(path = MogoServicePaths.PATH_AUTO_PILOT)
|
@Route(path = MogoServicePaths.PATH_AUTO_PILOT)
|
||||||
class MoGoAutoPilotProvider : IMoGoAutoPilotProvider {
|
class MoGoAutoPilotProvider : IMoGoAutoPilotProvider {
|
||||||
override fun init(context: Context) {}
|
|
||||||
override fun connectAutoPilot() {}
|
override fun init(context: Context) {
|
||||||
|
// 初始化ADAS 域控制器
|
||||||
|
AdasManager.getInstance().create(context)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun connectAutoPilot() {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun startAutoPilot(result: AutoPilotControlParameters) {
|
override fun startAutoPilot(result: AutoPilotControlParameters) {
|
||||||
if (AdasManager.getInstance().isSocketConnect) {
|
if (AdasManager.getInstance().isSocketConnect) {
|
||||||
val parameter =
|
val parameter =
|
||||||
@@ -49,6 +61,11 @@ class MoGoAutoPilotProvider : IMoGoAutoPilotProvider {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun recordPackage(): Boolean {
|
||||||
|
return AdasManager.getInstance().recordPackage()
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "MogoAutoPilotProvider"
|
private const val TAG = "MogoAutoPilotProvider"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import com.mogo.eagle.core.function.hmi.R
|
|||||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||||
import com.mogo.eagle.core.function.hmi.notification.enums.SidePattern
|
import com.mogo.eagle.core.function.hmi.notification.enums.SidePattern
|
||||||
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
|
||||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||||
import com.mogo.module.common.enums.EventTypeEnum
|
import com.mogo.module.common.enums.EventTypeEnum
|
||||||
import com.mogo.utils.logger.Logger
|
import com.mogo.utils.logger.Logger
|
||||||
@@ -29,48 +28,9 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
|||||||
MoGoWarningContract.View {
|
MoGoWarningContract.View {
|
||||||
|
|
||||||
var mWarningFloat: WarningFloat.Builder? = null
|
var mWarningFloat: WarningFloat.Builder? = null
|
||||||
var mDebugSettingViewFloat: WarningFloat.Builder? = null
|
|
||||||
|
|
||||||
override fun initViews() {
|
override fun initViews() {
|
||||||
autopilotStatus.setOnLongClickListener {
|
|
||||||
activity?.let {
|
|
||||||
val debugSettingView = DebugSettingView(it)
|
|
||||||
|
|
||||||
if (mDebugSettingViewFloat != null) {
|
|
||||||
WarningFloat.dismiss(mDebugSettingViewFloat!!.config.floatTag, false)
|
|
||||||
mDebugSettingViewFloat = null
|
|
||||||
} else {
|
|
||||||
mDebugSettingViewFloat = WarningFloat.with(it)
|
|
||||||
.setTag("DebugSettingView")
|
|
||||||
.setLayout(debugSettingView)
|
|
||||||
.setSidePattern(SidePattern.RIGHT)
|
|
||||||
.setGravity(Gravity.RIGHT, offsetY = 70)
|
|
||||||
.setImmersionStatusBar(true)
|
|
||||||
.setAnimator(object : DefaultAnimator() {
|
|
||||||
override fun enterAnim(
|
|
||||||
view: View,
|
|
||||||
params: WindowManager.LayoutParams,
|
|
||||||
windowManager: WindowManager,
|
|
||||||
sidePattern: SidePattern
|
|
||||||
): Animator? =
|
|
||||||
super.enterAnim(view, params, windowManager, sidePattern)?.apply {
|
|
||||||
interpolator = OvershootInterpolator()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun exitAnim(
|
|
||||||
view: View,
|
|
||||||
params: WindowManager.LayoutParams,
|
|
||||||
windowManager: WindowManager,
|
|
||||||
sidePattern: SidePattern
|
|
||||||
): Animator? =
|
|
||||||
super.exitAnim(view, params, windowManager, sidePattern)
|
|
||||||
?.setDuration(200)
|
|
||||||
})
|
|
||||||
.show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getLayoutId(): Int {
|
override fun getLayoutId(): Int {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.constants.MoGoConfig
|
|||||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener
|
||||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||||
|
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
|
||||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||||
@@ -92,6 +93,11 @@ class DebugSettingView @JvmOverloads constructor(
|
|||||||
ToastUtils.showShort("请输入正确的IP地址")
|
ToastUtils.showShort("请输入正确的IP地址")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 域控制器
|
||||||
|
btnRecordPackage.setOnClickListener {
|
||||||
|
CallerAutoPilotManager.recordPackage()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,22 +1,27 @@
|
|||||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||||
|
|
||||||
|
import android.animation.Animator
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.location.Location
|
import android.location.Location
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.WindowManager
|
||||||
|
import android.view.animation.OvershootInterpolator
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import com.alibaba.android.arouter.launcher.ARouter
|
import com.alibaba.android.arouter.launcher.ARouter
|
||||||
import com.mogo.commons.debug.DebugConfig
|
import com.mogo.commons.debug.DebugConfig
|
||||||
import com.mogo.eagle.core.function.hmi.R
|
|
||||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
|
||||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2
|
|
||||||
import com.mogo.module.common.MogoApisHandler
|
|
||||||
import com.mogo.service.IMogoServiceApis
|
|
||||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||||
|
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||||
|
import com.mogo.eagle.core.function.hmi.R
|
||||||
|
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||||
|
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||||
|
import com.mogo.eagle.core.function.hmi.notification.enums.SidePattern
|
||||||
|
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
||||||
|
import com.mogo.map.navi.IMogoCarLocationChangedListener2
|
||||||
|
import com.mogo.service.IMogoServiceApis
|
||||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||||
import com.mogo.service.statusmanager.StatusDescriptor
|
import com.mogo.service.statusmanager.StatusDescriptor
|
||||||
|
|
||||||
@@ -38,6 +43,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
|||||||
|
|
||||||
var mContext: Context
|
var mContext: Context
|
||||||
var mSpeedChartView: SpeedChartView
|
var mSpeedChartView: SpeedChartView
|
||||||
|
var mDebugSettingViewFloat: WarningFloat.Builder? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
setBackgroundResource(R.drawable.yi_biao_pan_bg_nor)
|
setBackgroundResource(R.drawable.yi_biao_pan_bg_nor)
|
||||||
@@ -54,12 +60,45 @@ class SpeedPanelView @JvmOverloads constructor(
|
|||||||
|
|
||||||
if (DebugConfig.isDebug()) {
|
if (DebugConfig.isDebug()) {
|
||||||
mSpeedChartView.isLongClickable = true
|
mSpeedChartView.isLongClickable = true
|
||||||
mSpeedChartView.setOnLongClickListener { v ->
|
mSpeedChartView.setOnLongClickListener {
|
||||||
Log.d(TAG, "长按显示状态工具栏")
|
Log.d(TAG, "长按显示状态工具栏")
|
||||||
val intent = Intent()
|
context.let {
|
||||||
intent.putExtra("oper", 52)
|
val debugSettingView = DebugSettingView(it)
|
||||||
MogoApisHandler.getInstance().apis.intentManagerApi
|
|
||||||
.invoke("com.mogo.mock", intent)
|
if (mDebugSettingViewFloat != null) {
|
||||||
|
WarningFloat.dismiss(mDebugSettingViewFloat!!.config.floatTag, false)
|
||||||
|
mDebugSettingViewFloat = null
|
||||||
|
} else {
|
||||||
|
mDebugSettingViewFloat = WarningFloat.with(it)
|
||||||
|
.setTag("DebugSettingView")
|
||||||
|
.setLayout(debugSettingView)
|
||||||
|
.setSidePattern(SidePattern.RIGHT)
|
||||||
|
.setGravity(Gravity.RIGHT, offsetY = 70)
|
||||||
|
.setImmersionStatusBar(true)
|
||||||
|
.setAnimator(object : DefaultAnimator() {
|
||||||
|
override fun enterAnim(
|
||||||
|
view: View,
|
||||||
|
params: WindowManager.LayoutParams,
|
||||||
|
windowManager: WindowManager,
|
||||||
|
sidePattern: SidePattern
|
||||||
|
): Animator? =
|
||||||
|
super.enterAnim(view, params, windowManager, sidePattern)
|
||||||
|
?.apply {
|
||||||
|
interpolator = OvershootInterpolator()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun exitAnim(
|
||||||
|
view: View,
|
||||||
|
params: WindowManager.LayoutParams,
|
||||||
|
windowManager: WindowManager,
|
||||||
|
sidePattern: SidePattern
|
||||||
|
): Animator? =
|
||||||
|
super.exitAnim(view, params, windowManager, sidePattern)
|
||||||
|
?.setDuration(200)
|
||||||
|
})
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,15 @@
|
|||||||
android:textSize="@dimen/dp_34"
|
android:textSize="@dimen/dp_34"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnRecordPackage"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="@dimen/dp_5"
|
||||||
|
android:text="录制Bag包"
|
||||||
|
android:textSize="@dimen/dp_34" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvAutopilotInfo"
|
android:id="@+id/tvAutopilotInfo"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ dependencies {
|
|||||||
|
|
||||||
kapt rootProject.ext.dependencies.aroutercompiler
|
kapt rootProject.ext.dependencies.aroutercompiler
|
||||||
|
|
||||||
implementation "com.zhidao.support.adas:high:1.2.0.2"
|
implementation rootProject.ext.dependencies.adasHigh
|
||||||
|
|
||||||
if (Boolean.valueOf(RELEASE)) {
|
if (Boolean.valueOf(RELEASE)) {
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ dependencies {
|
|||||||
|
|
||||||
kapt rootProject.ext.dependencies.aroutercompiler
|
kapt rootProject.ext.dependencies.aroutercompiler
|
||||||
|
|
||||||
implementation "com.zhidao.support.adas:high:1.2.0.2"
|
implementation rootProject.ext.dependencies.adasHigh
|
||||||
|
|
||||||
if (Boolean.valueOf(RELEASE)) {
|
if (Boolean.valueOf(RELEASE)) {
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ class AutoPilotStatusInfo {
|
|||||||
/**
|
/**
|
||||||
* 当前链接的IP地址, 默认地址 192.168.1.102
|
* 当前链接的IP地址, 默认地址 192.168.1.102
|
||||||
*/
|
*/
|
||||||
var connectIP: String = "192.168.1.102"
|
var connectIP: String = "0.0.0.0"
|
||||||
var connectStatus = false
|
var connectStatus = false
|
||||||
|
var version: String = "v0.0"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定位是否可用
|
* 定位是否可用
|
||||||
|
|||||||
@@ -34,4 +34,11 @@ public interface IMoGoAutoPilotProvider extends IMoGoFunctionServerProvider {
|
|||||||
*/
|
*/
|
||||||
int getAutopilotStatus();
|
int getAutopilotStatus();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启域控制器录制bag包
|
||||||
|
*
|
||||||
|
* @return true-成功,false-失败
|
||||||
|
*/
|
||||||
|
boolean recordPackage();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.mogo.eagle.core.function.call.autopilot
|
||||||
|
|
||||||
|
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||||
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotProvider
|
||||||
|
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@author xiaoyuzhou
|
||||||
|
*@date 2021/10/14 2:15 下午
|
||||||
|
* 域控制器管理
|
||||||
|
*/
|
||||||
|
object CallerAutoPilotManager {
|
||||||
|
private val providerApi: IMoGoAutoPilotProvider
|
||||||
|
get() = CallerBase.getApiInstance(
|
||||||
|
IMoGoAutoPilotProvider::class.java,
|
||||||
|
MogoServicePaths.PATH_AUTO_PILOT
|
||||||
|
)
|
||||||
|
|
||||||
|
fun recordPackage() {
|
||||||
|
providerApi.recordPackage()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
|||||||
/**
|
/**
|
||||||
*@author xiaoyuzhou
|
*@author xiaoyuzhou
|
||||||
*@date 2021/10/11 8:30 下午
|
*@date 2021/10/11 8:30 下午
|
||||||
|
* 自研OBU管理
|
||||||
*/
|
*/
|
||||||
object CallerOBUManager {
|
object CallerOBUManager {
|
||||||
private val providerApi: IMoGoObuProvider
|
private val providerApi: IMoGoObuProvider
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ dependencies {
|
|||||||
// 现有的ADAS的通讯SDK,需要将里面的东西融合到我们项目中
|
// 现有的ADAS的通讯SDK,需要将里面的东西融合到我们项目中
|
||||||
compileOnly rootProject.ext.dependencies.adasapi
|
compileOnly rootProject.ext.dependencies.adasapi
|
||||||
|
|
||||||
api "com.zhidao.support.adas:high:1.2.0.2"
|
api rootProject.ext.dependencies.adasHigh
|
||||||
implementation rootProject.ext.dependencies.mogoami
|
implementation rootProject.ext.dependencies.mogoami
|
||||||
|
|
||||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ public class AdasAutoPilotManager implements IMogoOnMessageListener<DispatchAdas
|
|||||||
|
|
||||||
private DispatchRemindDialog dispatchRemindDialog;
|
private DispatchRemindDialog dispatchRemindDialog;
|
||||||
private LineOverlayManager lineOverlayManager;
|
private LineOverlayManager lineOverlayManager;
|
||||||
private MogoLocation mogoLocation;
|
|
||||||
private IDispatchResultListener dispatchResultListener;
|
private IDispatchResultListener dispatchResultListener;
|
||||||
private DispatchAdasAutoPilotLocReceiverBean receiverBean;
|
private DispatchAdasAutoPilotLocReceiverBean receiverBean;
|
||||||
private List<MogoLatLng> latLngList;
|
private List<MogoLatLng> latLngList;
|
||||||
@@ -197,7 +196,6 @@ public class AdasAutoPilotManager implements IMogoOnMessageListener<DispatchAdas
|
|||||||
loc.setAltitude(location.getAltitude());
|
loc.setAltitude(location.getAltitude());
|
||||||
loc.setBearing(location.getBearing());
|
loc.setBearing(location.getBearing());
|
||||||
loc.setProvider(location.getProvider());
|
loc.setProvider(location.getProvider());
|
||||||
mogoLocation = loc;
|
|
||||||
// if (drawLine) {
|
// if (drawLine) {
|
||||||
// lineOverlayManager.draw(mogoLocation, latLngList);
|
// lineOverlayManager.draw(mogoLocation, latLngList);
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.mogo.utils.logger.Logger;
|
|||||||
import com.mogo.utils.network.utils.GsonUtil;
|
import com.mogo.utils.network.utils.GsonUtil;
|
||||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotArriveModel;
|
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotArriveModel;
|
||||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotStateModel;
|
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotStateModel;
|
||||||
|
import com.zhidao.support.adas.high.AdasManager;
|
||||||
import com.zhidao.support.adas.high.OnAdasListener;
|
import com.zhidao.support.adas.high.OnAdasListener;
|
||||||
import com.zhidao.support.adas.high.OnAdasMsgConnectStatusListener;
|
import com.zhidao.support.adas.high.OnAdasMsgConnectStatusListener;
|
||||||
import com.zhidao.support.adas.high.bean.AutopilotRoute;
|
import com.zhidao.support.adas.high.bean.AutopilotRoute;
|
||||||
@@ -19,6 +20,7 @@ import com.zhidao.support.adas.high.bean.LightStatueInfo;
|
|||||||
import com.zhidao.support.adas.high.bean.ObstaclesInfo;
|
import com.zhidao.support.adas.high.bean.ObstaclesInfo;
|
||||||
import com.zhidao.support.adas.high.bean.RectInfo;
|
import com.zhidao.support.adas.high.bean.RectInfo;
|
||||||
import com.zhidao.support.adas.high.bean.WarnMessageInfo;
|
import com.zhidao.support.adas.high.bean.WarnMessageInfo;
|
||||||
|
import com.zhidao.support.adas.high.bean.guardian.AutopilotGuardianInfo;
|
||||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -26,7 +28,6 @@ import java.util.concurrent.TimeUnit;
|
|||||||
|
|
||||||
import io.reactivex.Flowable;
|
import io.reactivex.Flowable;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.disposables.Disposable;
|
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,12 +43,10 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
|||||||
private final Gson gson;
|
private final Gson gson;
|
||||||
private final ArrayList<IAdasDataListener> iAdasEventListeners = new ArrayList<>();
|
private final ArrayList<IAdasDataListener> iAdasEventListeners = new ArrayList<>();
|
||||||
private final ArrayList<IAdasStatusListener> iAdasStatusListeners = new ArrayList<>();
|
private final ArrayList<IAdasStatusListener> iAdasStatusListeners = new ArrayList<>();
|
||||||
private Disposable uploadAutopilotStatus;
|
|
||||||
//自动驾驶状态
|
//自动驾驶状态
|
||||||
private int mCurrentAutopilotStatus = -1;
|
private int mCurrentAutopilotStatus = -1;
|
||||||
//自动驾驶车速度
|
//自动驾驶车速度
|
||||||
private float mCurrentAutopilotSpeed = 0;
|
private float mCurrentAutopilotSpeed = 0;
|
||||||
private Disposable mdDisposable;
|
|
||||||
//自动驾驶状态
|
//自动驾驶状态
|
||||||
private AutopilotStatus.ValuesBean mAutopilotValuesStatus = null;
|
private AutopilotStatus.ValuesBean mAutopilotValuesStatus = null;
|
||||||
|
|
||||||
@@ -192,6 +191,9 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
|||||||
autopilotStatusInfo.setRtk(autopilotStatusValues.getRtk());
|
autopilotStatusInfo.setRtk(autopilotStatusValues.getRtk());
|
||||||
autopilotStatusInfo.setRadar(autopilotStatusValues.getRadar());
|
autopilotStatusInfo.setRadar(autopilotStatusValues.getRadar());
|
||||||
autopilotStatusInfo.setSpeed(autopilotStatusValues.getSpeed());
|
autopilotStatusInfo.setSpeed(autopilotStatusValues.getSpeed());
|
||||||
|
// 初始化自动驾驶状态信息
|
||||||
|
autopilotStatusInfo.setVersion(AdasManager.getInstance().getAdasConfig().getVersion());
|
||||||
|
autopilotStatusInfo.setConnectIP(AdasManager.getInstance().getAdasConfig().getAddress());
|
||||||
|
|
||||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
||||||
|
|
||||||
@@ -257,10 +259,18 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAutopilotGuardian(AutopilotGuardianInfo guardianInfo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWebSocketConnectSuccess() {
|
public void onWebSocketConnectSuccess() {
|
||||||
Logger.d(TAG, "webSocket 连接成功");
|
Logger.d(TAG, "webSocket 连接成功");
|
||||||
|
// 初始化自动驾驶状态信息
|
||||||
|
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectIP(AdasManager.getInstance().getAdasConfig().getAddress());
|
||||||
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectStatus(true);
|
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectStatus(true);
|
||||||
|
|
||||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
||||||
for (IAdasStatusListener listener : iAdasStatusListeners) {
|
for (IAdasStatusListener listener : iAdasStatusListeners) {
|
||||||
listener.onServiceConnected();
|
listener.onServiceConnected();
|
||||||
@@ -269,8 +279,9 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWebSocketConnectFailed() {
|
public void onWebSocketConnectFailed(String reason) {
|
||||||
Logger.d(TAG, "webSocket 连接失败");
|
Logger.d(TAG, "webSocket 连接失败 reason:" + reason);
|
||||||
|
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectIP(AdasManager.getInstance().getAdasConfig().getAddress());
|
||||||
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectStatus(false);
|
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectStatus(false);
|
||||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
||||||
for (IAdasStatusListener listener : iAdasStatusListeners) {
|
for (IAdasStatusListener listener : iAdasStatusListeners) {
|
||||||
@@ -280,7 +291,7 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
|||||||
|
|
||||||
public void updateDriveStatusTask() {
|
public void updateDriveStatusTask() {
|
||||||
Logger.d(TAG, "updateDriveStatusTask");
|
Logger.d(TAG, "updateDriveStatusTask");
|
||||||
mdDisposable = Flowable.interval(0, 5, TimeUnit.SECONDS)
|
Flowable.interval(0, 5, TimeUnit.SECONDS)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.unsubscribeOn(Schedulers.io())
|
.unsubscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -295,10 +306,6 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
|||||||
AdasServiceModel.getInstance().reportSite(lon, lat);
|
AdasServiceModel.getInstance().reportSite(lon, lat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AutopilotStatus.ValuesBean getAutopilotValuesStatus() {
|
|
||||||
return mAutopilotValuesStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AdasAIDLAutopilotStateModel autopilotStateCall() {
|
public AdasAIDLAutopilotStateModel autopilotStateCall() {
|
||||||
AdasAIDLAutopilotStateModel adasAIDLAutopilotStateModel = new AdasAIDLAutopilotStateModel();
|
AdasAIDLAutopilotStateModel adasAIDLAutopilotStateModel = new AdasAIDLAutopilotStateModel();
|
||||||
if (mAutopilotValuesStatus != null) {
|
if (mAutopilotValuesStatus != null) {
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ public class AdasProvider implements IProvider {
|
|||||||
Logger.d(TAG, "初始化 AdasProvider 模块");
|
Logger.d(TAG, "初始化 AdasProvider 模块");
|
||||||
adasEventManager = AdasEventManager.getInstance();
|
adasEventManager = AdasEventManager.getInstance();
|
||||||
initAdas(context, adasEventManager);
|
initAdas(context, adasEventManager);
|
||||||
// initAutoPilotBusiness(context);
|
|
||||||
|
|
||||||
addAdasStatusListener(new IAdasStatusListener() {
|
addAdasStatusListener(new IAdasStatusListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onServiceConnected() {
|
public void onServiceConnected() {
|
||||||
@@ -52,15 +50,7 @@ public class AdasProvider implements IProvider {
|
|||||||
adasEventManager.setProviderBizListener(this::setBasicInfo);
|
adasEventManager.setProviderBizListener(this::setBasicInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initAutoPilotBusiness(Context context) {
|
public void setBasicInfo() {
|
||||||
AdasAutoPilotManager.getInstance().initSocket(context);
|
|
||||||
AdasAutoPilotManager.getInstance().addIDispatchResult(json -> {
|
|
||||||
Logger.d(TAG,"aiCloudToAdasData json : " + json);
|
|
||||||
AdasManager.getInstance().aiCloudToAdasData(json);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBasicInfo(){
|
|
||||||
BasicInfo info = new BasicInfo();
|
BasicInfo info = new BasicInfo();
|
||||||
info.setSn(MoGoAiCloudClientConfig.getInstance().getSn());
|
info.setSn(MoGoAiCloudClientConfig.getInstance().getSn());
|
||||||
AdasManager.getInstance().setBasicInfo(info);
|
AdasManager.getInstance().setBasicInfo(info);
|
||||||
@@ -78,10 +68,6 @@ public class AdasProvider implements IProvider {
|
|||||||
adasEventManager.addStatusListener(listener);
|
adasEventManager.addStatusListener(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAdasStatusListener(IAdasStatusListener listener) {
|
|
||||||
adasEventManager.removeStatusListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeAdasStatusListener() {
|
public void removeAdasStatusListener() {
|
||||||
adasEventManager.removeStatusListener();
|
adasEventManager.removeStatusListener();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,10 +15,12 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class MogoModulePaths {
|
public class MogoModulePaths {
|
||||||
|
|
||||||
private static final List< MogoModule > mMogoModules = new ArrayList<>();
|
private static final List<MogoModule> mMogoModules = new ArrayList<>();
|
||||||
|
|
||||||
// 不需要启动APP也能运行的模块
|
// 不需要启动APP也能运行的模块
|
||||||
private static final List< MogoModule > mMogoBaseModules = new ArrayList<>();
|
private static final List<MogoModule> mMogoBaseModules = new ArrayList<>();
|
||||||
|
|
||||||
|
private static final List<MogoModule> mModuleFunctions = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地图模块 fragment 路径
|
* 地图模块 fragment 路径
|
||||||
@@ -36,15 +38,6 @@ public class MogoModulePaths {
|
|||||||
*/
|
*/
|
||||||
public static final String PATH_ENTRANCE = "/extension/entrance";
|
public static final String PATH_ENTRANCE = "/extension/entrance";
|
||||||
|
|
||||||
/**
|
|
||||||
* 音乐播放入口
|
|
||||||
*/
|
|
||||||
public static final String PATH_MEDIA = "/media/ui";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 引导页面
|
|
||||||
*/
|
|
||||||
public static final String PATH_GUIDE = "/guide/showFragment";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加卡片模块
|
* 添加卡片模块
|
||||||
@@ -52,8 +45,8 @@ public class MogoModulePaths {
|
|||||||
* @param path
|
* @param path
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void addModule( String path ) {
|
public static void addModule(String path) {
|
||||||
throw new IllegalArgumentException( "this method can't be invoked." );
|
throw new IllegalArgumentException("this method can't be invoked.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,30 +54,46 @@ public class MogoModulePaths {
|
|||||||
*
|
*
|
||||||
* @param module
|
* @param module
|
||||||
*/
|
*/
|
||||||
public static void addModule( MogoModule module ) {
|
public static void addModule(MogoModule module) {
|
||||||
if ( module == null || TextUtils.isEmpty( module.getPath().replace( " ", "" ) ) ) {
|
if (module == null || TextUtils.isEmpty(module.getPath().replace(" ", ""))) {
|
||||||
throw new IllegalArgumentException( "module path can't be empty or null or blank" );
|
throw new IllegalArgumentException("module path can't be empty or null or blank");
|
||||||
}
|
}
|
||||||
mMogoModules.add( module );
|
mMogoModules.add(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加卡片模块
|
* 添加模块功能
|
||||||
|
*
|
||||||
|
* @param module 功能模块
|
||||||
|
*/
|
||||||
|
public static void addModuleFunction(MogoModule module) {
|
||||||
|
if (module == null || TextUtils.isEmpty(module.getPath().replace(" ", ""))) {
|
||||||
|
throw new IllegalArgumentException("module path can't be empty or null or blank");
|
||||||
|
}
|
||||||
|
mModuleFunctions.add(module);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加基础模块
|
||||||
*
|
*
|
||||||
* @param module
|
* @param module
|
||||||
*/
|
*/
|
||||||
public static void addBaseModule( MogoModule module ) {
|
public static void addBaseModule(MogoModule module) {
|
||||||
if ( module == null || TextUtils.isEmpty( module.getPath().replace( " ", "" ) ) ) {
|
if (module == null || TextUtils.isEmpty(module.getPath().replace(" ", ""))) {
|
||||||
throw new IllegalArgumentException( "module path can't be empty or null or blank" );
|
throw new IllegalArgumentException("module path can't be empty or null or blank");
|
||||||
}
|
}
|
||||||
mMogoBaseModules.add( module );
|
mMogoBaseModules.add(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List< MogoModule > getModules() {
|
public static List<MogoModule> getModules() {
|
||||||
return mMogoModules;
|
return mMogoModules;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List< MogoModule > getBaseModules() {
|
public static List<MogoModule> getBaseModules() {
|
||||||
return mMogoBaseModules;
|
return mMogoBaseModules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<MogoModule> getModuleFunctions() {
|
||||||
|
return mModuleFunctions;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
|
|||||||
import com.mogo.eagle.core.function.api.check.IMogoCheckListener;
|
import com.mogo.eagle.core.function.api.check.IMogoCheckListener;
|
||||||
import com.mogo.eagle.core.function.call.check.CallerCheckManager;
|
import com.mogo.eagle.core.function.call.check.CallerCheckManager;
|
||||||
import com.mogo.map.listener.IMogoMapListener;
|
import com.mogo.map.listener.IMogoMapListener;
|
||||||
|
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||||
import com.mogo.map.location.IMogoLocationClient;
|
import com.mogo.map.location.IMogoLocationClient;
|
||||||
import com.mogo.map.marker.IMogoMarkerManager;
|
import com.mogo.map.marker.IMogoMarkerManager;
|
||||||
import com.mogo.map.navi.IMogoAimlessModeListener;
|
import com.mogo.map.navi.IMogoAimlessModeListener;
|
||||||
@@ -715,6 +716,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|||||||
Logger.d(TAG, "进入vr模式");
|
Logger.d(TAG, "进入vr模式");
|
||||||
mMApUIController.changeMapMode(EnumMapUI.Type_VR);
|
mMApUIController.changeMapMode(EnumMapUI.Type_VR);
|
||||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode(TAG, true);
|
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode(TAG, true);
|
||||||
|
MogoMapListenerHandler.getInstance().onMapModeChanged(EnumMapUI.Type_VR);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -850,6 +852,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||||
|
Logger.d(TAG, "descriptor=" + descriptor + " isTrue=" + isTrue);
|
||||||
if (mUploadRoadCondition == null) {
|
if (mUploadRoadCondition == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class MogoModulesManager implements MogoModulesHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadFunctionModules() {
|
public void loadFunctionModules() {
|
||||||
final List< MogoModule > modules = MogoModulePaths.getModules();
|
final List< MogoModule > modules = MogoModulePaths.getModuleFunctions();
|
||||||
if ( modules != null && !modules.isEmpty() ) {
|
if ( modules != null && !modules.isEmpty() ) {
|
||||||
for ( MogoModule module : modules ) {
|
for ( MogoModule module : modules ) {
|
||||||
Logger.d( TAG, "module.getPath():" + module.getPath() + " name: " + module.getName() );
|
Logger.d( TAG, "module.getPath():" + module.getPath() + " name: " + module.getName() );
|
||||||
|
|||||||
@@ -934,9 +934,17 @@ public class MogoServices implements IMogoMapListener,
|
|||||||
|
|
||||||
private boolean mLastStatusIsVr = false;
|
private boolean mLastStatusIsVr = false;
|
||||||
|
|
||||||
|
public boolean isLastStatusIsVr() {
|
||||||
|
return mLastStatusIsVr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastStatusIsVr(boolean lastStatusIsVr) {
|
||||||
|
this.mLastStatusIsVr = lastStatusIsVr;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMapModeChanged( EnumMapUI ui ) {
|
public void onMapModeChanged( EnumMapUI ui ) {
|
||||||
Log.i(TAG, "onMapModeChanged:" + ui);
|
Log.i(TAG, "onMapModeChanged:" + ui + " mLastStatusIsVr:" + mLastStatusIsVr);
|
||||||
clearAllData();
|
clearAllData();
|
||||||
if ( ui == EnumMapUI.Type_VR ) {
|
if ( ui == EnumMapUI.Type_VR ) {
|
||||||
if ( !mLastStatusIsVr ) {
|
if ( !mLastStatusIsVr ) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.mogo.test.crashreport.upgrade">
|
package="com.mogo.test.crashreport.upgrade">
|
||||||
|
|
||||||
<application>
|
<application>
|
||||||
@@ -6,6 +7,7 @@
|
|||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="${applicationId}.fileProvider"
|
android:authorities="${applicationId}.fileProvider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
|
tools:replace="android:authorities"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
|||||||
Reference in New Issue
Block a user