2.13.0 添加save前的数据日志

This commit is contained in:
lixiaopeng
2022-12-08 16:38:32 +08:00
parent c8fcfc9543
commit bd1a0df80e
2 changed files with 26 additions and 14 deletions

View File

@@ -372,13 +372,9 @@ class MogoPrivateObuManager private constructor() {
when (status) {
// 添加
ObuConstants.STATUS.ADD,
ObuConstants.STATUS.UPDATE// 更新
-> {
//显示警告红边 TODO 需要确定是什么值
// CallerHmiManager.showWarning(direction)
ObuConstants.STATUS.ADD -> {
//不显示弹框,其它保留
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old onCvxRtiThreatIndInfo ------> appId = $appId --- alertContent = $alertContent --- ttsContent = $ttsContent ")
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
@@ -401,6 +397,12 @@ class MogoPrivateObuManager private constructor() {
true,
5000L
)
}
ObuConstants.STATUS.UPDATE -> {
//显示警告红边 TODO 需要确定是什么值
// CallerHmiManager.showWarning(direction)
// 更新数据
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
CallerObuListenerManager.invokeTrackerWarningInfo(it)
@@ -408,6 +410,7 @@ class MogoPrivateObuManager private constructor() {
?.updateITrafficThreatLevelInfo(it)
}
}
// 删除
ObuConstants.STATUS.DELETE -> {
// 关闭警告红边
@@ -500,12 +503,11 @@ class MogoPrivateObuManager private constructor() {
when (info.status) {
// 添加
ObuConstants.STATUS.ADD,
ObuConstants.STATUS.UPDATE// 更新
-> {
// if (level == 2 || level == 3) { //不考虑level
ObuConstants.STATUS.ADD -> {
// 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 ")
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
@@ -529,6 +531,7 @@ class MogoPrivateObuManager private constructor() {
5000L
)
// }
// 更新数据
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
CallerObuListenerManager.invokeTrackerWarningInfo(it)
@@ -536,6 +539,10 @@ class MogoPrivateObuManager private constructor() {
?.updateITrafficThreatLevelInfo(it)
}
}
ObuConstants.STATUS.UPDATE -> {
}
// 删除
ObuConstants.STATUS.DELETE -> {
// 关闭警告红边
@@ -721,6 +728,7 @@ 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 ")
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
@@ -794,6 +802,7 @@ 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 ")
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,
@@ -926,6 +935,9 @@ class MogoPrivateObuManager private constructor() {
)
if (level == 2 || level == 3) {
//不显示顶部弹框,其它保留
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
"old handleSdkObu appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
)
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OBU,

View File

@@ -401,7 +401,7 @@ class MogoPrivateObuNewManager private constructor() {
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} --distance = ${Math.round(data.warningMsg[0].distance)} ---eventRadius = ${Math.round(data.warningMsg[0].eventRadius)} --speedMaxLimit = ${data.warningMsg[0].speedMaxLimit.toInt()}"
"new onMogoObuRsiWarning ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} --distance = ${Math.round(data.warningMsg[0].distance)} ---eventRadius = ${Math.round(data.warningMsg[0].eventRadius)} --speedMaxLimit = ${data.warningMsg[0].speedMaxLimit.toInt()}"
)
when (status) {
MogoObuConstants.STATUS.ADD -> { // 添加
@@ -502,7 +502,7 @@ class MogoPrivateObuNewManager private constructor() {
if (data.warningMsg != null && data.warningMsg.warningData != null && data.warningMsg.warningData.size > 0) {
level = data.warningMsg.warningData[0].warningLevel //默认是1个
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningData[0].status}"
"new onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningData[0].status} ---v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent "
)
when (data.warningMsg.warningData[0].status) {
@@ -736,7 +736,7 @@ class MogoPrivateObuNewManager private constructor() {
MogoObuConstants.STATUS.UPDATE -> {
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
"new handleSdkObu appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
)
if (level == 2 || level == 3) {
//不显示弹框,其它保留
@@ -870,7 +870,7 @@ class MogoPrivateObuNewManager private constructor() {
CallerHmiManager.disableWarningV2X(0x1.toString())
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}"
"new changeTrafficLightStatus speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed} --TYPE_USECASE_ID_IVP_GREEN ---alertContent = $alertContent ---ttsContent = $ttsContent"
)
val adviceSpeed =
"${currentLight.suggestMinSpeed} - ${currentLight.suggestMaxSpeed}"