[dev_minibus-d_230425_3.2.0] obu新增类型移到业务层,后面新增类型只需要业务层修改即可
This commit is contained in:
@@ -92,7 +92,7 @@ ext {
|
||||
|
||||
// obu sdk
|
||||
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
||||
mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.0_beta7',
|
||||
mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.0',
|
||||
|
||||
// google
|
||||
googlezxing : "com.google.zxing:core:3.3.3",
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.support.obu.ObuScene
|
||||
import com.mogo.support.obu.constants.MogoObuConstants
|
||||
import com.zhidao.support.obu.constants.MogoObuShowConstants
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
/**
|
||||
@@ -102,24 +102,24 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (rsiWarningData.warningMsgList[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = EventTypeEnumNew.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
// MogoObuConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道,和标牌重复
|
||||
// MogoObuShowConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道,和标牌重复
|
||||
// appId = EventTypeEnumNew.FOURS_ROAD_WORK.poiType
|
||||
// }
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
}
|
||||
@@ -139,77 +139,77 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
}
|
||||
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (rsiWarningData.warningMsgList[0].signSerialNum) {
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = EventTypeEnumNew.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = EventTypeEnumNew.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = EventTypeEnumNew.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = EventTypeEnumNew.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = EventTypeEnumNew.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = EventTypeEnumNew.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = EventTypeEnumNew.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = EventTypeEnumNew.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = EventTypeEnumNew.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = EventTypeEnumNew.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = EventTypeEnumNew.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = EventTypeEnumNew.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ATTENTION_CONFLUENCE -> { //注意合流
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_ATTENTION_CONFLUENCE -> { //注意合流
|
||||
appId = EventTypeEnumNew.TYPE_ATTENTION_CONFLUENCE.poiType
|
||||
}
|
||||
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN_CROSSING -> { //人行横道
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_PEDESTRIAN_CROSSING -> { //人行横道
|
||||
appId = EventTypeEnumNew.TYPE_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
}
|
||||
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_TJW.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
@@ -244,7 +244,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
}
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
if (mLimitSpeed > 0) {
|
||||
alertContent = String.format(
|
||||
@@ -265,7 +265,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
)
|
||||
when (status) {
|
||||
// 添加
|
||||
MogoObuConstants.STATUS.ADD -> {
|
||||
MogoObuShowConstants.STATUS.ADD -> {
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
}
|
||||
@@ -276,11 +276,11 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
MogoObuShowConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
@@ -320,7 +320,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
val direction = getMessageDirection(rsmWarningData.participant.targetPosition)
|
||||
//模型的显示
|
||||
when (rsmWarningData.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
MogoObuShowConstants.STATUS.ADD -> { // 添加
|
||||
// 更新数据,模型变色的时候是不是update,如果不是更新,可能导致模型不变色,(add的时候,是否有level高的) TODO
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)
|
||||
?.let {
|
||||
@@ -329,10 +329,10 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
MogoObuShowConstants.STATUS.DELETE -> { // 删除
|
||||
// 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)
|
||||
?.let {
|
||||
@@ -357,7 +357,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
} --v2xType--- $v2xType ---alertContent = $alertContent ---ttsContent= $ttsContent"
|
||||
)
|
||||
when (rsmWarningData.warningMsg.warningDataList[0].status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
MogoObuShowConstants.STATUS.ADD -> { // 添加
|
||||
//更新模型的颜色
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(
|
||||
rsmWarningData
|
||||
@@ -374,10 +374,10 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
showWarning(v2xType, alertContent, ttsContent, direction)
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> {// 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
MogoObuShowConstants.STATUS.DELETE -> { // 删除
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_ALL)
|
||||
//删除弱势交通元素
|
||||
@@ -419,7 +419,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
} --- data.speedMaxLimit = ${data.speedMaxLimit}"
|
||||
)
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
MogoObuShowConstants.STATUS.ADD -> { // 添加
|
||||
mLimitSpeed = (data.speedMaxLimit * 3.6).roundToInt()
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
(data.speedMaxLimit * 3.6).roundToInt(),
|
||||
@@ -427,10 +427,10 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
)
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
MogoObuShowConstants.STATUS.DELETE -> { // 删除
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
-1,
|
||||
DataSourceType.OBU
|
||||
@@ -445,22 +445,22 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
*/
|
||||
private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum {
|
||||
return when (targetClassification) {
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_BOTTOM //正后方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.INTERSECTION_RIGHT -> WarningDirectionEnum.ALERT_WARNING_RIGHT //正右方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.INTERSECTION_LEFT -> WarningDirectionEnum.ALERT_WARNING_LEFT //正左方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_LEFT, MogoObuConstants.VEH_TARGET_POSITION.AHEAD_FAR_LEFT,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_LEFT, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_FAR_LEFT
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_BOTTOM //正后方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.INTERSECTION_RIGHT -> WarningDirectionEnum.ALERT_WARNING_RIGHT //正右方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.INTERSECTION_LEFT -> WarningDirectionEnum.ALERT_WARNING_LEFT //正左方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_LEFT, MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_FAR_LEFT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_LEFT, MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_FAR_LEFT
|
||||
-> WarningDirectionEnum.ALERT_WARNING_TOP_LEFT //左前方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.AHEAD_FAR_RIGHT,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_FAT_RIGHT
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_RIGHT, MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_FAR_RIGHT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_RIGHT, MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_FAT_RIGHT
|
||||
-> WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT //右前方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_LEFT, MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_FAR_LEFT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_LEFT, MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_FAR_LEFT,
|
||||
-> WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT //左后方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_FAR_RIGHT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_RIGHT, MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_FAR_RIGHT,
|
||||
-> WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT //右后方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.UNCLASSIFIED -> WarningDirectionEnum.ALERT_WARNING_NON //未知
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.UNCLASSIFIED -> WarningDirectionEnum.ALERT_WARNING_NON //未知
|
||||
else -> WarningDirectionEnum.ALERT_WARNING_ALL
|
||||
}
|
||||
}
|
||||
@@ -479,15 +479,15 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
)
|
||||
when (status) {
|
||||
// 添加
|
||||
MogoObuConstants.STATUS.ADD,
|
||||
MogoObuConstants.STATUS.UPDATE
|
||||
MogoObuShowConstants.STATUS.ADD,
|
||||
MogoObuShowConstants.STATUS.UPDATE
|
||||
-> {
|
||||
if (lights != null && lights.isNotEmpty()) {
|
||||
changeTrafficLightStatus(appId, lights)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
MogoObuShowConstants.STATUS.DELETE -> {
|
||||
// 移除顶部弹窗,当收不到信号的时候触发一次
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightDisapper()
|
||||
isShowGreenWave = false
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.datacenter.obu
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
@@ -27,10 +26,7 @@ import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.support.obu.ObuBase
|
||||
import com.mogo.support.obu.ObuScene
|
||||
import com.mogo.support.obu.constants.MogoObuComType
|
||||
import com.mogo.support.obu.constants.MogoObuConstants
|
||||
import com.mogo.support.obu.constants.MogoObuLogLevel
|
||||
import com.mogo.support.obu.constants.MogoObuTopicId
|
||||
import com.mogo.support.obu.constants.*
|
||||
import com.mogo.support.obu.model.*
|
||||
import com.mogo.support.obu.model.result.BaseResult
|
||||
import com.mogo.support.obu.model.result.MogoObuCallConfigResult
|
||||
@@ -43,6 +39,7 @@ import com.mogo.support.obu.upgrade.ObuSoftwareUpgradeStatus
|
||||
import com.mogo.support.obu.upgrade.OnUpgradeListener
|
||||
import com.zhidao.support.obu.ObuManager
|
||||
import com.zhidao.support.obu.OnObuListener
|
||||
import com.zhidao.support.obu.constants.MogoObuShowConstants
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@@ -380,26 +377,26 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
if (appId != "0") {
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (data.warningMsgList[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = EventTypeEnumNew.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
// MogoObuConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道,和标牌重复
|
||||
// MogoObuShowConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道,和标牌重复
|
||||
// appId = EventTypeEnumNew.FOURS_ROAD_WORK.poiType
|
||||
// }
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
MogoObuShowConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
}
|
||||
@@ -419,83 +416,83 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (data.warningMsgList[0].signSerialNum) {
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = EventTypeEnumNew.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = EventTypeEnumNew.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = EventTypeEnumNew.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = EventTypeEnumNew.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = EventTypeEnumNew.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = EventTypeEnumNew.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = EventTypeEnumNew.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = EventTypeEnumNew.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = EventTypeEnumNew.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = EventTypeEnumNew.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = EventTypeEnumNew.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = EventTypeEnumNew.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
|
||||
// MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
// MogoObuShowConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
// appId =
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
}
|
||||
|
||||
MogoObuConstants.RTS.RTI_TYPE_ATTENTION_CONFLUENCE -> { //注意合流
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_ATTENTION_CONFLUENCE -> { //注意合流
|
||||
appId = EventTypeEnumNew.TYPE_ATTENTION_CONFLUENCE.poiType
|
||||
}
|
||||
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN_CROSSING -> { //人行横道
|
||||
MogoObuShowConstants.RTS.RTI_TYPE_PEDESTRIAN_CROSSING -> { //人行横道
|
||||
appId = EventTypeEnumNew.TYPE_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
}
|
||||
@@ -514,7 +511,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_TJW.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
@@ -531,7 +528,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
MogoObuShowConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
// alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
// ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
@@ -556,7 +553,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
)
|
||||
|
||||
when (status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
MogoObuShowConstants.STATUS.ADD -> { // 添加
|
||||
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
@@ -575,10 +572,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
MogoObuShowConstants.STATUS.DELETE -> { // 删除
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
@@ -637,7 +634,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
"onMogoObuRsmWarning ---- data.status = ${data.status} ---data.participant.ptcId = ${data.participant.ptcId} ---data.participant.ptcType = ${data.participant.ptcType} ---data.warningMsg = ${data.warningMsg} -----data = ${data.toString()}"
|
||||
)
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
MogoObuShowConstants.STATUS.ADD -> { // 添加
|
||||
// 更新数据,模型变色的时候是不是update,如果不是更新,可能导致模型不变色,(add的时候,是否有level高的) TODO
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
@@ -646,10 +643,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
MogoObuShowConstants.STATUS.DELETE -> { // 删除
|
||||
// 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
@@ -673,7 +670,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
"onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningDataList[0].status} ---v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent ---level = $level"
|
||||
)
|
||||
when (data.warningMsg.warningDataList[0].status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
MogoObuShowConstants.STATUS.ADD -> { // 添加
|
||||
//更新模型的颜色
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
@@ -688,10 +685,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
showWarning(v2xType, alertContent, ttsContent, direction)
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> {// 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
MogoObuShowConstants.STATUS.DELETE -> { // 删除
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_ALL)
|
||||
//删除弱势交通元素
|
||||
@@ -716,7 +713,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
"onMogoObuMapMath = ${data.status} --speedMaxLimit = ${(data.speedMaxLimit * 3.6).roundToInt()}"
|
||||
)
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
MogoObuShowConstants.STATUS.ADD -> { // 添加
|
||||
UiThreadHandler.post {
|
||||
if (data.speedMaxLimit > 0) {
|
||||
mLimitSpeed = (data.speedMaxLimit * 3.6).roundToInt()
|
||||
@@ -727,10 +724,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
MogoObuShowConstants.STATUS.DELETE -> { // 删除
|
||||
UiThreadHandler.post {
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
-1,
|
||||
@@ -749,22 +746,22 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
*/
|
||||
private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum {
|
||||
return when (targetClassification) {
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_BOTTOM //正后方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.INTERSECTION_RIGHT -> WarningDirectionEnum.ALERT_WARNING_RIGHT //正右方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.INTERSECTION_LEFT -> WarningDirectionEnum.ALERT_WARNING_LEFT //正左方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_LEFT, MogoObuConstants.VEH_TARGET_POSITION.AHEAD_FAR_LEFT,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_LEFT, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_FAR_LEFT
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_BOTTOM //正后方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.INTERSECTION_RIGHT -> WarningDirectionEnum.ALERT_WARNING_RIGHT //正右方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.INTERSECTION_LEFT -> WarningDirectionEnum.ALERT_WARNING_LEFT //正左方
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_LEFT, MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_FAR_LEFT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_LEFT, MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_FAR_LEFT
|
||||
-> WarningDirectionEnum.ALERT_WARNING_TOP_LEFT //左前方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.AHEAD_FAR_RIGHT,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_FAT_RIGHT
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_RIGHT, MogoObuShowConstants.VEH_TARGET_POSITION.AHEAD_FAR_RIGHT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_RIGHT, MogoObuShowConstants.VEH_TARGET_POSITION.ONCOMING_FAT_RIGHT
|
||||
-> WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT //右前方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_LEFT, MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_FAR_LEFT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_LEFT, MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_FAR_LEFT,
|
||||
-> WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT //左后方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_FAR_RIGHT,
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_RIGHT, MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_FAR_RIGHT,
|
||||
-> WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT //右后方
|
||||
MogoObuConstants.VEH_TARGET_POSITION.UNCLASSIFIED -> WarningDirectionEnum.ALERT_WARNING_NON //未知
|
||||
MogoObuShowConstants.VEH_TARGET_POSITION.UNCLASSIFIED -> WarningDirectionEnum.ALERT_WARNING_NON //未知
|
||||
else -> WarningDirectionEnum.ALERT_WARNING_ALL
|
||||
}
|
||||
}
|
||||
@@ -789,7 +786,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
var changeVisualAngle = false
|
||||
when (appId) {
|
||||
//前向碰撞预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.FCW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.FCW.toString() -> {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion && level == 3) {
|
||||
alertContent = "前车距离过近"
|
||||
ttsContent = "前车距离过近"
|
||||
@@ -803,7 +800,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//交叉路口碰撞预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.ICW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.ICW.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_ICW.poiType)
|
||||
ttsContent =
|
||||
@@ -812,7 +809,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//左转辅助预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.LTA.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.LTA.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_LTA.poiType)
|
||||
ttsContent =
|
||||
@@ -821,7 +818,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//盲区预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.BSW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.BSW.toString() -> {
|
||||
ttsContent =
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_BSW.poiType)
|
||||
alertContent =
|
||||
@@ -847,7 +844,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
// 变道预警,注意左后车辆/注意右后车辆
|
||||
MogoObuConstants.V2X_WARNING_TYPE.LCW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.LCW.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_LCW.poiType)
|
||||
ttsContent =
|
||||
@@ -871,7 +868,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//逆向超车预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.DNPW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.DNPW.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_DNPW.poiType)
|
||||
ttsContent =
|
||||
@@ -880,7 +877,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//紧急制动预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.EBW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.EBW.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_EBW.poiType)
|
||||
ttsContent =
|
||||
@@ -889,7 +886,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//异常车辆提醒
|
||||
MogoObuConstants.V2X_WARNING_TYPE.AVW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.AVW.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_AVW.poiType)
|
||||
ttsContent =
|
||||
@@ -899,7 +896,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
|
||||
//车辆失控预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.CLW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.CLW.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_CLW.poiType)
|
||||
ttsContent =
|
||||
@@ -909,7 +906,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
ttsContent = String.format(ttsContent, direction.desc)
|
||||
}
|
||||
//车辆失控预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.EVW.toString() -> {
|
||||
MogoObuShowConstants.V2X_WARNING_TYPE.EVW.toString() -> {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_EVW.poiType)
|
||||
ttsContent =
|
||||
@@ -920,8 +917,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
|
||||
when (status) {
|
||||
// 添加,更新 add的时候,可能级别是2,
|
||||
MogoObuConstants.STATUS.ADD,
|
||||
MogoObuConstants.STATUS.UPDATE -> {
|
||||
MogoObuShowConstants.STATUS.ADD,
|
||||
MogoObuShowConstants.STATUS.UPDATE -> {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new handleSdkObu appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
@@ -959,7 +956,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
MogoObuShowConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_ALL)
|
||||
//更新周边车辆进行预警颜色变换,车辆实时移动和变色
|
||||
@@ -987,14 +984,14 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
)
|
||||
when (status) {
|
||||
// 添加
|
||||
MogoObuConstants.STATUS.ADD,
|
||||
MogoObuConstants.STATUS.UPDATE -> {
|
||||
MogoObuShowConstants.STATUS.ADD,
|
||||
MogoObuShowConstants.STATUS.UPDATE -> {
|
||||
if (lights != null && lights.isNotEmpty()) {
|
||||
changeTrafficLightStatus(appId, lights)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
MogoObuShowConstants.STATUS.DELETE -> {
|
||||
// 移除顶部弹窗
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightDisapper()
|
||||
isShowGreenWave = false
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
package com.zhidao.support.obu.constants;
|
||||
|
||||
/**
|
||||
* obu 数据类型定义
|
||||
* 后面添加新数据类型,只需要鹰眼业务层修改就可以。obu硬件和obu的sdk都是透传
|
||||
*/
|
||||
public class MogoObuShowConstants {
|
||||
|
||||
public interface STATUS {
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
int UPDATE = 0;
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
int ADD = 1;
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
int DELETE = 2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 红绿灯预警类型
|
||||
*/
|
||||
public interface SPAT_WARNING_TYPE {
|
||||
/**
|
||||
* 无效
|
||||
*/
|
||||
int INVALID = 0;
|
||||
/**
|
||||
* 闯红灯预警(Signal Violation Warning)
|
||||
*/
|
||||
int SVW = 1;
|
||||
/**
|
||||
* 绿波通行引导(Green Light Optimal Speed Advisory)
|
||||
*/
|
||||
int GLOSA = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 交通参与者类型
|
||||
*/
|
||||
public interface PTC_TYPE {
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
int UNKNOWN = 0;
|
||||
/**
|
||||
* 机动车
|
||||
*/
|
||||
int MOTOR_VEHICLE = 1;
|
||||
/**
|
||||
* 非机动车
|
||||
*/
|
||||
int NON_MOTOR_VEHICLE = 2;
|
||||
/**
|
||||
* 行人
|
||||
*/
|
||||
int PEDESTRIAN = 3;
|
||||
/**
|
||||
* OBU自身
|
||||
*/
|
||||
int OBU_ONESELF = 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* 预警类型
|
||||
*/
|
||||
public interface V2X_WARNING_TYPE {
|
||||
/**
|
||||
* 前向碰撞预警(Forward Collision Warning)
|
||||
*/
|
||||
int FCW = 0;
|
||||
/**
|
||||
* 交叉路口碰撞预警(Intersection Collision Warning)
|
||||
*/
|
||||
int ICW = 1;
|
||||
/**
|
||||
* 左转辅助预警(Left Turn Assist)
|
||||
*/
|
||||
int LTA = 2;
|
||||
/**
|
||||
* 盲区预警(Blind Spot Warning)
|
||||
*/
|
||||
int BSW = 3;
|
||||
/**
|
||||
* 变道预警(Lane Change Warning)
|
||||
*/
|
||||
int LCW = 4;
|
||||
/**
|
||||
* 逆向超车预警(Do Not Pass Warning)
|
||||
*/
|
||||
int DNPW = 5;
|
||||
/**
|
||||
* 紧急制动预警(Emergency Brake Warning)
|
||||
*/
|
||||
int EBW = 6;
|
||||
/**
|
||||
* 异常车辆提醒(Abnormal Vehicle Warning)
|
||||
*/
|
||||
int AVW = 7;
|
||||
/**
|
||||
* 失控车辆预警(Control Loss Warning)
|
||||
*/
|
||||
int CLW = 8;
|
||||
/**
|
||||
* 紧急车辆预警(Emergency Vehicle Warning)
|
||||
*/
|
||||
int EVW = 9;
|
||||
/**
|
||||
* 弱势交通参与者碰撞预警(Vulnerable Road User Collision Warning)
|
||||
*/
|
||||
int VRUCW = 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* V2V预警等级
|
||||
*/
|
||||
public interface V2X_WARNING_LEVEL {
|
||||
/**
|
||||
* 无效
|
||||
*/
|
||||
int INVALID = 0;
|
||||
/**
|
||||
* 检测到
|
||||
*/
|
||||
int DETECTED = 1;
|
||||
/**
|
||||
* 通知
|
||||
*/
|
||||
int INFORM = 2;
|
||||
/**
|
||||
* 警告
|
||||
*/
|
||||
int WARNING = 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* RSI预警类型
|
||||
*/
|
||||
public interface RSI_SCENE_TYPE {
|
||||
/**
|
||||
* 无效
|
||||
*/
|
||||
int INVALID = 0;
|
||||
/**
|
||||
* 限速信息(Speed Limit Warning)
|
||||
*/
|
||||
int SLW = 1;
|
||||
/**
|
||||
* 道路危险(Hazardous Location Warning)
|
||||
*/
|
||||
int HLW = 2;
|
||||
/**
|
||||
* 车内标牌(In-Vehicle Signage)
|
||||
*/
|
||||
int IVS = 3;
|
||||
/**
|
||||
* 前方拥堵(Traffic Jam Warning)
|
||||
*/
|
||||
int TJW = 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆和交通参与者的目标方位信息
|
||||
*/
|
||||
public interface VEH_TARGET_POSITION {
|
||||
/**
|
||||
* 同向正前方
|
||||
*/
|
||||
int AHEAD_IN_LANE = 0x11;
|
||||
/**
|
||||
* 同向邻道左前方
|
||||
*/
|
||||
int AHEAD_LEFT = 0x12;
|
||||
/**
|
||||
* 同向邻道右前方
|
||||
*/
|
||||
int AHEAD_RIGHT = 0x13;
|
||||
/**
|
||||
* 同向远道左前方
|
||||
*/
|
||||
int AHEAD_FAR_LEFT = 0x14;
|
||||
/**
|
||||
* 同向远道右前方
|
||||
*/
|
||||
int AHEAD_FAR_RIGHT = 0x15;
|
||||
/**
|
||||
* 同向正后方
|
||||
*/
|
||||
int BEHEAD_IN_LANE = 0x21;
|
||||
/**
|
||||
* 同向邻道左后方
|
||||
*/
|
||||
int BEHEAD_LEFT = 0x22;
|
||||
/**
|
||||
* 同向邻道右后方
|
||||
*/
|
||||
int BEHEAD_RIGHT = 0x23;
|
||||
/**
|
||||
* 同向远道左后方
|
||||
*/
|
||||
int BEHEAD_FAR_LEFT = 0x24;
|
||||
/**
|
||||
* 同向远道右后方
|
||||
*/
|
||||
int BEHEAD_FAR_RIGHT = 0x25;
|
||||
/**
|
||||
* 对向正前方
|
||||
*/
|
||||
int ONCOMING_IN_LANE = 0x31;
|
||||
/**
|
||||
* 对向邻道左前方
|
||||
*/
|
||||
int ONCOMING_LEFT = 0x32;
|
||||
/**
|
||||
* 对向邻道右前方
|
||||
*/
|
||||
int ONCOMING_RIGHT = 0x33;
|
||||
/**
|
||||
* 对向远道左前方
|
||||
*/
|
||||
int ONCOMING_FAR_LEFT = 0x34;
|
||||
/**
|
||||
* 对向远道右前方
|
||||
*/
|
||||
int ONCOMING_FAT_RIGHT = 0x35;
|
||||
/**
|
||||
* 路口左侧来车
|
||||
*/
|
||||
int INTERSECTION_LEFT = 0x46;
|
||||
/**
|
||||
* 路口右侧来车
|
||||
*/
|
||||
int INTERSECTION_RIGHT = 0x47;
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
int UNCLASSIFIED = 0x00;
|
||||
}
|
||||
|
||||
/**
|
||||
* 交通时间或标志的目标方位信息
|
||||
*/
|
||||
public interface RTI_TARGET_POSITION {
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
int UNKNOWN = 0x00;
|
||||
/**
|
||||
* 在事件中
|
||||
*/
|
||||
int LANE_INSID = 0x01;
|
||||
/**
|
||||
* 在事件左侧
|
||||
*/
|
||||
int LANE_LEFT = 0x02;
|
||||
/**
|
||||
* 在事件右侧
|
||||
*/
|
||||
int LANE_RIGHT = 0x03;
|
||||
/**
|
||||
* 在事件前方
|
||||
*/
|
||||
int LANE_AHEAD = 0x04;
|
||||
/**
|
||||
* 在事件后方
|
||||
*/
|
||||
int LANE_REAR = 0x05;
|
||||
/**
|
||||
* 距事件较远
|
||||
*/
|
||||
int FARAWAY = 0x06;
|
||||
/**
|
||||
* 不在同一平面
|
||||
*/
|
||||
int NOT_SOME_PLANE = 0x07;
|
||||
}
|
||||
|
||||
/**
|
||||
* 交通事件
|
||||
*/
|
||||
public interface RTE {
|
||||
/**
|
||||
* 车辆故障
|
||||
*/
|
||||
int RTI_TYPE_BREAKDOWN = 101;
|
||||
/**
|
||||
* 道路积水
|
||||
*/
|
||||
int RTI_TYPE_ROAD_WATER = 407;
|
||||
/**
|
||||
* 异常停车
|
||||
*/
|
||||
int RTI_TYPE_PARKING_VIOLATION = 412;
|
||||
/**
|
||||
* 施工占道
|
||||
*/
|
||||
int RTI_TYPE_CONSTRUCTION_RTE = 501;
|
||||
/**
|
||||
* 拥堵
|
||||
*/
|
||||
int RTI_TYPE_TJW = 707;
|
||||
/**
|
||||
* 超速行驶
|
||||
*/
|
||||
int RTI_TYPE_SPEEDING = 901;
|
||||
/**
|
||||
* 车辆逆行
|
||||
*/
|
||||
int RTI_TYPE_RETRIGRADE = 904;
|
||||
}
|
||||
|
||||
/**
|
||||
* 交通标牌
|
||||
*/
|
||||
public interface RTS {
|
||||
/**
|
||||
* 十字路口
|
||||
*/
|
||||
int RTI_TYPE_INTERSECTION = 1;
|
||||
/**
|
||||
* 急转弯
|
||||
*/
|
||||
int RTI_TYPE_SHAPR_TURNS = 2;
|
||||
/**
|
||||
* 桥梁
|
||||
*/
|
||||
int RTI_TYPE_BRIDGE = 8;
|
||||
/**
|
||||
* 行人
|
||||
*/
|
||||
int RTI_TYPE_PEDESTRIAN = 10;
|
||||
/**
|
||||
* 路滑
|
||||
*/
|
||||
int RTI_TYPE_SLIPPERY_ROAD = 17;
|
||||
/**
|
||||
* 隧道
|
||||
*/
|
||||
int RTI_TYPE_TUNNEL = 21;
|
||||
/**
|
||||
* 渡轮
|
||||
*/
|
||||
int RTI_TYPE_FERRY = 22;
|
||||
/**
|
||||
* 路面不平
|
||||
*/
|
||||
int RTI_TYPE_UNEVEN_ROAD = 24;
|
||||
/**
|
||||
* 非机动车
|
||||
*/
|
||||
int RTI_TYPE_NON_MOTOR_VEHICLE = 32;
|
||||
/**
|
||||
* 障碍
|
||||
*/
|
||||
int RTI_TYPE_OBSTACLE = 36;
|
||||
/**
|
||||
* 施工
|
||||
*/
|
||||
int RTI_TYPE_CONSTRUCTION = 38;
|
||||
/**
|
||||
* 注意合流
|
||||
*/
|
||||
int RTI_TYPE_ATTENTION_CONFLUENCE = 44;
|
||||
/**
|
||||
* 车队
|
||||
*/
|
||||
int RTI_TYPE_VEHICLE_QUEUE = 47;
|
||||
/**
|
||||
* 不通
|
||||
*/
|
||||
int RTI_TYPE_NO_PASSING = 51;
|
||||
/**
|
||||
* 禁止掉头
|
||||
*/
|
||||
int RTI_TYPE_NO_TURNING_AROUND = 75;
|
||||
/**
|
||||
* 禁止停车
|
||||
*/
|
||||
int RTI_TYPE_NO_STOPPING = 78;
|
||||
/**
|
||||
* 禁止鸣笛
|
||||
*/
|
||||
int RTI_TYPE_NO_TOOTING = 80;
|
||||
/**
|
||||
* 限速
|
||||
*/
|
||||
int RTI_TYPE_SPEED_LIMIT = 85;
|
||||
/**
|
||||
* 直行或右转
|
||||
*/
|
||||
int RTI_TYPE_GO_STRAIGHT_TURN_RIGHT = 100;
|
||||
/**
|
||||
* 人行横道
|
||||
*/
|
||||
int RTI_TYPE_PEDESTRIAN_CROSSING = 114;
|
||||
/**
|
||||
* 公交提醒
|
||||
*/
|
||||
int RTI_TYPE_BUS_WARNING = 123;
|
||||
/**
|
||||
* 右侧变窄/车道数减少
|
||||
*/
|
||||
int RTI_TYPE_NARROW_RIGHT = 163;
|
||||
/**
|
||||
* 加油站
|
||||
*/
|
||||
int RTI_TYPE_GAS_STATION = 201;
|
||||
/**
|
||||
* 学校
|
||||
*/
|
||||
int RTI_TYPE_SCHOOL = 242;
|
||||
/**
|
||||
* 事故
|
||||
*/
|
||||
int RTI_TYPE_ACCIDENT = 244;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user