修改事件可能冲突的问题
This commit is contained in:
@@ -18,6 +18,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.module.common.drawer.TrafficMarkerDrawer
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.common.enums.V2iEventTypeEnum
|
||||
import com.mogo.support.obu.MogoObuManager
|
||||
import com.mogo.support.obu.OnMogoObuListener
|
||||
import com.mogo.support.obu.constants.MogoObuComType
|
||||
@@ -239,49 +240,51 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
EventTypeEnum.TYPE_USECASE_ID_HLW.poiType
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_HLW.poiType
|
||||
-> {
|
||||
when (data.warning_Msg[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
appId =
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_SLW.poiType
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道
|
||||
appId = EventTypeEnum.FOURS_ROAD_WORK.poiType
|
||||
appId = V2iEventTypeEnum.FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = EventTypeEnum.FOURS_PONDING.poiType
|
||||
appId = V2iEventTypeEnum.FOURS_PONDING.poiType
|
||||
}
|
||||
}
|
||||
alertContent = EventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
}
|
||||
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVS.poiType -> { //车内标牌
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_IVS.poiType -> { //车内标牌
|
||||
when (data.warning_Msg[0].eventSerialNum) {
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
appId =
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
|
||||
}
|
||||
alertContent = EventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
}
|
||||
|
||||
// 前方拥堵提醒 TODO
|
||||
EventTypeEnum.TYPE_USECASE_ID_TJW.poiType -> {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_TJW.poiType -> {
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = if (data.warning_Msg[0].distance.toInt() != 0) {
|
||||
String.format(
|
||||
EventTypeEnum.getWarningContent(appId),
|
||||
V2iEventTypeEnum.getWarningContent(appId),
|
||||
data.warning_Msg[0].distance.toInt()
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user