[2.13.0-opt]remove service module and module-common

This commit is contained in:
zhongchao
2022-12-23 14:09:47 +08:00
parent 704200d03f
commit 40caefa91f
163 changed files with 13479 additions and 980 deletions

View File

@@ -2,14 +2,16 @@ package com.mogo.eagle.core.function.obu.mogo
import android.content.Context
import android.util.Log
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.voice.AIAssist
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeHelper
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
@@ -17,18 +19,12 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeHelper
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.service.IMogoServiceApis
import com.zhidao.support.obu.MogoObuManager
import com.zhidao.support.obu.OnMogoObuListener
import com.zhidao.support.obu.constants.ObuConstants
@@ -49,14 +45,11 @@ class MogoPrivateObuManager private constructor() {
}
}
private var mMogoServiceApis: IMogoServiceApis? = null
private var mContext: Context? = null
private var mObuStatusInfo = CallerObuListenerManager.getObuStatusInfo()
fun init(context: Context, ipAddress: String) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "obuManager初始化--")
mMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS)
.navigation(context) as IMogoServiceApis
mContext = context
//连接obu设备
connectObu(context, ipAddress)
@@ -329,7 +322,8 @@ class MogoPrivateObuManager private constructor() {
}
//事故易发路段
0x1B -> {
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
appId =
EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
}
//环岛行驶
0x1C -> {
@@ -376,16 +370,21 @@ class MogoPrivateObuManager private constructor() {
// 添加
ObuConstants.STATUS.ADD -> {
//不显示弹框,其它保留
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old onCvxRtiThreatIndInfo ------> appId = $appId --- alertContent = $alertContent --- ttsContent = $ttsContent ")
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
"old onCvxRtiThreatIndInfo ------> appId = $appId --- alertContent = $alertContent --- ttsContent = $ttsContent "
)
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
Log.d("MsgBox-PriObuManager4", "alertContent或ttsContent为空!")
}
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
V2XMsg(appId,
V2XMsg(
appId,
alertContent,
ttsContent)
ttsContent
)
)
)
CallerHmiManager.warningV2X(
@@ -503,16 +502,21 @@ class MogoPrivateObuManager private constructor() {
// if (level == 2 || level == 3) { //不考虑level
//显示警告红边
CallerHmiManager.showWarning(direction)
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old onCvxPtcThreatIndInfo ------> v2xType = $v2xType --- alertContent = $alertContent --- ttsContent = $ttsContent ")
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
"old onCvxPtcThreatIndInfo ------> v2xType = $v2xType --- alertContent = $alertContent --- ttsContent = $ttsContent "
)
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
Log.d("MsgBox-PriObuManager5", "alertContent或ttsContent为空!")
}
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
V2XMsg(v2xType,
V2XMsg(
v2xType,
alertContent,
ttsContent)
ttsContent
)
)
)
CallerHmiManager.warningV2X(
@@ -729,7 +733,10 @@ class MogoPrivateObuManager private constructor() {
0x2 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
alertContent = EventTypeEnum.getWarningContent(appId.toString())
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old changeTrafficLightStatus ------> appId.toString() = ${appId.toString()} --- alertContent = $alertContent --- ttsContent = $ttsContent ")
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
"old changeTrafficLightStatus ------> appId.toString() = ${appId.toString()} --- alertContent = $alertContent --- ttsContent = $ttsContent "
)
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
Log.d("MsgBox-PriObuManager1", "alertContent或ttsContent为空!")
}
@@ -806,16 +813,21 @@ class MogoPrivateObuManager private constructor() {
val maxSpeed = currentLight.glosa_suggested_speed_max.toInt()
if (maxSpeed > 0) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old changeTrafficLightStatus ------> TYPE_USECASE_ID_IVP_GREEN --- alertContent = $alertContent --- ttsContent = $ttsContent ")
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
"old changeTrafficLightStatus ------> TYPE_USECASE_ID_IVP_GREEN --- alertContent = $alertContent --- ttsContent = $ttsContent "
)
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
Log.d("MsgBox-PriObuManager2", "alertContent或ttsContent为空!")
}
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
V2XMsg(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
V2XMsg(
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContent,
ttsContent)
ttsContent
)
)
)
CallerHmiManager.warningV2X(
@@ -942,7 +954,8 @@ class MogoPrivateObuManager private constructor() {
)
if (level == 2 || level == 3) {
//不显示顶部弹框,其它保留
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
"old handleSdkObu appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
)
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
@@ -951,9 +964,11 @@ class MogoPrivateObuManager private constructor() {
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
V2XMsg(appId.toString(),
V2XMsg(
appId.toString(),
alertContent,
ttsContent)
ttsContent
)
)
)
CallerHmiManager.warningV2X(