Merge branch 'master' into dev_MogoAP_eagle-220_211207_8.0.17
# Conflicts: # core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt # gradle.properties # modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasProvider.java # modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java # modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntrancePresenter.java
This commit is contained in:
@@ -23,11 +23,12 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
crashSystem.init();
|
||||
|
||||
//设置debug模式,日志不上传
|
||||
// crashSystem.setDebug(BuildConfig.DEBUG);
|
||||
crashSystem.setDebug(BuildConfig.DEBUG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initLogConfig() {
|
||||
super.initLogConfig();
|
||||
Logger.init(BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo
|
||||
@@ -33,12 +34,15 @@ import com.mogo.eagle.core.function.call.map.CallerSmpManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.utils.DeviceIdUtils
|
||||
import com.mogo.utils.NetworkUtils
|
||||
import com.mogo.utils.UiThreadHandler
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
|
||||
/**
|
||||
@@ -55,6 +59,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
// 初始化App 配置信息
|
||||
val mAppConfigInfo = AppConfigInfo()
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_debug_setting, this, true)
|
||||
@@ -137,19 +143,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tvAutopilotInfo.text =
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
|
||||
|
||||
// 初始化App 配置信息
|
||||
val appConfigInfo = AppConfigInfo()
|
||||
appConfigInfo.appName = AppUtils.getAppName()
|
||||
appConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
|
||||
appConfigInfo.appVersionName = AppUtils.getAppVersionName()
|
||||
appConfigInfo.appPackageName = AppUtils.getAppPackageName()
|
||||
appConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
|
||||
appConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
|
||||
appConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
appConfigInfo.mapVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
|
||||
// 将数据绘制
|
||||
tvAppInfo.text = GsonUtil.jsonFromObject(appConfigInfo)
|
||||
// 绘制应用基本信息
|
||||
drawAppInfo()
|
||||
|
||||
// 初始化OBU IP信息
|
||||
val ipAddress =
|
||||
@@ -324,12 +319,36 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制应用基本
|
||||
*/
|
||||
private fun drawAppInfo() {
|
||||
|
||||
mAppConfigInfo.appName = AppUtils.getAppName()
|
||||
mAppConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
|
||||
mAppConfigInfo.appVersionName = AppUtils.getAppVersionName()
|
||||
mAppConfigInfo.appPackageName = AppUtils.getAppPackageName()
|
||||
mAppConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
|
||||
mAppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
|
||||
mAppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
mAppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
mAppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
mAppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
|
||||
|
||||
// 将数据绘制
|
||||
tvAppInfo.text = mAppConfigInfo.toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* OBU状态回调
|
||||
*/
|
||||
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {
|
||||
UiThreadHandler.post {
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
|
||||
mAppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
|
||||
mAppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
|
||||
drawAppInfo()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,6 +359,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
tvAutopilotInfo.post {
|
||||
tvAutopilotInfo.text = GsonUtils.toJson(autoPilotStatusInfo)
|
||||
|
||||
mAppConfigInfo.adasSdkVersion = autoPilotStatusInfo.version
|
||||
mAppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
|
||||
drawAppInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
CallerHmiListenerManager.invokeCheckAutoPilotBtnListener(false)
|
||||
}
|
||||
}
|
||||
startAutoPilot()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,33 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--鹰眼应用配置信息-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#B200BCD4"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="鹰眼应用信息"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
tools:text="应用基础信息" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--鹰眼UI控制-->
|
||||
<ToggleButton
|
||||
android:id="@+id/btnOpenDebugSettingViewControl"
|
||||
android:layout_width="match_parent"
|
||||
@@ -385,30 +412,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--鹰眼应用配置信息-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#B200BCD4"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="鹰眼应用配置信息"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--OBU 配置信息-->
|
||||
<LinearLayout
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.main;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -11,6 +10,7 @@ import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation;
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.socket.SocketBuildConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
@@ -30,7 +30,6 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
import com.mogo.module.main.service.MogoMainService;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.share.constant.ShareConstants;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
@@ -41,6 +40,8 @@ import com.zhidao.boot.persistent.lib.PersistentManager;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
import com.zhjt.service.chain.core.ChainTraceStarter;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
/**
|
||||
* 默认初始化一些基础服务配置
|
||||
*/
|
||||
@@ -87,7 +88,18 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
/**
|
||||
* 初始化日志
|
||||
*/
|
||||
protected abstract void initLogConfig();
|
||||
protected void initLogConfig() {
|
||||
// 为了不引入maven的情况下修改日志控制字段值,采用反射
|
||||
try {
|
||||
Class clazz = Class.forName("com.mogo.cloud.location.LocationConfig");
|
||||
Field nameField = clazz.getField("isPrintLog");
|
||||
nameField.setBoolean(null, false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
SocketBuildConfig.isPrintLog = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化 MoGoAiCloudClientConfig
|
||||
@@ -249,22 +261,26 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
}
|
||||
|
||||
private void startSocketService() {
|
||||
Logger.d(TAG,"startSocketService");
|
||||
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
|
||||
// 关闭长链服务
|
||||
apis.getSocketManagerApi(getApplicationContext()).destroy();
|
||||
apis.getSocketManagerApi(this).registerLifecycleListener(10020, new IMogoLifecycleListener() {
|
||||
@Override
|
||||
public void onConnectFailure() {
|
||||
Logger.d(TAG,"socket-onConnectFailure");
|
||||
DebugConfig.setDownloadSnapshot(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectSuccess() {
|
||||
Logger.d(TAG,"socket-onConnectSuccess");
|
||||
DebugConfig.setDownloadSnapshot(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectLost() {
|
||||
Logger.d(TAG,"socket-onConnectLost");
|
||||
DebugConfig.setDownloadSnapshot(false);
|
||||
}
|
||||
});
|
||||
@@ -326,8 +342,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
PersistentManager.getInstance().initManager(this);
|
||||
Intent intent = new Intent(this, MogoMainService.class);
|
||||
startService(intent);
|
||||
}
|
||||
|
||||
Log.i(TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
|
||||
@@ -44,7 +44,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
fun init(context: Context, ipAddress: String) {
|
||||
Logger.d(MogoObuConst.TAG_MOGO_OBU, "obuManager初始化--")
|
||||
mMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS)
|
||||
.navigation(context) as IMogoServiceApis
|
||||
.navigation(context) as IMogoServiceApis
|
||||
mContext = context
|
||||
mIMogoMapService = mMogoServiceApis!!.mapServiceApi
|
||||
|
||||
@@ -55,6 +55,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
fun connectObu(context: Context, ipAddress: String) {
|
||||
//自研obu初始化
|
||||
mObuStatusInfo.connectIP = ipAddress
|
||||
mObuStatusInfo.obuSdkVersion = MogoObuManager.getInstance().versionName
|
||||
|
||||
if (!MogoObuManager.getInstance().isConnected) {
|
||||
MogoObuManager.getInstance().connect(context, mObuStatusInfo.connectIP)
|
||||
@@ -213,11 +214,11 @@ class MogoPrivateObuManager private constructor() {
|
||||
val status = info.status
|
||||
val level = info.threat_info.threat_level
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.pos_classification else -1)
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.pos_classification else -1)
|
||||
Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxRtiThreatIndInfo direction = $direction -- pos_classification = ${info.ext_info.pos_classification}")
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type} --direction = $direction -- pos_classification = ${info.ext_info.pos_classification} "
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type} --direction = $direction -- pos_classification = ${info.ext_info.pos_classification} "
|
||||
)
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
@@ -233,13 +234,13 @@ class MogoPrivateObuManager private constructor() {
|
||||
WarningDirectionEnum.ALERT_WARNING_TOP_LEFT,
|
||||
WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType
|
||||
}
|
||||
WarningDirectionEnum.ALERT_WARNING_RIGHT,
|
||||
WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT,
|
||||
WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -254,7 +255,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
//事故
|
||||
0xC -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
|
||||
}
|
||||
//拥堵
|
||||
0xD -> {
|
||||
@@ -263,7 +264,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
//行人
|
||||
0xF -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
//禁止停车
|
||||
0x13 -> {
|
||||
@@ -272,7 +273,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
//学校
|
||||
0x14 -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
//桥梁
|
||||
0x17 -> {
|
||||
@@ -285,7 +286,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
//人行横道
|
||||
0x19 -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
//减速慢行
|
||||
0x1A -> {
|
||||
@@ -318,8 +319,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
Logger.d(MogoObuConst.TAG_MOGO_OBU, "ttsContent = $ttsContent --alertContent = $alertContent ---info.threat_info.distance = ${info.threat_info.distance} ")
|
||||
if (info.threat_info.distance.toInt() != 0) {
|
||||
alertContent = String.format(
|
||||
EventTypeEnum.getWarningContent(appId),
|
||||
info.threat_info.distance.toInt()
|
||||
EventTypeEnum.getWarningContent(appId),
|
||||
info.threat_info.distance.toInt()
|
||||
)
|
||||
} else {
|
||||
alertContent = "前方拥堵,减速慢行"
|
||||
@@ -340,16 +341,16 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
//显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId.toInt(),
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
appId.toInt(),
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
@@ -378,15 +379,15 @@ class MogoPrivateObuManager private constructor() {
|
||||
override fun onCvxIvpThreatIndInfo(info: CvxIvpThreatIndInfo?) {
|
||||
Logger.d(MogoObuConst.TAG_MOGO_OBU, "CvxIvpThreatIndInfo ------> $info")
|
||||
if (info != null && info.ext_info != null
|
||||
&& info.threat_info != null
|
||||
&& info.ext_info.lights != null
|
||||
&& info.ext_info.lights.isNotEmpty()
|
||||
&& info.threat_info != null
|
||||
&& info.ext_info.lights != null
|
||||
&& info.ext_info.lights.isNotEmpty()
|
||||
) {
|
||||
handlerTrafficLight(
|
||||
info.threat_info.app_id,
|
||||
info.status,
|
||||
info.ext_info.lights,
|
||||
info.ext_info.index
|
||||
info.threat_info.app_id,
|
||||
info.status,
|
||||
info.ext_info.lights,
|
||||
info.ext_info.index
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -397,8 +398,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 0x1:非机动车 NON_MOTOR | 0x2:行人 PEDESTRIAN 0x3:RSU
|
||||
if (info != null && (info.ptc_type == 1 || info.ptc_type == 2)) {
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"onCvxPtcInfoIndInfo ---status---> ${info.status}"
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"onCvxPtcInfoIndInfo ---status---> ${info.status}"
|
||||
)
|
||||
var v2xType = ""
|
||||
if (info.ptc_type == 1) { //摩托车
|
||||
@@ -409,7 +410,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
val ttsContent = EventTypeEnum.getWarningTts(v2xType)
|
||||
val alertContent = EventTypeEnum.getWarningContent(v2xType)
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1)
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1)
|
||||
val level = if (info.threat_info != null) info.threat_info.threat_level else -1
|
||||
|
||||
when (info.status) {
|
||||
@@ -418,9 +419,9 @@ class MogoPrivateObuManager private constructor() {
|
||||
ObuConstants.STATUS.UPDATE// 更新
|
||||
-> {
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerHmiManager.showWarningV2X(
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerHmiManager.showWarningV2X(
|
||||
v2xType.toInt(),
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
@@ -431,7 +432,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
// }
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
|
||||
@@ -497,10 +498,10 @@ class MogoPrivateObuManager private constructor() {
|
||||
val level = info.threat_info.threat_level
|
||||
val status = info.status
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"onCvxV2vThreatIndInfo target_classification = ${
|
||||
getMessageDirection(info.ext_info.target_classification)
|
||||
} --- direction = $direction --- appId = $appId ---level = $level -- status = $status"
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"onCvxV2vThreatIndInfo target_classification = ${
|
||||
getMessageDirection(info.ext_info.target_classification)
|
||||
} --- direction = $direction --- appId = $appId ---level = $level -- status = $status"
|
||||
)
|
||||
handleSdkObu(appId, direction, status, level, info)
|
||||
}
|
||||
@@ -564,8 +565,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
*/
|
||||
private fun handlerTrafficLight(appId: Int, status: Int, lights: List<Light>, index: Int) {
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"handlerTrafficLight appId = $appId --- status = $status ---index = $index ---lights.size = ${lights.size} ---lights = $lights "
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"handlerTrafficLight appId = $appId --- status = $status ---index = $index ---lights.size = ${lights.size} ---lights = $lights "
|
||||
)
|
||||
when (status) {
|
||||
// 添加
|
||||
@@ -591,9 +592,9 @@ class MogoPrivateObuManager private constructor() {
|
||||
*/
|
||||
@Synchronized
|
||||
private fun changeTrafficLightStatus(
|
||||
appId: Int,
|
||||
lights: List<Light>,
|
||||
index: Int
|
||||
appId: Int,
|
||||
lights: List<Light>,
|
||||
index: Int
|
||||
) {
|
||||
var ttsContent = ""
|
||||
var alertContent = ""
|
||||
@@ -601,8 +602,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
if (index != -1 && lights.size >= index) {
|
||||
val currentLight = lights[index]
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"currentLight = $currentLight ---currentLight.phase = ${currentLight.phase} ---rlvw_violation_type = ${currentLight.rlvw_violation_type} --- index = $index ---appId = $appId ---appId = $appId"
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"currentLight = $currentLight ---currentLight.phase = ${currentLight.phase} ---rlvw_violation_type = ${currentLight.rlvw_violation_type} --- index = $index ---appId = $appId ---appId = $appId"
|
||||
)
|
||||
// 闯红灯预警
|
||||
when (currentLight.rlvw_violation_type) {
|
||||
@@ -615,11 +616,11 @@ class MogoPrivateObuManager private constructor() {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
null
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
null
|
||||
)
|
||||
}
|
||||
0x3 -> {//闯黄灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_YELLOW_LIGHT
|
||||
@@ -661,35 +662,35 @@ class MogoPrivateObuManager private constructor() {
|
||||
CallerHmiManager.changeCountdownYellow(0)
|
||||
// 拼接建议速度
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"speed_min = ${currentLight.glosa_suggested_speed_min} --speed_max = ${currentLight.glosa_suggested_speed_max.toInt()}"
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"speed_min = ${currentLight.glosa_suggested_speed_min} --speed_max = ${currentLight.glosa_suggested_speed_max.toInt()}"
|
||||
)
|
||||
val adviceSpeed =
|
||||
"${currentLight.glosa_suggested_speed_min.toInt()} - ${currentLight.glosa_suggested_speed_max.toInt()}"
|
||||
"${currentLight.glosa_suggested_speed_min.toInt()} - ${currentLight.glosa_suggested_speed_max.toInt()}"
|
||||
|
||||
val adviceSpeedTts =
|
||||
"${currentLight.glosa_suggested_speed_min.toInt()}到${currentLight.glosa_suggested_speed_max.toInt()}"
|
||||
"${currentLight.glosa_suggested_speed_min.toInt()}到${currentLight.glosa_suggested_speed_max.toInt()}"
|
||||
|
||||
ttsContent =
|
||||
String.format(
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeedTts
|
||||
)
|
||||
String.format(
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeedTts
|
||||
)
|
||||
|
||||
alertContent =
|
||||
String.format(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeed
|
||||
)
|
||||
String.format(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeed
|
||||
)
|
||||
|
||||
val maxSpeed = currentLight.glosa_suggested_speed_max.toInt()
|
||||
if (maxSpeed > 0) {
|
||||
CallerHmiManager.showWarningV2X(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(),
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
null
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(),
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
null
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -716,16 +717,16 @@ class MogoPrivateObuManager private constructor() {
|
||||
* @see com.mogo.module.common.enums.EventTypeEnum
|
||||
*/
|
||||
private fun handleSdkObu(
|
||||
appId: Int,
|
||||
direction: WarningDirectionEnum,
|
||||
status: Int,
|
||||
level: Int,
|
||||
info: CvxV2vThreatIndInfo
|
||||
appId: Int,
|
||||
direction: WarningDirectionEnum,
|
||||
status: Int,
|
||||
level: Int,
|
||||
info: CvxV2vThreatIndInfo
|
||||
) {
|
||||
// 这里排除需要特殊定制的语音及文案外,其余的都可以使用 EventTypeEnum 提供的
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"handleSdkObu appId = $appId --- handleDirection = $direction ---level = $level ---status = $status"
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"handleSdkObu appId = $appId --- handleDirection = $direction ---level = $level ---status = $status"
|
||||
)
|
||||
var alertContent: String
|
||||
var ttsContent: String
|
||||
@@ -735,16 +736,16 @@ class MogoPrivateObuManager private constructor() {
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
if (
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT
|
||||
) {
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
alertContent = String.format(alertContent, "左")
|
||||
} else if (
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT
|
||||
) {
|
||||
ttsContent = String.format(ttsContent, "右")
|
||||
alertContent = String.format(alertContent, "右")
|
||||
@@ -779,16 +780,16 @@ class MogoPrivateObuManager private constructor() {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
if (
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT
|
||||
) { //左后
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
alertContent = String.format(alertContent, "左")
|
||||
} else if (
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT
|
||||
) { //右后
|
||||
ttsContent = String.format(ttsContent, "右")
|
||||
alertContent = String.format(alertContent, "右")
|
||||
@@ -807,22 +808,22 @@ class MogoPrivateObuManager private constructor() {
|
||||
ObuConstants.STATUS.ADD,
|
||||
ObuConstants.STATUS.UPDATE -> {
|
||||
Logger.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
)
|
||||
if (level == 2 || level == 3) {
|
||||
//显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
|
||||
@@ -13,11 +13,26 @@ class AppConfigInfo {
|
||||
var appVersionName: String? = null
|
||||
var appPackageName: String? = null
|
||||
var uniqueDeviceId: String? = null
|
||||
|
||||
// 高精地图版本
|
||||
var mapSdkVersion: String? = null
|
||||
var adasSdkVersion: String? = null
|
||||
var obuSdkVersion: String? = null
|
||||
|
||||
var mogoToken: String? = null
|
||||
var mogoSN: String? = null
|
||||
|
||||
/*依赖的SDK版本信息*/
|
||||
var mapVersion: String? = null
|
||||
// 是否可以网络连接
|
||||
var isConnectNet: Boolean = false
|
||||
|
||||
// 长链接是否可用
|
||||
var isConnectSocket: Boolean = false
|
||||
|
||||
// 是否连接工控机
|
||||
var isConnectAutopilot: Boolean = false
|
||||
|
||||
// 是否OBU
|
||||
var isConnectObu: Boolean = false
|
||||
|
||||
/*应用配置信息,这里的配置将影响功能,用来替换productFlavors配置的那种编译渠道*/
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
@@ -36,4 +51,19 @@ class AppConfigInfo {
|
||||
// 进入应用的地图模式。0-2D模式,1-VR模式
|
||||
var MAP_STYLE_MODE = 1
|
||||
|
||||
override fun toString(): String {
|
||||
return "应用名称:${appName}\n" +
|
||||
"应用版本:${appVersionCode}\n" +
|
||||
"应用版本名称:${appVersionName}\n" +
|
||||
"HD-MAP-SDK版本:${mapSdkVersion}\n" +
|
||||
"ADAS-SDK版本:${adasSdkVersion}\n" +
|
||||
"OBU-SDK版本:${obuSdkVersion}\n" +
|
||||
"PAD唯一标志:${uniqueDeviceId}\n" +
|
||||
//"mogoToken:${mogoToken}\n"+
|
||||
"中台分配的SN:${mogoSN}\n" +
|
||||
"网络是否正常:${isConnectNet}\n" +
|
||||
"Socket是否正常:${isConnectSocket}\n" +
|
||||
"ADAS连接是否正常:${isConnectAutopilot}\n" +
|
||||
"OBU连接是否正常:${isConnectObu}\n"
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,8 @@ import java.util.List;
|
||||
*/
|
||||
public class AutopilotControlParameters {
|
||||
|
||||
public String startName;
|
||||
public String endName;
|
||||
public String startName="";
|
||||
public String endName="";
|
||||
public AutoPilotLonLat startLatLon;
|
||||
public List<AutoPilotLonLat> wayLatLons;
|
||||
public AutoPilotLonLat endLatLon;
|
||||
|
||||
@@ -9,6 +9,8 @@ class ObuStatusInfo {
|
||||
// 当前链接的IP地址, 默认地址 192.168.1.199
|
||||
var connectIP: String = "192.168.1.199"
|
||||
|
||||
var obuSdkVersion = ""
|
||||
|
||||
/**
|
||||
* false--没有链接,true--链接成功
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ kapt.include.compile.classpath=false
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
android.jetifier.blacklist=module-service-2.1.14.5.aar
|
||||
android.jetifier.blacklist=module-service-2.1.15.1.aar
|
||||
## maven 配置
|
||||
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
|
||||
SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
|
||||
@@ -63,21 +63,21 @@ SERVICE_CHAIN_VERSION=1.0.43
|
||||
LOGLIB_VERSION=1.1.7
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求
|
||||
MOGO_NETWORK_VERSION=1.3.13
|
||||
MOGO_NETWORK_VERSION=1.3.15
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.3.13
|
||||
MOGO_PASSPORT_VERSION=1.3.15
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.3.13
|
||||
MOGO_SOCKET_VERSION=1.3.15
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.3.13
|
||||
MOGO_REALTIME_VERSION=1.3.15
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.3.13
|
||||
MOGO_TANLU_VERSION=1.3.15
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.3.13
|
||||
MOGO_LIVE_VERSION=1.3.15
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.3.13
|
||||
MOGO_TRAFFICLIVE_VERSION=1.3.15
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.3.13
|
||||
MOGO_LOCATION_VERSION=1.3.15
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.0.0.18
|
||||
@@ -89,104 +89,104 @@ applicationName=IntelligentPilot
|
||||
versionCode=80007
|
||||
versionName=8.0.15
|
||||
################# 新架构模块Maven版本管理 #################
|
||||
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.56.5
|
||||
MOGO_CORE_DATA_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_API_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.56.5
|
||||
MOGO_CORE_RES_VERSION=0.0.56.5
|
||||
MOGO_CORE_UTILS_VERSION=0.0.56.5
|
||||
MOGO_CORE_NETWORK_VERSION=0.0.56.5
|
||||
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.57.1
|
||||
MOGO_CORE_DATA_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_API_VERSION=0.0.57.1
|
||||
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.57.1
|
||||
MOGO_CORE_RES_VERSION=0.0.57.1
|
||||
MOGO_CORE_UTILS_VERSION=0.0.57.1
|
||||
MOGO_CORE_NETWORK_VERSION=0.0.57.1
|
||||
################# 旧版本架构模块版本 #################
|
||||
## 工程内模块
|
||||
MOGO_COMMONS_VERSION=2.1.14.5
|
||||
MOGO_UTILS_VERSION=2.1.14.5
|
||||
MAP_AMAP_VERSION=2.1.14.5
|
||||
MAP_AUTONAVI_VERSION=2.1.14.5
|
||||
MOGO_MAP_VERSION=2.1.14.5
|
||||
MOGO_MAP_API_VERSION=2.1.14.5
|
||||
MOGO_SERVICE_VERSION=2.1.14.5
|
||||
MOGO_SERVICE_API_VERSION=2.1.14.5
|
||||
MOGO_CONNECTION_VERSION=2.1.14.5
|
||||
MOGO_MODULE_APPS_VERSION=2.1.14.5
|
||||
MOGO_MODULE_NAVI_VERSION=2.1.14.5
|
||||
MOGO_MODULE_SHARE_VERSION=2.1.14.5
|
||||
MOGO_MODULE_COMMON_VERSION=2.1.14.5
|
||||
MOGO_MODULE_MAIN_VERSION=2.1.14.5
|
||||
MOGO_MODULE_MAP_VERSION=2.1.14.5
|
||||
MOGO_MODULE_SERVICE_VERSION=2.1.14.5
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=2.1.14.5
|
||||
MOGO_MODULE_SEARCH_VERSION=2.1.14.5
|
||||
MOGO_MODULE_BACK_VERSION=2.1.14.5
|
||||
MOGO_MODULE_V2X_VERSION=2.1.14.5
|
||||
MOGO_COMMONS_VERSION=2.1.15.1
|
||||
MOGO_UTILS_VERSION=2.1.15.1
|
||||
MAP_AMAP_VERSION=2.1.15.1
|
||||
MAP_AUTONAVI_VERSION=2.1.15.1
|
||||
MOGO_MAP_VERSION=2.1.15.1
|
||||
MOGO_MAP_API_VERSION=2.1.15.1
|
||||
MOGO_SERVICE_VERSION=2.1.15.1
|
||||
MOGO_SERVICE_API_VERSION=2.1.15.1
|
||||
MOGO_CONNECTION_VERSION=2.1.15.1
|
||||
MOGO_MODULE_APPS_VERSION=2.1.15.1
|
||||
MOGO_MODULE_NAVI_VERSION=2.1.15.1
|
||||
MOGO_MODULE_SHARE_VERSION=2.1.15.1
|
||||
MOGO_MODULE_COMMON_VERSION=2.1.15.1
|
||||
MOGO_MODULE_MAIN_VERSION=2.1.15.1
|
||||
MOGO_MODULE_MAP_VERSION=2.1.15.1
|
||||
MOGO_MODULE_SERVICE_VERSION=2.1.15.1
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=2.1.15.1
|
||||
MOGO_MODULE_SEARCH_VERSION=2.1.15.1
|
||||
MOGO_MODULE_BACK_VERSION=2.1.15.1
|
||||
MOGO_MODULE_V2X_VERSION=2.1.15.1
|
||||
# 探路
|
||||
MOGO_MODULE_TANLU_VERSION=2.1.14.5
|
||||
MOGO_MODULE_TANLU_VERSION=2.1.15.1
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=2.1.14.5
|
||||
MOGO_MODULE_PUSH_BASE_VERSION=2.1.14.5
|
||||
MOGO_MODULE_PUSH_NOOP_VERSION=2.1.14.5
|
||||
MOGO_MODULE_PUSH_VERSION=2.1.15.1
|
||||
MOGO_MODULE_PUSH_BASE_VERSION=2.1.15.1
|
||||
MOGO_MODULE_PUSH_NOOP_VERSION=2.1.15.1
|
||||
# 探路上报和分享模块
|
||||
TANLULIB_VERSION=2.1.14.5
|
||||
MOGO_TANLU_API_VERSION=2.1.14.5
|
||||
TANLULIB_VERSION=2.1.15.1
|
||||
MOGO_TANLU_API_VERSION=2.1.15.1
|
||||
#左侧面板模块
|
||||
MOGO_MODULE_LEFT_PANEL_VERSION=2.1.14.5
|
||||
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.1.14.5
|
||||
MOGO_MODULE_LEFT_PANEL_VERSION=2.1.15.1
|
||||
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.1.15.1
|
||||
# 小控件
|
||||
MOGO_MODULE_WIDGETS_VERSION=2.1.14.5
|
||||
MOGO_MODULE_WIDGETS_VERSION=2.1.15.1
|
||||
# obu
|
||||
MOGO_MODULE_OBU_VERSION=2.1.14.5
|
||||
MOGO_MODULE_OBU_MOGO_VERSION=2.1.14.5
|
||||
MOGO_MODULE_OBU_VERSION=2.1.15.1
|
||||
MOGO_MODULE_OBU_MOGO_VERSION=2.1.15.1
|
||||
# monitor
|
||||
MOGO_MODULE_MONITOR_VERSION=2.1.14.5
|
||||
MOGO_MODULE_MONITOR_VERSION=2.1.15.1
|
||||
# bugly
|
||||
CRASHREPORT_VERSION=2.1.14.5
|
||||
CRASHREPORT_BUGLY_VERSION=2.1.14.5
|
||||
CRASHREPORT_NOOP_VERSION=2.1.14.5
|
||||
CRASHREPORT_UPGRADE_VERSION=2.1.14.5
|
||||
CRASHREPORT_VERSION=2.1.15.1
|
||||
CRASHREPORT_BUGLY_VERSION=2.1.15.1
|
||||
CRASHREPORT_NOOP_VERSION=2.1.15.1
|
||||
CRASHREPORT_UPGRADE_VERSION=2.1.15.1
|
||||
## tts
|
||||
TTS_BASE_VERSION=2.1.14.5
|
||||
TTS_DI_VERSION=2.1.14.5
|
||||
TTS_ZHI_VERSION=2.1.14.5
|
||||
TTS_PAD_VERSION=2.1.14.5
|
||||
TTS_NOOP_VERSION=2.1.14.5
|
||||
TTS_BASE_VERSION=2.1.15.1
|
||||
TTS_DI_VERSION=2.1.15.1
|
||||
TTS_ZHI_VERSION=2.1.15.1
|
||||
TTS_PAD_VERSION=2.1.15.1
|
||||
TTS_NOOP_VERSION=2.1.15.1
|
||||
# 自研地图
|
||||
MAP_CUSTOM_VERSION=2.1.14.5
|
||||
MOGO_MODULE_ADAS_VERSION=2.1.14.5
|
||||
MAP_CUSTOM_VERSION=2.1.15.1
|
||||
MOGO_MODULE_ADAS_VERSION=2.1.15.1
|
||||
# 基础服务实现:passport、socket、location
|
||||
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.1.14.5
|
||||
MOGO_BASE_SERVICES_APK_VERSION=2.1.14.5
|
||||
MOGO_BASE_SERVICES_SDK_VERSION=2.1.14.5
|
||||
MOGO_MODULE_CHAT_VERSION=2.1.14.5
|
||||
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.1.15.1
|
||||
MOGO_BASE_SERVICES_APK_VERSION=2.1.15.1
|
||||
MOGO_BASE_SERVICES_SDK_VERSION=2.1.15.1
|
||||
MOGO_MODULE_CHAT_VERSION=2.1.15.1
|
||||
# 车聊聊
|
||||
MOGO_MODULE_CARCHATTING_VERSION=2.1.14.5
|
||||
MOGO_MODULE_CARCHATTING_VERSION=2.1.15.1
|
||||
# 车聊聊接口
|
||||
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.1.14.5
|
||||
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.1.15.1
|
||||
|
||||
# 皮肤
|
||||
MOGO_SKIN_SUPPORT_VERSION=2.1.14.5
|
||||
MOGO_SKIN_LIGHT_VERSION=2.1.14.5
|
||||
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.1.14.5
|
||||
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_APPCOMPAT_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_CARDVIEW_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.1.14.5
|
||||
SKIN_SUPPORT_DESIGN_VERSION=2.1.14.5
|
||||
MOGO_SKIN_SUPPORT_VERSION=2.1.15.1
|
||||
MOGO_SKIN_LIGHT_VERSION=2.1.15.1
|
||||
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.1.15.1
|
||||
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.1.15.1
|
||||
SKIN_SUPPORT_VERSION=2.1.15.1
|
||||
SKIN_SUPPORT_APPCOMPAT_VERSION=2.1.15.1
|
||||
SKIN_SUPPORT_CARDVIEW_VERSION=2.1.15.1
|
||||
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.1.15.1
|
||||
SKIN_SUPPORT_DESIGN_VERSION=2.1.15.1
|
||||
# OCH
|
||||
MOGO_OCH_VERSION=2.1.14.5-test
|
||||
MOGO_OCH_VERSION=2.1.15.1-test
|
||||
MOGO_OCH_BUS_VERSION=2.0.66
|
||||
MOGO_OCH_NOOP_VERSION=2.0.66
|
||||
MOGO_OCH_TAXI_VERSION=2.0.66
|
||||
# mogoAiCloud sdk services
|
||||
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.14.5
|
||||
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.15.1
|
||||
|
||||
# v2x-sdk
|
||||
MOGO_V2X_SDK_VERSION=1.0.1
|
||||
|
||||
@@ -763,7 +763,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
sysLocation.setProvider(location.getProvider());
|
||||
sysLocation.setAccuracy(location.getAcceleration());
|
||||
sysLocation.setTime(location.getDuration());
|
||||
sysLocation.setBearing(location.getHeading());
|
||||
sysLocation.setBearing((float) location.getHeading());
|
||||
sysLocation.setSpeed(location.getSpeed());
|
||||
|
||||
// 将有效经纬度暂存本地,提供给下一次的Http-DNS使用,防止首次请求位置获取不到
|
||||
@@ -884,6 +884,13 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
MogoMapListenerHandler.getInstance().onMapClick(ObjectUtils.fromAMap(lonLatPoint));
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public void onMapInit() {
|
||||
// Logger.i(TAG, "autoop--onMapInit: ");
|
||||
// MogoMapListenerHandler.getInstance().onMapLoaded();
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
Logger.i(TAG, "autoop--onMapLoaded: ");
|
||||
|
||||
@@ -154,7 +154,7 @@ public class ObjectUtils {
|
||||
location.setLatitude(aLocation.getLat());
|
||||
location.setLongitude(aLocation.getLon());
|
||||
location.setAltitude(aLocation.getAltitude());
|
||||
location.setBearing(aLocation.getHeading());
|
||||
location.setBearing((float) aLocation.getHeading());
|
||||
location.setCityCode(aLocation.getCityCode());
|
||||
location.setCityName(aLocation.getCity());
|
||||
location.setProvider(aLocation.getProvider());
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotStateModel;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.bean.BasicInfo;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
|
||||
/**
|
||||
@@ -44,6 +45,8 @@ public class AdasProvider implements IProvider {
|
||||
}
|
||||
|
||||
private void initAdas(Context context, AdasEventManager adasEventManager) {
|
||||
CupidLogUtils.setEnableLog(false);
|
||||
CupidLogUtils.setIsWriteLog(false);
|
||||
AdasManager.getInstance().create(context);
|
||||
AdasManager.getInstance().setOnAdasListener(new OnAdasListenerAdapter());
|
||||
AdasManager.getInstance().setOnAdasConnectStatusListener(adasEventManager);
|
||||
@@ -93,10 +96,6 @@ public class AdasProvider implements IProvider {
|
||||
|
||||
}
|
||||
|
||||
public void showAdas() {
|
||||
|
||||
}
|
||||
|
||||
public void killAdas() {
|
||||
|
||||
}
|
||||
|
||||
@@ -155,9 +155,9 @@ public class IdentifyDataDrawer extends BaseDrawer {
|
||||
while (iterator.hasNext()) {
|
||||
TrafficData result = iterator.next();
|
||||
long internal = result.getSatelliteTime() - getCurSatelliteTime();
|
||||
// if (internal > 3000) { //防止帧率过低导致误删除上一个节点对象,从而出现跳跃现象
|
||||
if (internal > 3000) { //防止帧率过低导致误删除上一个节点对象,从而出现跳跃现象
|
||||
iterator.remove();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,5 @@ public class SPConst {
|
||||
|
||||
private static String SP_GUIDE_FIRST_TIME_RECORD = "SP_GUIDE_FIRST_TIME_RECORD";
|
||||
|
||||
//用于多模块之间首次引导时间记录
|
||||
public static String getSPGuideRecord(){
|
||||
return SP_GUIDE_FIRST_TIME_RECORD;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,9 +29,4 @@ public interface ExtensionsView extends IView {
|
||||
*/
|
||||
void renderMsgInfo( boolean hasMsg, int amount );
|
||||
|
||||
/**
|
||||
* 刷新个人信息
|
||||
* @param userInfo 个人信息
|
||||
*/
|
||||
void renderUserInfo(UserInfo userInfo);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import static com.mogo.module.common.utils.SPConst.getSPGuideRecord;
|
||||
import static com.mogo.module.extensions.ExtensionsModuleConst.TYPE_ENTRANCE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_BUTTON;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_INNER_GUIDE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_INNER_GUIDE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_OUTER_GUIDE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_OUTER_GUIDE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.ONE_DAY_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.SEVEN_DAY_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.VOICE_ALERT_COUNT;
|
||||
|
||||
import android.content.Intent;
|
||||
@@ -36,7 +29,6 @@ import androidx.constraintlayout.widget.ConstraintSet;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
@@ -61,20 +53,16 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.dialog.WMDialog;
|
||||
import com.mogo.module.common.glide.SkinAbleBitmapTarget;
|
||||
import com.mogo.module.common.map.CustomNaviInterrupter;
|
||||
import com.mogo.module.common.map.MapCenterPointStrategy;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.common.view.OnPreventFastClickListener;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.navi.AnimNavInfoView;
|
||||
import com.mogo.module.extensions.userinfo.UserInfo;
|
||||
import com.mogo.module.extensions.utils.CameraLiveNoticeHelper;
|
||||
import com.mogo.module.extensions.utils.EntranceViewHolder;
|
||||
import com.mogo.module.extensions.utils.NoMapTopViewShaderHelper;
|
||||
import com.mogo.module.extensions.utils.TopViewAnimHelper;
|
||||
import com.mogo.module.extensions.utils.TopViewNoLinkageAnimHelper;
|
||||
import com.mogo.module.share.manager.ServiceApisManager;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
|
||||
@@ -87,6 +75,9 @@ import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -138,13 +129,10 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
private View mMsgContainer;
|
||||
private TextView mMsgCounter;
|
||||
|
||||
private ImageView mUserHeadImg;
|
||||
|
||||
private String[] mClickShareVoiceStrings;
|
||||
|
||||
private String[] mInnerGuideVoiceStrings;
|
||||
private boolean isShowGuide;
|
||||
|
||||
private String[] mOuterGuideVoiceStrings;
|
||||
|
||||
/**
|
||||
* 搜索模块
|
||||
@@ -177,7 +165,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
};
|
||||
|
||||
private Group seekHelpGroup;
|
||||
private Group groupUserHead;
|
||||
|
||||
private UploadButtonAnimatorController mUploadButtonAnimatorController;
|
||||
|
||||
@@ -221,7 +208,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mDisplayOverview = findViewById(R.id.module_ext_id_display_overview);
|
||||
mDisplayOverviewText = findViewById(R.id.module_ext_id_display_overview_text);
|
||||
mMove2CurrentLocation = findViewById(R.id.module_entrance_id_move2_current_location);
|
||||
mUserHeadImg = findViewById(R.id.ivUserHeadImg);
|
||||
groupFix = findViewById(R.id.groupFix);
|
||||
|
||||
ConstraintLayout rootView = findViewById(R.id.module_entrance_id_top_motion_layout);
|
||||
@@ -249,7 +235,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mWeatherContainer = findViewById(R.id.module_ext_id_weather_container);
|
||||
mWeatherIcon = findViewById(R.id.module_ext_id_weather_icon);
|
||||
mWeatherTemp = findViewById(R.id.module_ext_id_weather_temp);
|
||||
groupUserHead = findViewById(R.id.groupUserHead);
|
||||
mMsgContainer = findViewById(R.id.module_ext_id_msg);
|
||||
mMsgCounter = findViewById(R.id.module_ext_id_msg_counter);
|
||||
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
|
||||
@@ -260,25 +245,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
tvEnterVrMode.setOnClickListener(clickListener);
|
||||
tvExitVrMode.setOnClickListener(clickListener);
|
||||
mMsgContainer.setOnClickListener(clickListener);
|
||||
mUserHeadImg.setOnClickListener(clickListener);
|
||||
mMove2CurrentLocation.setOnClickListener(clickListener);
|
||||
mDisplayOverview.setOnClickListener(clickListener);
|
||||
mExitNavi.setOnClickListener(clickListener);
|
||||
mCameraMode.setOnClickListener(clickListener);
|
||||
|
||||
groupUserHead.setVisibility(DebugConfig.isLauncher() ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (DebugConfig.isDebug()) {
|
||||
|
||||
mUserHeadImg.setOnLongClickListener(view -> {
|
||||
if (groupFix.getVisibility() == View.VISIBLE) {
|
||||
groupFix.setVisibility(View.GONE);
|
||||
} else {
|
||||
groupFix.setVisibility(View.VISIBLE);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
dealWeatherContainer();
|
||||
listenSeekNumber();
|
||||
@@ -308,8 +279,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mUploadRoadCondition.setVisibility(View.GONE);
|
||||
mWeatherContainer.setVisibility(View.GONE);
|
||||
mMsgContainer.setVisibility(View.GONE);
|
||||
groupUserHead.setVisibility(View.GONE);
|
||||
groupUserHead.setVisibility(View.GONE);
|
||||
// tvExitVrMode.setVisibility(View.VISIBLE);
|
||||
TopViewAnimHelper.getInstance().enterVrMode();
|
||||
TopViewNoLinkageAnimHelper.getInstance().enterVrMode();
|
||||
@@ -322,7 +291,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
tvEnterVrMode.setVisibility(View.VISIBLE);
|
||||
mMove2CurrentLocation.setVisibility(View.VISIBLE);
|
||||
mUploadRoadCondition.setVisibility(View.VISIBLE);
|
||||
groupUserHead.setVisibility(View.VISIBLE);
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isSeekHelping()) {
|
||||
seekHelpGroup.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@@ -346,67 +314,10 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mMove2CurrentLocation.setVisibility(View.GONE);
|
||||
mWeatherContainer.setVisibility(View.GONE);
|
||||
mMsgContainer.setVisibility(View.GONE);
|
||||
groupUserHead.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
UiThreadHandler.postDelayed(this::playShareOuterGuideVoice, 5_000L);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private boolean isGreaterThanOneDay() {
|
||||
boolean isGreaterThanOneDay;
|
||||
long guideRecordTime = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getLong(getSPGuideRecord(), 0);
|
||||
Logger.d(TAG, " isGreaterThanOneDay interval = " + (System.currentTimeMillis() - guideRecordTime) + "---currentTime = " + System.currentTimeMillis() + "---guideRecordTime =" + guideRecordTime);
|
||||
if ((System.currentTimeMillis() - guideRecordTime) > ONE_DAY_TIME) {
|
||||
isGreaterThanOneDay = true;
|
||||
} else {
|
||||
isGreaterThanOneDay = false;
|
||||
}
|
||||
|
||||
return isGreaterThanOneDay;
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部触发引导
|
||||
*/
|
||||
private void playShareOuterGuideVoice() {
|
||||
long intervalTime = SharedPrefsMgr.getInstance(getContext()).getLong(KEY_SHARE_OUTER_GUIDE_TIME, 0);
|
||||
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_SHARE_OUTER_GUIDE, 0);
|
||||
int serverIssueCount = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_SERVER_SHOW_DAY_COUNT, 6);
|
||||
|
||||
if (shareItemSum < serverIssueCount) {
|
||||
long time = System.currentTimeMillis();
|
||||
Logger.d(TAG, " playShareOuterGuideVoice shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "----serverIssueCount = " + serverIssueCount + "---time = " + time);
|
||||
if (intervalTime == 0) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_OUTER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_OUTER_GUIDE, ++shareItemSum);
|
||||
// AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[random.nextInt(3)]);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[0]);
|
||||
} else {
|
||||
Logger.d(TAG, " playShareOuterGuideVoice else interval = " + (time - intervalTime));
|
||||
if ((time - intervalTime) > SEVEN_DAY_TIME) {
|
||||
if (shareItemSum == 1) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[1]);
|
||||
} else if (shareItemSum == 2) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[2]);
|
||||
} else if (shareItemSum == 3) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[0]);
|
||||
} else if (shareItemSum == 4) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[1]);
|
||||
} else if (shareItemSum == 5) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mOuterGuideVoiceStrings[2]);
|
||||
}
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_OUTER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_OUTER_GUIDE, ++shareItemSum);
|
||||
} else {
|
||||
Logger.e(TAG, " playShareOuterGuideVoice else < ONE_DAY_TIME ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void playShareGuideVoice() {
|
||||
long intervalTime = SharedPrefsMgr.getInstance(getContext()).getLong(KEY_CLICK_SHARE_TIME, 0);
|
||||
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_CLICK_SHARE_BUTTON, 0);
|
||||
@@ -448,33 +359,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
}
|
||||
|
||||
private void showSlideMapVoiceGuide() {
|
||||
long intervalTime = SharedPrefsMgr.getInstance(getContext()).getLong(KEY_SHARE_INNER_GUIDE_TIME, 0);
|
||||
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_SHARE_INNER_GUIDE, 0);
|
||||
if (shareItemSum < VOICE_ALERT_COUNT) {
|
||||
long time = System.currentTimeMillis();
|
||||
Logger.d(TAG, " showSlideMapVoiceGuide shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "---time = " + time);
|
||||
if (intervalTime == 0) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_INNER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_INNER_GUIDE, ++shareItemSum);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mInnerGuideVoiceStrings[0]);
|
||||
} else {
|
||||
Logger.d(TAG, " showSlideMapVoiceGuide else interval = " + (time - intervalTime));
|
||||
if ((time - intervalTime) > ONE_DAY_TIME) {
|
||||
if (shareItemSum == 1) {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mInnerGuideVoiceStrings[1]);
|
||||
} else {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(mInnerGuideVoiceStrings[2]);
|
||||
}
|
||||
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_INNER_GUIDE_TIME, time);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_INNER_GUIDE, ++shareItemSum);
|
||||
|
||||
} else {
|
||||
Logger.e(TAG, " showSlideMapVoiceGuide else < ONE_DAY_TIME ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTouch(MotionEvent motionEvent) {
|
||||
@@ -484,11 +368,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
if (isGreaterThanOneDay()) {
|
||||
if (motionEvent.getX() > 200) {
|
||||
showSlideMapVoiceGuide();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -549,10 +428,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
mClickShareVoiceStrings =
|
||||
getContext().getResources().getStringArray(R.array.click_share_voice_guide_array);
|
||||
mInnerGuideVoiceStrings =
|
||||
getContext().getResources().getStringArray(R.array.search_voice_guide_inner_array);
|
||||
mOuterGuideVoiceStrings =
|
||||
getContext().getResources().getStringArray(R.array.search_voice_guide_outer_array);
|
||||
|
||||
//TODO 因为衡阳6.30交付没有2D模式,临时方案,进入vr模式,不可缩放地图
|
||||
// 进入鹰眼模式,设置手势缩放地图失效
|
||||
@@ -772,19 +647,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
getString(R.string.module_ext_str_dots) : String.valueOf(amount));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderUserInfo(UserInfo userInfo) {
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
return;
|
||||
}
|
||||
if (userInfo != null) {
|
||||
Logger.d(TAG, "renderUserInfo: " + userInfo);
|
||||
RequestOptions options =
|
||||
new RequestOptions().circleCrop().placeholder(R.drawable.model_ext_default_user_head).error(R.drawable.model_ext_default_user_head);
|
||||
GlideApp.with(getContext()).asBitmap().apply(options).load(userInfo.getHeadImgurl()).into(new SkinAbleBitmapTarget(mUserHeadImg, options));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapModeChanged(EnumMapUI ui) {
|
||||
if (mCameraMode == null) {
|
||||
@@ -988,18 +850,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (v.getId() == R.id.ivUserHeadImg) {
|
||||
// 个人中心
|
||||
try {
|
||||
LaunchUtils.launchByPkg(getContext(), "com.zhidao.auto.personal");
|
||||
// 埋点
|
||||
final Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", 3);
|
||||
ServiceApisManager.serviceApis.getAnalyticsApi().track("Launcher_APP_Icon",
|
||||
properties);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "打开个人中心Exception");
|
||||
}
|
||||
} else if (v.getId() == R.id.module_ext_enter_vr_mode) {
|
||||
// 进入vr模式
|
||||
mMApUIController.changeMapMode(EnumMapUI.Type_VR);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
@@ -8,8 +10,8 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.network.utils.digest.DigestUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
@@ -19,14 +21,10 @@ import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.bean.CommonConfig;
|
||||
import com.mogo.module.extensions.bean.CommonConfigResponse;
|
||||
import com.mogo.module.extensions.net.GetConfigApiServices;
|
||||
import com.mogo.module.extensions.net.UserInfoNetApiServices;
|
||||
import com.mogo.module.extensions.userinfo.UserInfo;
|
||||
import com.mogo.module.extensions.userinfo.UserInfoResponse;
|
||||
import com.mogo.module.extensions.weather.Phenomena;
|
||||
import com.mogo.module.extensions.weather.WeatherCallback;
|
||||
import com.mogo.module.extensions.weather.WeatherInfo;
|
||||
import com.mogo.module.extensions.weather.WeatherModel;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.statusmanager.IMogoMsgCenter;
|
||||
import com.mogo.service.statusmanager.IMogoMsgCenterListener;
|
||||
@@ -38,8 +36,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
@@ -105,13 +101,6 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
public void onResume(@NonNull LifecycleOwner owner) {
|
||||
super.onResume(owner);
|
||||
isResumed = true;
|
||||
if (userInfo != null) {
|
||||
mView.renderUserInfo(userInfo);
|
||||
}
|
||||
if (DebugConfig.isNeedRequestUserInfo()) {
|
||||
// 相当于每次onResume都会请求一下个人信息,目的是能够相对及时的同步手机端的个人信息修改
|
||||
requestUserInfo();
|
||||
}
|
||||
getCommonConfig();
|
||||
}
|
||||
|
||||
@@ -179,56 +168,4 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private UserInfo userInfo;
|
||||
|
||||
public void requestUserInfo() {
|
||||
Map<String, String> params = new ArrayMap<>();
|
||||
params.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
params.put("source", "2");
|
||||
String sign = createSign(params, "JGqZw9");
|
||||
params.put("sig", sign);
|
||||
mNetWork.create(UserInfoNetApiServices.class, HostConst.CARLIFE_HOST).requestUserInfo(params).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new SingleObserver<UserInfoResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(UserInfoResponse userInfoBaseResponse) {
|
||||
userInfo = userInfoBaseResponse.getResult();
|
||||
if (isResumed) {
|
||||
if (userInfo != null) {
|
||||
Logger.d(TAG, "获取个人信息成功: " + userInfo);
|
||||
mView.renderUserInfo(userInfo);
|
||||
} else {
|
||||
Logger.e(TAG, "获取个人信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
e.printStackTrace();
|
||||
Logger.e(TAG, e, "获取个人信息失败==");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private String createSign(Map<String, String> map, String salt) {
|
||||
try {
|
||||
StringBuilder queryString = new StringBuilder();
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
queryString.append(entry.getKey())
|
||||
.append("=")
|
||||
.append(entry.getValue())
|
||||
.append("&");
|
||||
}
|
||||
queryString.append("key=").append(DigestUtils.shaHex(salt));
|
||||
return DigestUtils.shaHex(queryString.toString()).toUpperCase();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.e(TAG, e, "createSign()");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,33 +69,6 @@
|
||||
tools:text="···" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivUserHeadBoard"
|
||||
android:layout_width="@dimen/module_ext_user_avator_board_size"
|
||||
android:layout_height="@dimen/module_ext_user_avator_board_size"
|
||||
android:layout_marginTop="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
|
||||
android:background="@drawable/model_ext_default_user_head_board"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivUserHeadImg"
|
||||
android:layout_width="@dimen/module_ext_user_avator_size"
|
||||
android:layout_height="@dimen/module_ext_user_avator_size"
|
||||
android:src="@drawable/model_ext_default_user_head"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivUserHeadBoard"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivUserHeadBoard"
|
||||
app:layout_constraintRight_toRightOf="@id/ivUserHeadBoard"
|
||||
app:layout_constraintTop_toTopOf="@id/ivUserHeadBoard"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupUserHead"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="ivUserHeadBoard,ivUserHeadImg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/debugPanel"
|
||||
android:layout_width="48dp"
|
||||
|
||||
@@ -49,25 +49,11 @@
|
||||
<item>你好小智,返回桌面</item>
|
||||
</string-array>
|
||||
|
||||
<!--内部触发-->
|
||||
<string-array name="search_voice_guide_inner_array">
|
||||
<item>查询路况,唤醒小智说“天安门附近路况怎么样”</item>
|
||||
<item>想知道出行路况,唤醒小智说“中关村堵车吗”</item>
|
||||
<item>出行路况早知道,唤醒小智说“长安街路况怎么样”</item>
|
||||
</string-array>
|
||||
|
||||
<!--点击分享按钮-->
|
||||
<string-array name="click_share_voice_guide_array">
|
||||
<item>您可以将当前的路况分享给其他车友,帮助他们获得最新的路况信息,试试对我说“上报路况”</item>
|
||||
<item>您的分享信息将会帮助更多车友,当您发现以下交通事件,可以直接对我说上报路况</item>
|
||||
</string-array>
|
||||
|
||||
<!--外部触发-->
|
||||
<string-array name="search_voice_guide_outer_array">
|
||||
<item>查路况您可以直接唤醒小智说“天安门附近堵不堵”</item>
|
||||
<item>出行路况早知道,试试唤醒小智说,“附近路况怎么样”</item>
|
||||
<item>提前看看出行路况,试试唤醒小智说,“中关村路况怎么样”</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -175,14 +175,8 @@ public class EventDispatchCenter implements
|
||||
this.mMapLoadedCallback = callback;
|
||||
}
|
||||
|
||||
// private boolean mIsMapLoaded = false;
|
||||
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
// if ( mIsMapLoaded ) {
|
||||
// return;
|
||||
// }
|
||||
// mIsMapLoaded = true;
|
||||
if ( mMapLoadedCallback != null ) {
|
||||
mMapLoadedCallback.run();
|
||||
mMapLoadedCallback = null;
|
||||
|
||||
@@ -17,6 +17,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.BaseFragment;
|
||||
|
||||
@@ -48,7 +48,7 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
startTanluService();
|
||||
initADAS();
|
||||
initGpsSimulatorListener();
|
||||
}, 2_000L
|
||||
}, 4_000L
|
||||
);
|
||||
// 开启延时检测
|
||||
DelayCheckUtil delayCheckUtil = new DelayCheckUtil(this);
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
@@ -595,7 +596,8 @@ public class MockIntentHandler implements IntentHandler {
|
||||
case 52:
|
||||
// 打开连调工控机、ADAS的控制面板
|
||||
//adb shell am broadcast -a com.mogo.mock --ei oper 52
|
||||
EnvStatusManager.getInstance().showPanel(context);
|
||||
//EnvStatusManager.getInstance().showPanel(context);
|
||||
ToastUtils.showShort("请使用新版调试面板!!");
|
||||
break;
|
||||
case 53:// 控制 Adas识别 是否可用
|
||||
boolean isUseAdasRecognize = intent.getBooleanExtra("status", false);
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.mogo.module.service.R;
|
||||
import static com.mogo.eagle.core.utilcode.util.CommonUtils.getVersionName;
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2021/3/17
|
||||
*
|
||||
|
||||
@@ -12,11 +12,6 @@ import com.mogo.map.uicontroller.EnumMapUI;
|
||||
*/
|
||||
public interface IMogoADASController extends IProvider {
|
||||
|
||||
/**
|
||||
* 打开adas
|
||||
*/
|
||||
@Deprecated
|
||||
void openADAS();
|
||||
|
||||
/**
|
||||
* 隐藏adas
|
||||
@@ -117,8 +112,6 @@ public interface IMogoADASController extends IProvider {
|
||||
*/
|
||||
int getAutopilotStatus();
|
||||
|
||||
void mockOchStatus(int state, String reason);
|
||||
|
||||
/**
|
||||
* 获取车身的定位纬度
|
||||
*
|
||||
|
||||
@@ -10,12 +10,6 @@ import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
*/
|
||||
public interface IMogoStatusManager extends IProvider {
|
||||
|
||||
/**
|
||||
* TopView是否在展示
|
||||
* @return
|
||||
*/
|
||||
boolean isTopViewShow();
|
||||
|
||||
/**
|
||||
* 是否在vr模式
|
||||
* @return true - 在vr模式 false - 不在vr模式
|
||||
@@ -29,14 +23,6 @@ public interface IMogoStatusManager extends IProvider {
|
||||
*/
|
||||
boolean isVoiceShow();
|
||||
|
||||
/**
|
||||
* adas UI 是否在展示
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isADASShow();
|
||||
|
||||
/**
|
||||
* v2x UI 是否在展示
|
||||
*
|
||||
|
||||
@@ -54,8 +54,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
public static final String VAL_OPEN = "打开";
|
||||
public static final String VAL_CLOSE = "关闭";
|
||||
|
||||
private final IMogoStatusManager mStatusManager = SingletonsHolder.get(IMogoStatusManager.class);
|
||||
|
||||
private AdasProvider adasProvider;
|
||||
|
||||
/**
|
||||
@@ -82,14 +80,17 @@ public class MogoADASController implements IMogoADASController {
|
||||
return mSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLastLat() {
|
||||
return mLastLat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLastLon() {
|
||||
return mLastLon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSatelliteTime() {
|
||||
return satelliteTime;
|
||||
}
|
||||
@@ -97,8 +98,8 @@ public class MogoADASController implements IMogoADASController {
|
||||
private final List<IMogoAdasOCHCallback> mAdasOCHCallback = new CopyOnWriteArrayList<>();
|
||||
|
||||
@Override
|
||||
public void openADAS() {
|
||||
showADAS();
|
||||
public void init(Context context) {
|
||||
adasProvider = ARouter.getInstance().navigation(AdasProvider.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,20 +115,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
public void showADAS() {
|
||||
Logger.d(TAG, "showADAS()");
|
||||
init(AbsMogoApplication.getApp());
|
||||
adasProvider.addAdasStatusListener(new IAdasStatusListener() {
|
||||
@Override
|
||||
public void onServiceConnected() {
|
||||
Logger.d(TAG, "adas statusListener connected");
|
||||
invokeShowADASOperation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceDisconnected() {
|
||||
Logger.d(TAG, "adas statuslistener disconnected");
|
||||
}
|
||||
});
|
||||
invokeShowADASOperation();
|
||||
|
||||
if (mAdasDataListener == null) {
|
||||
mAdasDataListener = new IAdasDataListener() {
|
||||
@Override
|
||||
@@ -209,41 +196,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void invokeShowADASOperation() {
|
||||
int delay = 0;
|
||||
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
|
||||
if (mStatusManager.isSearchUIShow()) {
|
||||
return;
|
||||
}
|
||||
if (!mStatusManager.isMainPageOnResume()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SingletonsHolder.get(IMogoStatusManager.class).isVrMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
adasProvider.showAdas();
|
||||
} catch (Exception e) {
|
||||
Intent intent = new Intent(ACTION);
|
||||
intent.putExtra(PARAM_COMMAND, VAL_COMMAND);
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put(PARAM_OBJECT, VAL_OBJECT);
|
||||
object.put(PARAM_OPERATION, VAL_OPEN);
|
||||
intent.putExtra(PARAM_DATA, object.toString());
|
||||
sendBroadcast(intent);
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeADAS() {
|
||||
|
||||
@@ -276,11 +228,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
adasProvider = ARouter.getInstance().navigation(AdasProvider.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeAdasControlMode(EnumMapUI ui) {
|
||||
if (ui == null || !DebugConfig.isMapBased()) {
|
||||
@@ -422,9 +369,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
|
||||
@Override
|
||||
public int getAutopilotStatus() {
|
||||
if (mockState != -2) {
|
||||
return mockState;
|
||||
}
|
||||
int status = IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE;
|
||||
try {
|
||||
status = adasProvider.autopilotStateCall().getState();
|
||||
@@ -434,26 +378,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
return status;
|
||||
}
|
||||
|
||||
private int mockState = -2;
|
||||
|
||||
@Override
|
||||
public void mockOchStatus(int state, String reason) {
|
||||
if (state == -1) {
|
||||
if (!mAdasOCHCallback.isEmpty()) {
|
||||
for (IMogoAdasOCHCallback cb : mAdasOCHCallback) {
|
||||
cb.onArriveAt(new AutopilotStationInfo(1, 1d, 1d));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mockState = state;
|
||||
if (!mAdasOCHCallback.isEmpty()) {
|
||||
for (IMogoAdasOCHCallback cb : mAdasOCHCallback) {
|
||||
cb.onStateChanged(state, reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelAutopilot() {
|
||||
adasProvider.cancelPilot();
|
||||
|
||||
@@ -52,11 +52,6 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
return get_bool_val(StatusDescriptor.VR_MODE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isADASShow() {
|
||||
return get_bool_val( StatusDescriptor.ADAS_UI );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isV2XShow() {
|
||||
return get_bool_val( StatusDescriptor.V2X_UI );
|
||||
@@ -130,11 +125,6 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
return get_bool_val( StatusDescriptor.MAIN_PAGE_CREATED );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTopViewShow() {
|
||||
return get_bool_val(StatusDescriptor.TOP_VIEW);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMediaPlaying() {
|
||||
return get_bool_val( StatusDescriptor.MEDIA_PLAYER_STATUS );
|
||||
|
||||
@@ -670,7 +670,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
|
||||
@Override
|
||||
public void onProgress(int currentTime, int totalTime, boolean isRefTextTTSFinished) {
|
||||
Logger.d(TAG, "当前:" + currentTime + "ms, 总计:" + totalTime + "ms, 可信度:" + isRefTextTTSFinished);
|
||||
//Logger.d(TAG, "当前:" + currentTime + "ms, 总计:" + totalTime + "ms, 可信度:" + isRefTextTTSFinished);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user