[dev_arch_opt_3.0] 添加obu通过工控机通道,红绿灯状态的重置

This commit is contained in:
lixiaopeng
2023-02-21 10:38:40 +08:00
parent 41ca720502
commit 82c740d67d
2 changed files with 27 additions and 29 deletions

View File

@@ -247,11 +247,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
MogoObuConstants.STATUS.ADD -> {
saveObuToDcData(appId, alertContent, ttsContent)
showWarning(appId, alertContent, ttsContent, direction)
// 更新数据,是否需要
// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData)?.let {
// CallerMapUIServiceManager.getMarkerService()
// ?.updateITrafficThreatLevelInfo(it)
// }
}
MogoObuConstants.STATUS.UPDATE -> { // 更新
@@ -261,14 +256,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
MogoObuConstants.STATUS.DELETE -> {
// 关闭警告红边
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_NON)
// 更新数据,删除标牌?
// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData)
// ?.let {
// // 事件结束,还原车辆颜色
// it.threatLevel = 0x01
// CallerMapUIServiceManager.getMarkerService()
// ?.updateITrafficInfo(it)
// }
}
}
}
@@ -285,14 +272,19 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
)
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
if (rsmWarningData != null && rsmWarningData.participant != null) {
var v2xType = if (rsmWarningData.participant.ptcType == 1) { //机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
} else if (rsmWarningData.participant.ptcType == 2) { //非机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
} else if (rsmWarningData.participant.ptcType == 3) { //行人
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
} else { //未知
EventTypeEnumNew.TYPE_ERROR.poiType
var v2xType = when (rsmWarningData.participant.ptcType) {
1 -> { //机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
}
2 -> { //非机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
}
3 -> { //行人
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
}
else -> { //未知
EventTypeEnumNew.TYPE_ERROR.poiType
}
}
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
val alertContent =
@@ -470,6 +462,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
MogoObuConstants.STATUS.DELETE -> {
// 移除顶部弹窗,当收不到信号的时候触发一次
CallerTrafficLightListenerManager.disableTrafficLight()
CallerTrafficLightListenerManager.invokeTrafficLightDisapper()
isShowGreenWave = false
isShowRunRedLight = false
}

View File

@@ -437,14 +437,19 @@ class MogoPrivateObuNewManager private constructor() {
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
if (data != null && data.participant != null) {
var v2xType = if (data.participant.ptcType == 1) { //机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
} else if (data.participant.ptcType == 2) { //非机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
} else if (data.participant.ptcType == 3) { //行人
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
} else { //未知
EventTypeEnumNew.TYPE_ERROR.poiType
var v2xType = when (data.participant.ptcType) {
1 -> { //机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
}
2 -> { //非机动车
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
}
3 -> { //行人
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
}
else -> { //未知
EventTypeEnumNew.TYPE_ERROR.poiType
}
}
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
val alertContent = EventTypeEnumNew.getWarningContent(v2xType)