[2.13.2] 保存对应类型数据,对接消息盒子
This commit is contained in:
@@ -4,10 +4,15 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.msgbox.DataSourceType
|
||||
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.api.obucombine.IMoGoObuDcCombineListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerManager
|
||||
import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertDcCombineUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -253,7 +258,19 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
|
||||
MogoObuConstants.STATUS.ADD -> {
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerHmiManager.showWarningV2X(
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
@@ -336,10 +353,21 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
|
||||
|
||||
when (rsmWarningData.warningMsg.warningDataList.get(0).status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerHmiManager.showWarningV2X(
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
@@ -347,13 +375,14 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
CallerHmiManager.showWarning(
|
||||
WarningDirectionEnum.ALERT_WARNING_NON
|
||||
)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
// }
|
||||
|
||||
// 更新数据 TODO
|
||||
TrafficDataConvertDcCombineUtils.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)?.let {
|
||||
@@ -522,6 +551,19 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
|
||||
CallerLogger.d("${M_OBU}${TAG}","MogoObuDcCombineManager changeTrafficLightStatus 闯红灯 --------> ttsContent = $ttsContent ---alertContent = $alertContent ")
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
|
||||
CallerHmiManager.showWarningV2X(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, null, true, 5000L)
|
||||
@@ -552,16 +594,28 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
|
||||
)
|
||||
val maxSpeed = currentLight.suggestMaxSpeed*3.6
|
||||
if (maxSpeed > 0) {
|
||||
CallerHmiManager.showWarningV2X(
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
appId.toString(),
|
||||
null,
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig.isShowObuLimitSpeedView
|
||||
import com.mogo.eagle.core.data.enums.*
|
||||
import com.mogo.eagle.core.data.msgbox.DataSourceType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
@@ -417,13 +418,15 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.OBU
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
@@ -437,7 +440,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
},
|
||||
true,
|
||||
3000L
|
||||
5000L
|
||||
)
|
||||
|
||||
// 更新数据
|
||||
@@ -525,13 +528,15 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.OBU
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType,
|
||||
@@ -759,13 +764,15 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
//不显示弹框,其它保留
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.OBU
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
@@ -789,7 +796,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
},
|
||||
true,
|
||||
3000L
|
||||
5000L
|
||||
)
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
@@ -873,11 +880,24 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
isShowRunRedLight = true
|
||||
CallerHmiManager.disableWarningV2X(0x2.toString())
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}","changeTrafficLightStatus 闯红灯 --------> ")
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId.toString())
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.OBU
|
||||
}
|
||||
)
|
||||
|
||||
CallerHmiManager.warningV2X(
|
||||
appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(), null, true, 5000L)
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -911,13 +931,15 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.OBU
|
||||
}
|
||||
)
|
||||
|
||||
CallerHmiManager.warningV2X(
|
||||
|
||||
Reference in New Issue
Block a user