diff --git a/OCH/mogo-och-taxi/build.gradle b/OCH/mogo-och-taxi/build.gradle index 307d440922..92e09af680 100644 --- a/OCH/mogo-och-taxi/build.gradle +++ b/OCH/mogo-och-taxi/build.gradle @@ -61,6 +61,7 @@ dependencies { implementation rootProject.ext.dependencies.mogo_core_data implementation rootProject.ext.dependencies.mogo_core_function_call implementation rootProject.ext.dependencies.mogo_core_function_v2x + implementation rootProject.ext.dependencies.mogo_core_function_hmi }else { implementation project(":core:mogo-core-utils") implementation project(":foudations:mogo-commons") @@ -68,6 +69,7 @@ dependencies { implementation project(':core:mogo-core-data') implementation project(':core:mogo-core-function-call') implementation project(':core:function-impl:mogo-core-function-v2x') + implementation project(':core:function-impl:mogo-core-function-hmi') } } diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java index 4b9a4a4c80..15db97c799 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java @@ -35,9 +35,9 @@ import com.mogo.och.common.module.utils.NumberFormatUtil; import com.mogo.och.common.module.utils.OCHThreadPoolManager; import com.mogo.och.common.module.voice.VoiceNotice; import com.mogo.och.common.module.wigets.OCHCommitDialog; +import com.mogo.och.taxi.R; import com.mogo.och.taxi.constant.TaxiConst; import com.mogo.och.taxi.constant.TaxiOrderStatusEnum; -import com.mogo.och.taxi.R; import com.mogo.och.taxi.bean.OrderQueryRespBean; import com.mogo.och.taxi.bean.OrderQueryRouteInfoRespBean; import com.mogo.och.taxi.model.TaxiModel; diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index 21f3267877..c369574d37 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -16,9 +16,8 @@ import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtilsNew 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.eagle.core.utilcode.mogo.storage.SharedPrefsMgr -import com.mogo.module.common.drawer.TrafficMarkerDrawer -import com.mogo.module.common.enums.EventTypeEnumNew -import com.mogo.module.common.enums.V2iEventTypeEnum +import com.mogo.eagle.core.data.enums.EventTypeEnumNew +import com.mogo.eagle.core.data.enums.V2iEventTypeEnum import com.mogo.support.obu.MogoObuManager import com.mogo.support.obu.OnMogoObuListener import com.mogo.support.obu.constants.MogoObuComType @@ -171,7 +170,7 @@ class MogoPrivateObuNewManager private constructor() { // 更新数据,远车数据,之前要匹配uuid TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data)?.let { - TrafficMarkerDrawer.updateITrafficLocationInfo(it) + CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(it) } Log.d(TAG, data.toString()) @@ -337,7 +336,7 @@ class MogoPrivateObuNewManager private constructor() { ) // 更新数据 TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let { - TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) + CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it) } } // 删除 @@ -350,7 +349,7 @@ class MogoPrivateObuNewManager private constructor() { TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let { // 事件结束,还原车辆颜色 it.threatLevel = 0x01 - TrafficMarkerDrawer.updateITrafficInfo(it) + CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(it) } } } @@ -412,7 +411,7 @@ class MogoPrivateObuNewManager private constructor() { // } // 更新数据 TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)?.let { - TrafficMarkerDrawer.updateITrafficInfo(it) + CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(it) } } @@ -424,7 +423,7 @@ class MogoPrivateObuNewManager private constructor() { TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)?.let { // 事件结束,还原交通参与者颜色 it.threatLevel = 0x01 - TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) + CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it) } //TODO // CallerHmiManager.disableWarningV2X(ObuConstants.USE_CASE_ID.VRUCW.toString()) @@ -619,7 +618,7 @@ class MogoPrivateObuNewManager private constructor() { } //更新周边车辆进行预警颜色变换,车辆实时移动和变色 ,UUID不需要匹配了 TrafficDataConvertUtilsNew.cvxV2vThreatIndInfo2TrafficData(info)?.let { - TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) + CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it) } } // 删除 @@ -631,7 +630,7 @@ class MogoPrivateObuNewManager private constructor() { //更新周边车辆进行预警颜色变换,车辆实时移动和变色 TrafficDataConvertUtilsNew.cvxV2vThreatIndInfo2TrafficData(info)?.let { it.threatLevel = 0x01 - TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) + CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it) } } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt similarity index 96% rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnumNew.kt rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt index a666cbead3..634429710f 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnumNew.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt @@ -1,8 +1,8 @@ -package com.mogo.module.common.enums +package com.mogo.eagle.core.data.enums + +import com.mogo.eagle.core.data.R +import com.mogo.eagle.core.data.config.CloudPoiManager -import com.mogo.module.common.R -import com.mogo.module.common.utils.CloudPoiManager -import com.mogo.support.obu.constants.MogoObuConstants /** * OBU、V2N事件类型枚举类 @@ -133,42 +133,42 @@ enum class EventTypeEnumNew( ALERT_ILLEGAL_PARK("99992"), TYPE_USECASE_ID_EBW( - MogoObuConstants.V2X_WARNING_TYPE.EBW.toString(), + 6.toString(), "紧急制动预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_emergency_brake, content = "前车急刹车", tts = "前车急刹车" ), TYPE_USECASE_ID_FCW( - MogoObuConstants.V2X_WARNING_TYPE.FCW.toString(), + 0.toString(), "前向碰撞预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning, content = "前车碰撞预警", tts = "小心前车" ), TYPE_USECASE_ID_ICW( - MogoObuConstants.V2X_WARNING_TYPE.ICW.toString(), + 1.toString(), "交叉路口碰撞预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning, content = "交叉路口碰撞预警", tts = "注意交叉路口车辆" ), TYPE_USECASE_ID_AVW( - MogoObuConstants.V2X_WARNING_TYPE.AVW.toString(), + 7.toString(), "异常车辆提醒", poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle, content = "%s车异常", tts = "小心%s异常车辆" ), TYPE_USECASE_ID_BSW( - MogoObuConstants.V2X_WARNING_TYPE.BSW.toString(), + 3.toString(), "盲区预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_blind_area_collision, content = "%s后盲区预警", tts = "注意%s后车辆" ), TYPE_USECASE_ID_LCW( - MogoObuConstants.V2X_WARNING_TYPE.LCW.toString(), + 4.toString(), "变道预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking, content = "%s向变道预警", @@ -176,21 +176,21 @@ enum class EventTypeEnumNew( ),//注意左后车辆/注意右后车辆 TYPE_USECASE_ID_EVW( - MogoObuConstants.V2X_WARNING_TYPE.EVW.toString(), + 9.toString(), "紧急车辆提醒", poiTypeSrcVr = R.drawable.icon_warning_v2x_special_vehicle_access, content = "注意特种车辆通行", tts = "请避让特种车辆" ), TYPE_USECASE_ID_CLW( - MogoObuConstants.V2X_WARNING_TYPE.CLW.toString(), + 8.toString(), "车辆失控预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_vehicle_control, content = "前%s失控预警", tts = "小心%s失控车辆" ), TYPE_USECASE_ID_DNPW( - MogoObuConstants.V2X_WARNING_TYPE.DNPW.toString(), + 5.toString(), "逆向超车预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking, content = "逆向超车预警", @@ -234,7 +234,7 @@ enum class EventTypeEnumNew( tts = "注意摩托车" ),//摩托车碰撞预警 TYPE_USECASE_ID_LTA( - MogoObuConstants.V2X_WARNING_TYPE.LTA.toString(), + 2.toString(), "左转辅助", poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning, content = "左转碰撞预警", @@ -242,14 +242,14 @@ enum class EventTypeEnumNew( ), TYPE_USECASE_ID_IVS( - MogoObuConstants.RSI_SCENE_TYPE.IVS.toString(), + 3.toString(), "车内标牌", poiTypeSrcVr = R.drawable.icon_warning_v2x_road_construction, content = "车内标牌", tts = "" ), TYPE_USECASE_ID_TJW( //TODO - MogoObuConstants.RSI_SCENE_TYPE.TJW.toString(), + 4.toString(), "前方拥堵提醒", poiTypeSrcVr = R.drawable.icon_warning_v2x_congestion, content = "前方%d米道路拥堵", @@ -266,7 +266,7 @@ enum class EventTypeEnumNew( ), TYPE_USECASE_ID_HLW( - MogoObuConstants.RSI_SCENE_TYPE.SLW.toString(), + 1.toString(), "道路危险情况预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_road_dangerous, content = "道路危险情况预警", @@ -290,7 +290,7 @@ enum class EventTypeEnumNew( //6种智行杯的场景需添加 TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE( - MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE.toString(), + 904.toString(), "注意逆行车辆", poiTypeSrcVr = R.drawable.icon_warning_v2x_school, content = "注意逆行车辆", @@ -298,7 +298,7 @@ enum class EventTypeEnumNew( ), TYPE_USECASE_ID_SLW( - MogoObuConstants.RTE.RTI_TYPE_SPEEDING.toString(), + 901.toString(), "注意超速车辆", poiTypeSrcVr = R.drawable.icon_warning_v2x_over_speed, content = "注意超速车辆", @@ -306,7 +306,7 @@ enum class EventTypeEnumNew( ), TYPE_USECASE_ID_BREAKDOWN_WARNING( - MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN.toString(), + 101.toString(), "注意故障车辆", poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning, content = "注意故障车辆", @@ -314,7 +314,7 @@ enum class EventTypeEnumNew( ), TYPE_USECASE_ID_ROAD_PARKING( - MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION.toString(), + 412.toString(), "注意异常停车", poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking, content = "注意异常停车", @@ -380,7 +380,7 @@ enum class EventTypeEnumNew( ), TYPE_ERROR( - MogoObuConstants.RSI_SCENE_TYPE.INVALID.toString(), + 0.toString(), "未知/错误/异常", poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle, content = "", @@ -470,7 +470,7 @@ enum class EventTypeEnumNew( 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,AI_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 @@ -486,7 +486,7 @@ enum class EventTypeEnumNew( FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType -> R.drawable.bg_v2x_event_type_orange TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, - FOURS_ROAD_WORK.poiType,AI_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, @@ -503,7 +503,7 @@ enum class EventTypeEnumNew( fun isRoadEvent(poiType: String?): Boolean { return when (poiType) { TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, - FOURS_ROAD_WORK.poiType,AI_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, @@ -519,7 +519,7 @@ enum class EventTypeEnumNew( @JvmStatic fun isNeedRoadEventUgc(poiType: String?): Boolean { return when (poiType) { - ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,AI_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, diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/V2iEventTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/V2iEventTypeEnum.kt similarity index 92% rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/V2iEventTypeEnum.kt rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/V2iEventTypeEnum.kt index 6a883425cc..9fdb68174e 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/V2iEventTypeEnum.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/V2iEventTypeEnum.kt @@ -1,17 +1,15 @@ -package com.mogo.module.common.enums +package com.mogo.eagle.core.data.enums -import com.mogo.module.common.R -import com.mogo.module.common.utils.CloudPoiManager -import com.mogo.support.obu.constants.MogoObuConstants +import com.mogo.eagle.core.data.R /** * OBU、V2i事件类型枚举类 */ enum class V2iEventTypeEnum( - val poiType: String, val poiTypeStr: String = "", - val poiTypeStrVr: String = "", - val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo, - val content: String = "", val tts: String = "" + val poiType: String, val poiTypeStr: String = "", + val poiTypeStrVr: String = "", + val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo, + val content: String = "", val tts: String = "" ) { //施工 @@ -27,14 +25,14 @@ enum class V2iEventTypeEnum( ), TYPE_USECASE_ID_IVS( - MogoObuConstants.RSI_SCENE_TYPE.IVS.toString(), + 0x2B07.toString(), "车内标牌", poiTypeSrcVr = R.drawable.icon_warning_v2x_road_construction, content = "车内标牌", tts = "" ), TYPE_USECASE_ID_TJW( - MogoObuConstants.RSI_SCENE_TYPE.TJW.toString(), + 0x2B08.toString(), "前方拥堵提醒", poiTypeSrcVr = R.drawable.icon_warning_v2x_congestion, content = "前方%d米道路拥堵", @@ -51,7 +49,7 @@ enum class V2iEventTypeEnum( ), TYPE_USECASE_ID_HLW( - MogoObuConstants.RSI_SCENE_TYPE.SLW.toString(), + 0x2B04.toString(), "道路危险情况预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_road_dangerous, content = "道路危险情况预警", @@ -75,7 +73,7 @@ enum class V2iEventTypeEnum( //6种智行杯的场景需添加 TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE( - MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE.toString(), + 904.toString(), "注意逆行车辆", poiTypeSrcVr = R.drawable.icon_warning_v2x_school, content = "注意逆行车辆", @@ -83,7 +81,7 @@ enum class V2iEventTypeEnum( ), TYPE_USECASE_ID_SLW( - MogoObuConstants.RTE.RTI_TYPE_SPEEDING.toString(), + 901.toString(), "注意超速车辆", poiTypeSrcVr = R.drawable.icon_warning_v2x_over_speed, content = "注意超速车辆", @@ -91,7 +89,7 @@ enum class V2iEventTypeEnum( ), TYPE_USECASE_ID_BREAKDOWN_WARNING( - MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN.toString(), + 101.toString(), "注意故障车辆", poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning, content = "注意故障车辆", @@ -99,7 +97,7 @@ enum class V2iEventTypeEnum( ), TYPE_USECASE_ID_ROAD_PARKING( - MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION.toString(), + 412.toString(), "注意异常停车", poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking, content = "注意异常停车", @@ -165,7 +163,7 @@ enum class V2iEventTypeEnum( ), TYPE_ERROR( - MogoObuConstants.RSI_SCENE_TYPE.INVALID.toString(), + 0.toString(), "未知/错误/异常", poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle, content = "",