..
This commit is contained in:
@@ -59,6 +59,7 @@ import com.mogo.module.common.entity.*
|
||||
import com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum.FOURS_BLOCK_UP
|
||||
import com.mogo.module.common.enums.EventTypeHelper
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS
|
||||
@@ -525,70 +526,78 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
var changeVisualAngle = false
|
||||
when (message.status) {
|
||||
1 -> {
|
||||
var tts = ""
|
||||
var content = ""
|
||||
var appId = 0
|
||||
var tempAppId = 0
|
||||
var tempTts = ""
|
||||
var tempContent = ""
|
||||
when (message.typeId) {
|
||||
1001 -> {
|
||||
// 弱势交通碰撞预警
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt()
|
||||
tts = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.tts
|
||||
content = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.content
|
||||
EventTypeHelper.getVRU{ appId, tts, content ->
|
||||
tempAppId = appId
|
||||
tempTts = tts
|
||||
tempContent = content
|
||||
}
|
||||
}
|
||||
1002 -> {
|
||||
// 弱势交通逆行预警
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt()
|
||||
tts = "行人逆行预警"
|
||||
content = "行人逆行预警"
|
||||
EventTypeHelper.getVRURI { appId, tts, content ->
|
||||
tempAppId = appId
|
||||
tempTts = tts
|
||||
tempContent = content
|
||||
}
|
||||
}
|
||||
1003 -> {
|
||||
// 交叉路口碰撞预警
|
||||
changeVisualAngle = true
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ICW.poiType.toInt()
|
||||
tts = EventTypeEnum.TYPE_USECASE_ID_ICW.tts
|
||||
content = EventTypeEnum.TYPE_USECASE_ID_ICW.content
|
||||
tempAppId = EventTypeEnum.TYPE_USECASE_ID_ICW.poiType.toInt()
|
||||
tempTts = EventTypeEnum.TYPE_USECASE_ID_ICW.tts
|
||||
tempContent = EventTypeEnum.TYPE_USECASE_ID_ICW.content
|
||||
}
|
||||
1004 -> {
|
||||
// 交叉路口碰撞预警
|
||||
changeVisualAngle = true
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_BSW.poiType.toInt()
|
||||
tts = String.format(
|
||||
tempAppId = EventTypeEnum.TYPE_USECASE_ID_BSW.poiType.toInt()
|
||||
tempTts = String.format(
|
||||
EventTypeEnum.TYPE_USECASE_ID_BSW.tts,
|
||||
getWarningDirection()
|
||||
)
|
||||
content = EventTypeEnum.TYPE_USECASE_ID_BSW.content
|
||||
tempContent = EventTypeEnum.TYPE_USECASE_ID_BSW.content
|
||||
}
|
||||
1006 -> {
|
||||
// 逆向超车预警
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_DNPW.poiType.toInt()
|
||||
tts = EventTypeEnum.TYPE_USECASE_ID_DNPW.tts
|
||||
content = EventTypeEnum.TYPE_USECASE_ID_DNPW.content
|
||||
tempAppId = EventTypeEnum.TYPE_USECASE_ID_DNPW.poiType.toInt()
|
||||
tempTts = EventTypeEnum.TYPE_USECASE_ID_DNPW.tts
|
||||
tempContent = EventTypeEnum.TYPE_USECASE_ID_DNPW.content
|
||||
}
|
||||
1005 -> {
|
||||
// 闯红灯预警
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_IVP.poiType.toInt()
|
||||
tts = EventTypeEnum.TYPE_USECASE_ID_IVP.tts
|
||||
content = EventTypeEnum.TYPE_USECASE_ID_IVP.content
|
||||
tempAppId = EventTypeEnum.TYPE_USECASE_ID_IVP.poiType.toInt()
|
||||
tempTts = EventTypeEnum.TYPE_USECASE_ID_IVP.tts
|
||||
tempContent = EventTypeEnum.TYPE_USECASE_ID_IVP.content
|
||||
}
|
||||
2001 -> {
|
||||
// 最优车道
|
||||
appId = EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.poiType.toInt()
|
||||
tts = EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.tts
|
||||
content = EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.content
|
||||
EventTypeHelper.getOptLine{ appId, tts, content ->
|
||||
tempAppId = appId
|
||||
tempTts = tts
|
||||
tempContent = content
|
||||
}
|
||||
}
|
||||
3001 -> {
|
||||
// 前方道路拥堵预警
|
||||
appId = FOURS_BLOCK_UP.poiType.toInt()
|
||||
tts = FOURS_BLOCK_UP.tts
|
||||
content = FOURS_BLOCK_UP.content
|
||||
EventTypeHelper.getTJW{ appId, tts, content ->
|
||||
tempAppId = appId
|
||||
tempTts = tts
|
||||
tempContent = content
|
||||
}
|
||||
}
|
||||
}
|
||||
// 显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId.toString(),
|
||||
content,
|
||||
tts,
|
||||
"$appId",
|
||||
tempAppId.toString(),
|
||||
tempContent,
|
||||
tempTts,
|
||||
"$tempAppId",
|
||||
object : IMoGoWarningStatusListener {
|
||||
val change = changeVisualAngle
|
||||
override fun onShow() {
|
||||
|
||||
Reference in New Issue
Block a user