[2.13.2] 合并EventTypeEnumNew,去掉obu默认关闭的开关

This commit is contained in:
lixiaopeng
2023-01-10 11:52:09 +08:00
parent d30ba10bff
commit 9cc44d9d51
25 changed files with 252 additions and 207 deletions

View File

@@ -6,7 +6,7 @@ import android.util.ArrayMap;
import com.elegant.network.utils.GsonUtil;
import com.mogo.eagle.core.data.R;
import com.mogo.eagle.core.data.enums.EventTypeEnum;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
import com.mogo.eagle.core.data.map.PoiWrapper;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
@@ -38,37 +38,37 @@ public class CloudPoiManager {
public void generateDefault() {
if (poiWrapper.isEmpty()) {
poiWrapper.put(EventTypeEnum.TRAFFIC_CHECK.getPoiType(), new PoiWrapper(EventTypeEnum.TRAFFIC_CHECK.getPoiType(),
poiWrapper.put(EventTypeEnumNew.TRAFFIC_CHECK.getPoiType(), new PoiWrapper(EventTypeEnumNew.TRAFFIC_CHECK.getPoiType(),
R.drawable.module_common_icon_map_marker_road_check2, R.drawable.module_common_icon_map_marker_road_check2_white, "交通检查"));
poiWrapper.put(EventTypeEnum.ROAD_CLOSED.getPoiType(), new PoiWrapper(EventTypeEnum.ROAD_CLOSED.getPoiType(),
poiWrapper.put(EventTypeEnumNew.ROAD_CLOSED.getPoiType(), new PoiWrapper(EventTypeEnumNew.ROAD_CLOSED.getPoiType(),
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(),
poiWrapper.put(EventTypeEnumNew.FOURS_ROAD_WORK.getPoiType(), new PoiWrapper(EventTypeEnumNew.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(),
poiWrapper.put(EventTypeEnumNew.AI_ROAD_WORK.getPoiType(), new PoiWrapper(EventTypeEnumNew.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(),
poiWrapper.put(EventTypeEnumNew.FOURS_BLOCK_UP.getPoiType(), new PoiWrapper(EventTypeEnumNew.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(),
poiWrapper.put(EventTypeEnumNew.FOURS_PONDING.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_PONDING.getPoiType(),
R.drawable.module_common_icon_map_marker_pondingl2, R.drawable.module_common_icon_map_marker_pondingl2_white, "积水"));
poiWrapper.put(EventTypeEnum.FOURS_FOG.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_FOG.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_FOG.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_FOG.getPoiType(),
R.drawable.module_common_ic_rc_dark_frog2, R.drawable.module_common_ic_rc_dark_frog2_white, "浓雾"));
poiWrapper.put(EventTypeEnum.FOURS_ICE.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ICE.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_ICE.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ICE.getPoiType(),
R.drawable.module_common_ic_rc_freeze2, R.drawable.module_common_ic_rc_freeze2_white, "结冰"));
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT.getPoiType(),
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "事故"));
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_01.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_01.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT_01.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT_01.getPoiType(),
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "重大事故"));
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_02.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_02.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT_02.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT_02.getPoiType(),
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "特大事故"));
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_03.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_03.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT_03.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT_03.getPoiType(),
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "较大事故"));
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_04.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_04.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT_04.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT_04.getPoiType(),
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "一般事故"));
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_05.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_05.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT_05.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT_05.getPoiType(),
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "轻微事故"));
poiWrapper.put(EventTypeEnum.FOURS_LIVING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_LIVING.getPoiType(),
poiWrapper.put(EventTypeEnumNew.FOURS_LIVING.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_LIVING.getPoiType(),
R.drawable.module_common_icon_map_marker_living, R.drawable.module_common_icon_map_marker_living_white, "实时路况"));
poiWrapper.put(EventTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(), new PoiWrapper(EventTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(),
poiWrapper.put(EventTypeEnumNew.ILLEGAL_PARK_LIVING.getPoiType(), new PoiWrapper(EventTypeEnumNew.ILLEGAL_PARK_LIVING.getPoiType(),
R.drawable.module_common_ic_rc_illegal_park, R.drawable.module_common_ic_rc_illegal_park_white, "违章停车"));
// 分享里用到的故障求助
poiWrapper.put("9999", new PoiWrapper("9999",

View File

@@ -112,6 +112,12 @@ enum class EventTypeEnumNew(
GHOST_PROBE("10024", "前方盲区行人预警", "前方盲区行人预警", R.drawable.icon_warning_v2x_pedestrian_crossing,
"前方盲区行人通行,请注意", "前方盲区即将有行人通过,请减速慢行"),
//接管
TAKE_OVER_EVENT(
"20000", "注意周围、立即接管", "注意周围、立即接管", R.drawable.icon_warning_take_over,
"注意周围、立即接管", "自动驾驶退出请立即接管"
),
// 前方静止or慢速车辆报警
ALERT_FRONT_CAR("99999"),
@@ -133,6 +139,15 @@ enum class EventTypeEnumNew(
// 违章停车
ALERT_ILLEGAL_PARK("99992"),
//TODO 这个确认值
TYPE_USECASE_OPTIMAL_LANE(
0x2B06.toString(),
"最优车道",
poiTypeSrcVr = R.drawable.v2x_icon_live_logo,
content = "最优车道",
tts = "最优车道"
),
//-------------obu v2n start ------------>
TYPE_USECASE_ID_FCW(
2000.toString(),
@@ -141,13 +156,13 @@ enum class EventTypeEnumNew(
content = "前车碰撞预警",
tts = "小心前车"
),
// TYPE_USECASE_ID_ICW(
// 1.toString(),
// "交叉路口碰撞预警",
// poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
// content = "交叉路口碰撞预警",
// tts = "注意交叉路口车辆"
// ),
TYPE_USECASE_ID_ICW(
2009.toString(),
"交叉路口碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
content = "交叉路口碰撞预警",
tts = "注意交叉路口车辆"
),
TYPE_USECASE_ID_LTA(
2001.toString(),
"左转辅助",
@@ -459,8 +474,9 @@ enum class EventTypeEnumNew(
tts = ""
),
TYPE_VIP_IDENTIFICATION("10022", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行", "已为您变灯,请优先通行"),
TYPE_VIP_IDENTIFICATION_PASS("10022", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行,已为您变为绿灯", "VIP车辆优先通行已为您变为绿灯"),
TYPE_VIP_IDENTIFICATION_EXTEND("10023", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行已为您延长绿灯", "VIP车辆优先通行已为您延长绿灯"),
TYPE_VIP_ERROR_IDENTIFICATION("10024", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "请求失败,", "请求失败,稍后重试"),
TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线");
@@ -712,7 +728,7 @@ enum class EventTypeEnumNew(
fun getMarker3DRes(poiType: String?): Int {
return when (poiType) {
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
FOURS_ACCIDENT.poiType -> R.raw.v2x_shigu
FOURS_ACCIDENT.poiType,FOURS_ACCIDENT_04.poiType -> R.raw.v2x_shigu
FOURS_LIVING.poiType -> R.raw.v2x_shishilukuang
FOURS_FOG.poiType -> R.raw.v2x_nongwu
TRAFFIC_CHECK.poiType -> R.raw.v2x_jiaotongjiancha
@@ -747,39 +763,59 @@ enum class EventTypeEnumNew(
return when (poiType) {
//交通检查
TRAFFIC_CHECK.poiType -> {
R.drawable.v_to_x_marker_2
R.drawable.v2x_icon_jiaotongjiancha_vr
}
//封路
ROAD_CLOSED.poiType -> {
R.drawable.v_to_x_marker_16
R.drawable.v2x_icon_fenglu_vr
}
//施工
FOURS_ROAD_WORK.poiType -> {
R.drawable.v_to_x_marker_11
R.drawable.icon_warning_v2x_road_construction
}
//AI施工
AI_ROAD_WORK.poiType -> {
R.drawable.v_to_x_marker_11
R.drawable.icon_warning_v2x_road_construction
}
//拥堵
FOURS_BLOCK_UP.poiType -> {
R.drawable.v_to_x_marker_5
R.drawable.icon_warning_v2x_congestion
}
//积水
FOURS_PONDING.poiType -> {
R.drawable.v_to_x_marker_6
R.drawable.v2x_icon_jishui_vr
}
//浓雾
FOURS_FOG.poiType -> {
R.drawable.v_to_x_marker_9
R.drawable.v2x_icon_nongwu_vr
}
//结冰
FOURS_ICE.poiType -> {
R.drawable.v_to_x_marker_8
R.drawable.v2x_icon_jiebing_vr
}
//事故
FOURS_ACCIDENT.poiType -> {
R.drawable.v_to_x_marker_7
R.drawable.v2x_icon_jiaotongshigu_vr
}
//重大事故
FOURS_ACCIDENT_01.poiType -> {
R.drawable.v2x_icon_jiaotongshigu_vr
}
//特大事故
FOURS_ACCIDENT_02.poiType -> {
R.drawable.v2x_icon_jiaotongshigu_vr
}
//较大事故
FOURS_ACCIDENT_03.poiType -> {
R.drawable.v2x_icon_jiaotongshigu_vr
}
//一般事故
FOURS_ACCIDENT_04.poiType -> {
R.drawable.v2x_icon_jiaotongshigu_vr
}
//轻微事故
FOURS_ACCIDENT_05.poiType -> {
R.drawable.v2x_icon_jiaotongshigu_vr
}
//事故
FOURS_LIVING.poiType -> {
@@ -801,16 +837,34 @@ enum class EventTypeEnumNew(
ALERT_CAR_TROUBLE_WARNING.poiType -> {
R.drawable.icon_car_red
}
//闯红灯预警
TYPE_USECASE_ID_IVP_RED.poiType -> {
R.drawable.icon_warning_v2x_traffic_lights_red
//VIP车辆优先通行已为您变为绿灯
TYPE_VIP_IDENTIFICATION_PASS.poiType -> {
R.drawable.icon_warning_v2x_vip_turn_light
}
//VIP车辆优先通行已为您延长绿灯
TYPE_VIP_IDENTIFICATION_EXTEND.poiType -> {
R.drawable.icon_warning_v2x_vip_turn_light
}
//VIP变灯请求失败
TYPE_VIP_ERROR_IDENTIFICATION.poiType -> {
R.drawable.icon_warning_v2x_vip_turn_light
}
//最优路线
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> {
R.drawable.icon_warning_v2x_optimal_route
}
//绿波通行
TYPE_USECASE_ID_IVP_GREEN.poiType -> {
R.drawable.icon_warning_v2x_traffic_lights_green
}
//鬼探头类型
GHOST_PROBE.poiType -> {
R.drawable.icon_warning_v2x_pedestrian_crossing
}
//接管
TAKE_OVER_EVENT.poiType -> {
R.drawable.icon_warning_take_over
}
//机动车
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType -> {
R.drawable.icon_warning_v2x_motorcycle_collision
@@ -868,7 +922,7 @@ enum class EventTypeEnumNew(
return when (poiType) {
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.poiTypeSrcVr
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.poiTypeSrcVr
// TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.poiTypeSrcVr
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.poiTypeSrcVr
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.poiTypeSrcVr
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.poiTypeSrcVr
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.poiTypeSrcVr
@@ -876,7 +930,8 @@ enum class EventTypeEnumNew(
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.poiTypeSrcVr
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.poiTypeSrcVr
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.poiTypeSrcVr
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.poiTypeSrcVr
TYPE_VIP_IDENTIFICATION_PASS.poiType -> TYPE_VIP_IDENTIFICATION_PASS.poiTypeSrcVr
TYPE_VIP_IDENTIFICATION_EXTEND.poiType -> TYPE_VIP_IDENTIFICATION_EXTEND.poiTypeSrcVr
TYPE_ERROR.poiType -> TYPE_ERROR.poiTypeSrcVr
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.poiTypeSrcVr
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeSrcVr
@@ -929,7 +984,7 @@ enum class EventTypeEnumNew(
return when (poiType) {
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.content
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.content
// TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.content
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.content
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.content
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.content
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.content
@@ -937,7 +992,8 @@ enum class EventTypeEnumNew(
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.content
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.content
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.content
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.content
TYPE_VIP_IDENTIFICATION_PASS.poiType -> TYPE_VIP_IDENTIFICATION_PASS.content
TYPE_VIP_IDENTIFICATION_EXTEND.poiType -> TYPE_VIP_IDENTIFICATION_EXTEND.content
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.content
TYPE_ERROR.poiType -> TYPE_ERROR.content
@@ -992,7 +1048,7 @@ enum class EventTypeEnumNew(
return when (poiType) {
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.tts
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.tts
// TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.tts
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.tts
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.tts
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.tts
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.tts
@@ -1000,7 +1056,8 @@ enum class EventTypeEnumNew(
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.tts
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.tts
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.tts
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.tts
TYPE_VIP_IDENTIFICATION_PASS.poiType -> TYPE_VIP_IDENTIFICATION_PASS.tts
TYPE_VIP_IDENTIFICATION_EXTEND.poiType -> TYPE_VIP_IDENTIFICATION_EXTEND.tts
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.tts
TYPE_ERROR.poiType -> TYPE_ERROR.tts

View File

@@ -29,20 +29,20 @@ class EventTypeHelper {
when {
direction.isLeft() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + "")
EventTypeEnumNew.getWarningContent(appId.toString() + ""),
EventTypeEnumNew.getWarningTts(appId.toString() + "")
)
}
direction.isRight() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + "")
EventTypeEnumNew.getWarningContent(appId.toString() + ""),
EventTypeEnumNew.getWarningTts(appId.toString() + "")
)
}
else -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
EventTypeEnumNew.getWarningContent(appId.toString()),
EventTypeEnumNew.getWarningTts(appId.toString())
)
}
}
@@ -56,8 +56,8 @@ class EventTypeHelper {
data: ((alert: String, tts: String) -> Unit)
) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + direction.desc),
EventTypeEnum.getWarningContent(appId.toString() + direction.desc)
EventTypeEnumNew.getWarningContent(appId.toString() + direction.desc),
EventTypeEnumNew.getWarningContent(appId.toString() + direction.desc)
)
}
@@ -65,8 +65,8 @@ class EventTypeHelper {
@BizConfig(V2V, "", BIZ_LTA)
fun getLTA(appId: Int, data: ((alert: String, tts: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
EventTypeEnumNew.getWarningContent(appId.toString()),
EventTypeEnumNew.getWarningTts(appId.toString())
)
}
@@ -78,8 +78,8 @@ class EventTypeHelper {
data: ((alert: String, tts: String) -> Unit)
) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + direction.desc),
EventTypeEnum.getWarningTts(appId.toString() + direction.desc)
EventTypeEnumNew.getWarningContent(appId.toString() + direction.desc),
EventTypeEnumNew.getWarningTts(appId.toString() + direction.desc)
)
}
@@ -93,22 +93,22 @@ class EventTypeHelper {
when {
direction.isLeft() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + ""),
EventTypeEnumNew.getWarningContent(appId.toString() + ""),
EventTypeEnumNew.getWarningTts(appId.toString() + ""),
true
)
}
direction.isRight() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + ""),
EventTypeEnumNew.getWarningContent(appId.toString() + ""),
EventTypeEnumNew.getWarningTts(appId.toString() + ""),
true
)
}
else -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString()),
EventTypeEnumNew.getWarningContent(appId.toString()),
EventTypeEnumNew.getWarningTts(appId.toString()),
false
)
}
@@ -119,9 +119,9 @@ class EventTypeHelper {
@BizConfig(V2N, "", BIZ_VRU)
fun getVRU(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt(),
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.tts,
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.content
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt(),
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.tts,
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.content
)
}
@@ -129,7 +129,7 @@ class EventTypeHelper {
@BizConfig(V2N, "", BIZ_VRU_RI)
fun getVRURI(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt(),
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt(),
"行人逆行预警",
"行人逆行预警"
)
@@ -139,18 +139,18 @@ class EventTypeHelper {
@BizConfig(V2N, "", BIZ_OPT_LINE)
fun getOptLine(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.poiType.toInt(),
EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.tts,
EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.content
EventTypeEnumNew.TYPE_USECASE_OPTIMAL_LANE.poiType.toInt(),
EventTypeEnumNew.TYPE_USECASE_OPTIMAL_LANE.tts,
EventTypeEnumNew.TYPE_USECASE_OPTIMAL_LANE.content
)
}
//前方道路拥堵预警
fun getTJW(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.FOURS_BLOCK_UP.poiType.toInt(),
EventTypeEnum.FOURS_BLOCK_UP.tts,
EventTypeEnum.FOURS_BLOCK_UP.content
EventTypeEnumNew.FOURS_BLOCK_UP.poiType.toInt(),
EventTypeEnumNew.FOURS_BLOCK_UP.tts,
EventTypeEnumNew.FOURS_BLOCK_UP.content
)
}
@@ -158,8 +158,8 @@ class EventTypeHelper {
@BizConfig(V2V, "", BIZ_EBW)
fun getEBW(appId: Int, data: ((tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
EventTypeEnumNew.getWarningContent(appId.toString()),
EventTypeEnumNew.getWarningTts(appId.toString())
)
}
@@ -167,8 +167,8 @@ class EventTypeHelper {
@BizConfig(V2V, "", BIZ_FCW)
fun getFCW(appId: Int, data: ((tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
EventTypeEnumNew.getWarningContent(appId.toString()),
EventTypeEnumNew.getWarningTts(appId.toString())
)
}
@@ -176,8 +176,8 @@ class EventTypeHelper {
@BizConfig(V2V, "", BIZ_DNPW)
fun getDNPW(appId: Int, data: ((tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
EventTypeEnumNew.getWarningContent(appId.toString()),
EventTypeEnumNew.getWarningTts(appId.toString())
)
}

View File

@@ -1,9 +1,7 @@
package com.mogo.eagle.core.data.map.entity;
import android.text.TextUtils;
import com.mogo.eagle.core.data.enums.EventTypeEnum;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
import java.io.Serializable;
import java.util.Objects;
@@ -57,12 +55,12 @@ public class V2XRoadEventEntity implements Serializable {
}
public String getTts(boolean haveLiveCar) {
if (EventTypeEnum.GHOST_PROBE.getPoiType().equals(poiType)) {
tts = EventTypeEnum.GHOST_PROBE.getTts();
if (EventTypeEnumNew.GHOST_PROBE.getPoiType().equals(poiType)) {
tts = EventTypeEnumNew.GHOST_PROBE.getTts();
return tts;
}
tts = "前方#" + (int) getDistance() + "米#";
tts += EventTypeEnum.getTts(getPoiType());
tts += EventTypeEnumNew.getTts(getPoiType());
if (haveLiveCar) {
tts += ",查看实况请说确定。";
setShowEventButton(true);
@@ -78,7 +76,7 @@ public class V2XRoadEventEntity implements Serializable {
*/
public String getTtsWithFeedback() {
tts = "检测到附近";
tts += EventTypeEnum.getTtsWithFeedback(getPoiType());
tts += EventTypeEnumNew.getTtsWithFeedback(getPoiType());
tts += ",确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。";
return tts;
}
@@ -100,7 +98,7 @@ public class V2XRoadEventEntity implements Serializable {
}
public String getAlarmContent() {
alarmContent = EventTypeEnum.getAlarmContent(getPoiType());
alarmContent = EventTypeEnumNew.getAlarmContent(getPoiType());
return alarmContent;
}