diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt index 4298b23cd2..cbc84fa420 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt @@ -466,7 +466,6 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb l3.location = V2XMarkerLocation().also { l4 -> l4.lat = this.roadwork?.center?.point?.lat ?: 0.0 l4.lon = this.roadwork?.center?.point?.lon ?: 0.0 - l4.angle = -1.0 } }) } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java index df4fac4f22..07506627d6 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java @@ -48,7 +48,7 @@ public class V2XAlarmServer { // 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告 for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) { // 0、道路事件必须有朝向,角度>=0; - boolean ignoreAngle = v2XRoadEventEntity.getLocation().getAngle() < 0; + boolean ignoreAngle = EventTypeEnum.AI_ROAD_WORK.getPoiType().equals(v2XRoadEventEntity.getPoiType()); if (v2XRoadEventEntity.getLocation().getAngle() >= 0 || ignoreAngle) { // 计算车辆距离指定气泡的距离 MarkerLocation eventLocation = v2XRoadEventEntity.getLocation(); diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt b/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt index 49f2fa1eaa..245956ad78 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt @@ -32,6 +32,12 @@ enum class EventTypeEnum( "前方施工", "道路施工" ), + //施工-AI云下发 + AI_ROAD_WORK( + "100061", "道路施工", "前方施工", R.drawable.icon_warning_v2x_road_construction, + "前方施工", "道路施工" + ), + //拥堵 FOURS_BLOCK_UP( "10007", "道路拥堵", "前方拥堵", R.drawable.icon_warning_v2x_congestion, @@ -368,6 +374,7 @@ enum class EventTypeEnum( TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStr ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStr FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr + AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeStr FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr @@ -389,6 +396,7 @@ enum class EventTypeEnum( TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStrVr ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStrVr FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr + AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeStrVr FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr @@ -410,6 +418,7 @@ enum class EventTypeEnum( TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeSrcVr ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeSrcVr FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr + AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeSrcVr FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr @@ -431,7 +440,7 @@ enum class EventTypeEnum( fun getPoiTypeBg(poiType: String, isVrMode: Boolean): Int { return when (poiType) { FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType-> if (isVrMode) R.drawable.bg_v2x_event_type_orange_vr else R.drawable.bg_v2x_event_type_orange - TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType, + TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,AI_ROAD_WORK.poiType, FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read @@ -447,7 +456,7 @@ enum class EventTypeEnum( FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType -> R.drawable.bg_v2x_event_type_orange TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, - FOURS_ROAD_WORK.poiType, FOURS_PONDING.poiType, + FOURS_ROAD_WORK.poiType,AI_ROAD_WORK.poiType, FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType, @@ -464,12 +473,12 @@ enum class EventTypeEnum( fun isRoadEvent(poiType: String?): Boolean { return when (poiType) { TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, - FOURS_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType, + FOURS_ROAD_WORK.poiType,AI_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType, FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, - FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType -> true + FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType, AI_ROAD_WORK.poiType -> true else -> false } } @@ -480,7 +489,7 @@ enum class EventTypeEnum( @JvmStatic fun isNeedRoadEventUgc(poiType: String?): Boolean { return when (poiType) { - ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType, + ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,AI_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType, FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, @@ -496,6 +505,7 @@ enum class EventTypeEnum( TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.tts ROAD_CLOSED.poiType -> ROAD_CLOSED.tts FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts + AI_ROAD_WORK.poiType -> AI_ROAD_WORK.tts FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.tts FOURS_PONDING.poiType -> FOURS_PONDING.tts FOURS_FOG.poiType -> FOURS_FOG.tts @@ -512,6 +522,7 @@ enum class EventTypeEnum( TRAFFIC_CHECK.poiType -> "交通检查" ROAD_CLOSED.poiType -> "封路" FOURS_ROAD_WORK.poiType -> "施工" + AI_ROAD_WORK.poiType -> "施工" FOURS_BLOCK_UP.poiType -> "道路拥堵" FOURS_PONDING.poiType -> "道路积水" FOURS_FOG.poiType -> "出现浓雾" @@ -528,6 +539,7 @@ enum class EventTypeEnum( TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.content ROAD_CLOSED.poiType -> ROAD_CLOSED.content FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content + AI_ROAD_WORK.poiType -> AI_ROAD_WORK.content FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.content FOURS_PONDING.poiType -> FOURS_PONDING.content FOURS_FOG.poiType -> FOURS_FOG.content @@ -547,6 +559,7 @@ enum class EventTypeEnum( R.drawable.mogo_image_jiaotongjiancha_small ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_small FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_small + AI_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_small FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_small FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_small FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_small @@ -564,6 +577,7 @@ enum class EventTypeEnum( TRAFFIC_CHECK.poiType -> R.drawable.mogo_image_jiaotongjiancha_nor ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_nor FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_nor + AI_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_nor FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_nor FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_nor FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_nor @@ -586,6 +600,7 @@ enum class EventTypeEnum( FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故" FOURS_BLOCK_UP.poiType -> "拥堵" FOURS_ROAD_WORK.poiType -> "施工" + AI_ROAD_WORK.poiType -> "施工" FOURS_PONDING.poiType -> "道路积水" else -> "实时路况" } @@ -600,6 +615,7 @@ enum class EventTypeEnum( FOURS_FOG.poiType -> R.raw.v2x_nongwu TRAFFIC_CHECK.poiType -> R.raw.v2x_jiaotongjiancha FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong + AI_ROAD_WORK.poiType -> R.raw.v2x_daolushigong FOURS_ICE.poiType -> R.raw.v2x_daolujiebing FOURS_PONDING.poiType -> R.raw.v2x_daolujishui GHOST_PROBE.poiType -> R.raw.v2x_guzhangqiuzhu @@ -618,6 +634,7 @@ enum class EventTypeEnum( FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故" FOURS_BLOCK_UP.poiType -> "拥堵" FOURS_ROAD_WORK.poiType -> "施工" + AI_ROAD_WORK.poiType -> "施工" FOURS_PONDING.poiType -> "道路积水" else -> "实时路况" } @@ -638,6 +655,10 @@ enum class EventTypeEnum( FOURS_ROAD_WORK.poiType -> { R.drawable.v_to_x_marker_11 } + //AI施工 + AI_ROAD_WORK.poiType -> { + R.drawable.v_to_x_marker_11 + } //拥堵 FOURS_BLOCK_UP.poiType -> { R.drawable.v_to_x_marker_5 @@ -760,6 +781,7 @@ enum class EventTypeEnum( TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.content TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.content FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content + AI_ROAD_WORK.poiType -> AI_ROAD_WORK.content TYPE_ERROR.poiType -> TYPE_ERROR.content TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.content GHOST_PROBE.poiType -> GHOST_PROBE.content @@ -802,6 +824,7 @@ enum class EventTypeEnum( TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.tts TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.tts FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts + AI_ROAD_WORK.poiType -> AI_ROAD_WORK.tts TYPE_ERROR.poiType -> TYPE_ERROR.tts TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.tts GHOST_PROBE.poiType -> GHOST_PROBE.tts diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java index 3923d87bbe..c065a00369 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java @@ -44,6 +44,8 @@ public class CloudPoiManager { R.drawable.module_common_icon_map_marker_road_block_off2, R.drawable.module_common_icon_map_marker_road_block_off2_white, "封路")); poiWrapper.put(EventTypeEnum.FOURS_ROAD_WORK.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ROAD_WORK.getPoiType(), R.drawable.module_common_icon_map_marker_road_work2, R.drawable.module_common_icon_map_marker_road_work2_white, "施工")); + poiWrapper.put(EventTypeEnum.AI_ROAD_WORK.getPoiType(), new PoiWrapper(EventTypeEnum.AI_ROAD_WORK.getPoiType(), + R.drawable.module_common_icon_map_marker_road_work2, R.drawable.module_common_icon_map_marker_road_work2_white, "施工")); poiWrapper.put(EventTypeEnum.FOURS_BLOCK_UP.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_BLOCK_UP.getPoiType(), R.drawable.module_common_icon_map_marker_road_block_up2, R.drawable.module_common_icon_map_marker_road_block_up2_white, "拥堵")); poiWrapper.put(EventTypeEnum.FOURS_PONDING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_PONDING.getPoiType(),