删除无用的资源
This commit is contained in:
@@ -18,7 +18,7 @@ import com.mogo.module.common.entity.MarkerNoveltyInfo;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShareMusic;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -90,7 +90,7 @@ class MarkerDrawer {
|
||||
Object bindObj = markerShowEntity.getBindObj();
|
||||
if (bindObj instanceof MarkerExploreWay && ((MarkerExploreWay) bindObj).getPoiType() != null) {
|
||||
String poiType = ((MarkerExploreWay) bindObj).getPoiType();
|
||||
options.icon3DRes(SceneTypeEnum.getMarker3DRes(poiType));
|
||||
options.icon3DRes(EventTypeEnum.getMarker3DRes(poiType));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.mogo.module.common.entity;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@@ -15,7 +15,7 @@ public class MarkerExploreWay implements Serializable {
|
||||
private String infoId;
|
||||
private String type;//卡片类型,
|
||||
/**
|
||||
* @see SceneTypeEnum
|
||||
* @see EventTypeEnum
|
||||
*/
|
||||
private String poiType;
|
||||
private String sn;
|
||||
@@ -156,7 +156,7 @@ public class MarkerExploreWay implements Serializable {
|
||||
|
||||
public String getPoiType() {
|
||||
if (TextUtils.isEmpty(poiType)) {
|
||||
return SceneTypeEnum.FOURS_BLOCK_UP.getPoiType();
|
||||
return EventTypeEnum.FOURS_BLOCK_UP.getPoiType();
|
||||
}
|
||||
return poiType;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public class MarkerNoveltyInfo {
|
||||
private String sn;
|
||||
private MarkerLocation location;
|
||||
/**
|
||||
* @see MarkerPoiTypeEnum
|
||||
* @see com.mogo.module.common.enums.EventTypeEnum
|
||||
*/
|
||||
private String poiType;
|
||||
private ContentData contentData;
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020-01-1514:47
|
||||
* desc : 车机启动状态
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface MarkerPoiTypeEnum {
|
||||
//加油站
|
||||
String GAS_STATION = "10001";
|
||||
//交通检查
|
||||
String TRAFFIC_CHECK = "10002";
|
||||
//封路
|
||||
String ROAD_CLOSED = "10003";
|
||||
//商场打折
|
||||
String SHOP_DISCOUNT = "10004";
|
||||
//4S店
|
||||
String FOURS_4S = "10005";
|
||||
//施工
|
||||
String FOURS_ROAD_WORK = "10006";
|
||||
//拥堵
|
||||
String FOURS_BLOCK_UP = "10007";
|
||||
//积水
|
||||
String FOURS_PONDING = "10008";
|
||||
//超市打折
|
||||
String FOURS_SHOP_FREE = "10009";
|
||||
//浓雾
|
||||
String FOURS_FOG = "10010";
|
||||
//结冰
|
||||
String FOURS_ICE = "10011";
|
||||
//停车场
|
||||
String FOURS_PARKING = "10012";
|
||||
//事故
|
||||
String FOURS_ACCIDENT = "10013";
|
||||
//重大事故
|
||||
String FOURS_ACCIDENT_01 = "1001301";
|
||||
//特大事故
|
||||
String FOURS_ACCIDENT_02 = "1001302";
|
||||
//较大事故
|
||||
String FOURS_ACCIDENT_03 = "1001303";
|
||||
//一般事故
|
||||
String FOURS_ACCIDENT_04 = "1001304";
|
||||
//轻微事故
|
||||
String FOURS_ACCIDENT_05 = "1001305";
|
||||
//身边
|
||||
String FOURS_NEALY = "10014";
|
||||
//实时路况
|
||||
String FOURS_LIVING = "10015";
|
||||
//违章停车
|
||||
String ILLEGAL_PARK_LIVING = "10016";
|
||||
//路面湿滑
|
||||
String ROAD_SLIPPERY = "10021";
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/3/31 4:53 PM
|
||||
* desc : V2X 道路事件类型
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface V2XPoiTypeEnum extends MarkerPoiTypeEnum {
|
||||
// 前方静止or慢速车辆报警
|
||||
String ALERT_FRONT_CAR = "99999";
|
||||
// 限行管理
|
||||
String ALERT_TRAFFIC_CONTROL = "99998";
|
||||
// 红绿灯事件、是建议以多少速度驶过
|
||||
String ALERT_TRAFFIC_LIGHT_SUGGEST = "99997";
|
||||
// 红绿灯事件、一种是绿灯不足3秒
|
||||
String ALERT_TRAFFIC_LIGHT_WARNING = "99996";
|
||||
// 故障车辆
|
||||
int ALERT_CAR_TROUBLE_WARNING = 20007;
|
||||
// 疲劳驾驶
|
||||
String ALERT_FATIGUE_DRIVING = "99993";
|
||||
// 违章停车
|
||||
String ALERT_ILLEGAL_PARK = "99992";
|
||||
|
||||
// TODO 这里目前是演示DEMO会用到,想着是打算商用,先这么处理的
|
||||
// 取快递
|
||||
String ALERT_TRAFFIC_EXPRESS = "99995";
|
||||
// 顺风车
|
||||
String ALERT_TRAFFIC_TAXI = "99994";
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.mogo.module.common.entity;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
@@ -16,7 +16,7 @@ import java.util.Objects;
|
||||
*/
|
||||
public class V2XRoadEventEntity implements Serializable {
|
||||
/**
|
||||
* @see MarkerPoiTypeEnum
|
||||
* @see EventTypeEnum
|
||||
*/
|
||||
// 事件类型
|
||||
private String poiType;
|
||||
@@ -59,7 +59,7 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
|
||||
public String getTts(boolean haveLiveCar) {
|
||||
tts = "前方#" + (int) getDistance() + "米#";
|
||||
tts += SceneTypeEnum.getTts(getPoiType());
|
||||
tts += EventTypeEnum.getTts(getPoiType());
|
||||
if (haveLiveCar) {
|
||||
tts += ",查看实况请说确定。";
|
||||
setShowEventButton(true);
|
||||
@@ -75,7 +75,7 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
*/
|
||||
public String getTtsWithFeedback() {
|
||||
tts = "检测到附近";
|
||||
tts += SceneTypeEnum.getTtsWithFeedback(getPoiType());
|
||||
tts += EventTypeEnum.getTtsWithFeedback(getPoiType());
|
||||
tts += ",确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。";
|
||||
return tts;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
}
|
||||
|
||||
public String getAlarmContent() {
|
||||
alarmContent = SceneTypeEnum.getAlarmContent(getPoiType());
|
||||
alarmContent = EventTypeEnum.getAlarmContent(getPoiType());
|
||||
return alarmContent;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,852 @@
|
||||
package com.mogo.module.common.enums
|
||||
|
||||
import com.mogo.module.common.R
|
||||
import com.mogo.module.common.utils.CloudPoiManager
|
||||
import com.mogo.module.common.utils.Const.*
|
||||
import com.zhidao.support.obu.constants.ObuConstants
|
||||
|
||||
/**
|
||||
* OBU、V2N事件类型枚举类
|
||||
*/
|
||||
enum class EventTypeEnum(
|
||||
val poiType: String, val poiTypeStr: String = "",
|
||||
val poiTypeStrVr: String = "",
|
||||
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo,
|
||||
val content: String = "", val tts: String = ""
|
||||
) {
|
||||
//加油站
|
||||
GAS_STATION("10001", "加油站", content = "加油站附近", tts = "加油站"),
|
||||
|
||||
//交通检查
|
||||
TRAFFIC_CHECK("10002", "交通检查", "前方交通检查",
|
||||
R.drawable.v2x_icon_jiaotongjiancha_vr, "前方交通检查", "交通检查"),
|
||||
|
||||
//封路
|
||||
ROAD_CLOSED("10003", "封路", "前方封路", R.drawable.v2x_icon_fenglu_vr,
|
||||
"前方封路", "道路封路"),
|
||||
|
||||
//商场打折
|
||||
SHOP_DISCOUNT("10004", ""),
|
||||
|
||||
//4S店
|
||||
FOURS_4S("10005", ""),
|
||||
|
||||
//施工
|
||||
FOURS_ROAD_WORK("10006", "道路施工", "前方施工", R.drawable.v2x_icon_daolushigong_vr,
|
||||
"前方施工", "道路施工"),
|
||||
|
||||
//拥堵
|
||||
FOURS_BLOCK_UP("10007", "道路拥堵", "前方拥堵", R.drawable.v2x_icon_yongdu_vr,
|
||||
"前方道路拥堵", "道路拥堵"),
|
||||
|
||||
//积水
|
||||
FOURS_PONDING("10008", "道路积水", "前方道路积水", R.drawable.v2x_icon_jishui_vr,
|
||||
"前方道路积水", "道路积水"),
|
||||
|
||||
//超市打折
|
||||
FOURS_SHOP_FREE("10009", ""),
|
||||
|
||||
//浓雾
|
||||
FOURS_FOG("10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr,
|
||||
"前方出现浓雾", "出现浓雾"),
|
||||
|
||||
//结冰
|
||||
FOURS_ICE("10011", "路面结冰", content = "前方路面结冰", tts = "路面结冰"),
|
||||
|
||||
//停车场
|
||||
FOURS_PARKING("10012", "停车场", content = "停车场附近", tts = "停车场"),
|
||||
|
||||
//事故
|
||||
FOURS_ACCIDENT("10013", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//重大事故
|
||||
FOURS_ACCIDENT_01("1001301", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//特大事故
|
||||
FOURS_ACCIDENT_02("1001302", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//较大事故
|
||||
FOURS_ACCIDENT_03("1001303", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//一般事故
|
||||
FOURS_ACCIDENT_04("1001304", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//轻微事故
|
||||
FOURS_ACCIDENT_05("1001305", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//身边
|
||||
FOURS_NEALY("10014", "身边事件"),
|
||||
|
||||
//实时路况
|
||||
FOURS_LIVING("10015", "实时路况"),
|
||||
|
||||
//违章停车
|
||||
ILLEGAL_PARK_LIVING("10016"),
|
||||
|
||||
//路面湿滑
|
||||
ROAD_SLIPPERY("10021"),
|
||||
|
||||
// 前方静止or慢速车辆报警
|
||||
ALERT_FRONT_CAR("99999"),
|
||||
|
||||
// 限行管理
|
||||
ALERT_TRAFFIC_CONTROL("99998"),
|
||||
|
||||
// 红绿灯事件、是建议以多少速度驶过
|
||||
ALERT_TRAFFIC_LIGHT_SUGGEST("99997"),
|
||||
|
||||
// 红绿灯事件、一种是绿灯不足3秒
|
||||
ALERT_TRAFFIC_LIGHT_WARNING("99996"),
|
||||
|
||||
// 故障车辆
|
||||
ALERT_CAR_TROUBLE_WARNING("20007"),
|
||||
|
||||
// 疲劳驾驶
|
||||
ALERT_FATIGUE_DRIVING("99993"),
|
||||
|
||||
// 违章停车
|
||||
ALERT_ILLEGAL_PARK("99992"),
|
||||
|
||||
// TODO 这里目前是演示DEMO会用到,想着是打算商用,先这么处理的
|
||||
// 取快递
|
||||
ALERT_TRAFFIC_EXPRESS("99995"),
|
||||
|
||||
// 顺风车
|
||||
ALERT_TRAFFIC_TAXI("99994"),
|
||||
|
||||
TYPE_USECASE_ID_EBW(
|
||||
ObuConstants.USE_CASE_ID.EBW.toString(),
|
||||
"紧急制动预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_emergency_brake,
|
||||
content="前车急刹车",
|
||||
tts = "前车急刹车"
|
||||
),
|
||||
TYPE_USECASE_ID_FCW(
|
||||
ObuConstants.USE_CASE_ID.FCW.toString(),
|
||||
"前向碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="前车碰撞预警",
|
||||
tts="小心前车"
|
||||
),
|
||||
TYPE_USECASE_ID_ICW(
|
||||
ObuConstants.USE_CASE_ID.ICW.toString(),
|
||||
"交叉路口碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="交叉路口碰撞预警",
|
||||
tts="注意交叉路口车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_CLW(
|
||||
ObuConstants.USE_CASE_ID.CLW.toString(),
|
||||
"车辆失控预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_vehicle_control,
|
||||
content="前车失控预警",
|
||||
tts="小心前方失控车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_DNPW(
|
||||
ObuConstants.USE_CASE_ID.DNPW.toString(),
|
||||
"逆向超车预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_reverse_overtaking,
|
||||
content="逆向超车预警",
|
||||
tts="注意对向来车"
|
||||
),
|
||||
TYPE_USECASE_ID_AVW(
|
||||
ObuConstants.USE_CASE_ID.AVW.toString(),
|
||||
"异常车辆提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content="前车异常",
|
||||
tts="小心前方异常车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_BSW(
|
||||
ObuConstants.USE_CASE_ID.BSW.toString(),
|
||||
"盲区预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_blind_area_collision,
|
||||
content="%s后盲区预警",
|
||||
tts="注意%s后车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_LCW(
|
||||
ObuConstants.USE_CASE_ID.LCW.toString(),
|
||||
"变道预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_reverse_overtaking,
|
||||
content="%s向变道预警",
|
||||
tts="注意%s后车辆"
|
||||
),//注意左后车辆/注意右后车辆
|
||||
TYPE_USECASE_ID_EVW(
|
||||
ObuConstants.USE_CASE_ID.EVW.toString(),
|
||||
"紧急车辆提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_special_vehicle_access,
|
||||
content="请避让特种车辆",
|
||||
tts="后方特种车辆请避让"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
0X2B0201.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content="行人碰撞预警",
|
||||
tts="行人碰撞预警"
|
||||
),//行人/摩托车碰撞预警
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE(
|
||||
0X2B0202.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_motorcycle_collision,
|
||||
content="摩托车碰撞预警",
|
||||
tts="摩托车碰撞预警"
|
||||
),//摩托车碰撞预警
|
||||
TYPE_USECASE_ID_SLW(
|
||||
ObuConstants.USE_CASE_ID.SLW.toString(),
|
||||
"限速预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_over_speed,
|
||||
content="已超速",
|
||||
tts=""
|
||||
),
|
||||
TYPE_USECASE_ID_LTA(
|
||||
ObuConstants.USE_CASE_ID.LTA.toString(),
|
||||
"左转辅助",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="左转碰撞预警",
|
||||
tts="注意%s后车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_HLW(
|
||||
ObuConstants.USE_CASE_ID.HLW.toString(),
|
||||
"道路危险情况预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_road_dangerous,
|
||||
content="道路危险情况预警",
|
||||
tts="前方路况危险,小心行驶"
|
||||
),//(如果能给出具体的类别,则播报具体危险类别)
|
||||
TYPE_USECASE_ID_IVS(
|
||||
ObuConstants.USE_CASE_ID.IVS.toString(),
|
||||
"车内标牌",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_road_construction,
|
||||
content="前方施工",
|
||||
tts=""
|
||||
),
|
||||
TYPE_USECASE_ID_TJW(
|
||||
ObuConstants.USE_CASE_ID.TJW.toString(),
|
||||
"前方拥堵提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_congestion,
|
||||
content="前方道路拥堵",
|
||||
tts="前方%d米道路拥堵,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_IVP(
|
||||
ObuConstants.USE_CASE_ID.IVP.toString(),
|
||||
"闯红灯预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_traffic_lights_red,
|
||||
content="路口红灯,禁止通行",
|
||||
tts="路口红灯,禁止通行"
|
||||
),
|
||||
TYPE_USECASE_ID_IVP_GREEN(
|
||||
0x2B091.toString(),
|
||||
"绿波通行",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_traffic_lights_green,
|
||||
content="绿波通行 %s km/h",
|
||||
tts="前方路口建议车速 %s 公里每小时"
|
||||
),
|
||||
TYPE_USECASE_ID_COC(
|
||||
ObuConstants.USE_CASE_ID.COC.toString(),
|
||||
"预留",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content="路况预警",
|
||||
tts="路况预警"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR(
|
||||
0x2C01.toString(),
|
||||
"前方有轨电车提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_tramcar,
|
||||
content="前方有轨电车提醒",
|
||||
tts="前方有轨电车经过,请注意行驶安全"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP(
|
||||
0x2C02.toString(),
|
||||
"前方左转急弯",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_turn_left_sharp,
|
||||
content="前方左转急弯",
|
||||
tts="前方路口左转急弯,请减速慢行",
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP(
|
||||
0x2C03.toString(),
|
||||
"前方右转急弯",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_turn_right_sharp,
|
||||
content="前方右转急弯",
|
||||
tts="前方路口右转急弯,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING(
|
||||
0x2C04.toString(),
|
||||
"人行横道",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content="前方人行横道",
|
||||
tts="前方人行横道"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL(
|
||||
0x2C05.toString(),
|
||||
"学校",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_school,
|
||||
content="前方学校,减速慢行",
|
||||
tts="前方人行横道,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING(
|
||||
0x2C06.toString(),
|
||||
"事故易发路段",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="当前路段事故多发",
|
||||
tts="当前路段事故多发,请谨慎行驶"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG(
|
||||
0x2C07.toString(),
|
||||
"环岛行驶",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_roundaboutpng,
|
||||
content="前方驶入环岛",
|
||||
tts="前方驶入环岛,请谨慎行驶"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION(
|
||||
0x2C08.toString(),
|
||||
"驾校考试路段",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_test_section,
|
||||
content="前方考试路段",
|
||||
tts="前方考试路段,减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE(
|
||||
0x2C09.toString(),
|
||||
"驼峰桥",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_hump_bridge,
|
||||
content="前方驼峰桥",
|
||||
tts="即将驶入桥梁,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING(
|
||||
0x2C10.toString(),
|
||||
"禁止停车",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_no_parking,
|
||||
content="当前路段禁止停车",
|
||||
tts="当前路段,禁止停车"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY(
|
||||
0x2C11.toString(),
|
||||
"减速慢行",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_give_way,
|
||||
content="有车出入,减速慢行",
|
||||
tts="有车出入,减速慢行"
|
||||
),
|
||||
TYPE_ERROR(
|
||||
ObuConstants.USE_CASE_ID.ERROR.toString(),
|
||||
"未知/错误/异常",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content="",
|
||||
tts=""
|
||||
);
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getPoiTypeStr(poiType: String): String {
|
||||
// 先获取网络配置的poi对应的名称
|
||||
CloudPoiManager.getInstance().getWrapperByPoiType(poiType)?.let {
|
||||
return it.title
|
||||
}
|
||||
// 如果获取不到,那么就用本地默认的
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeStrVr(poiType: String): String {
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStrVr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStrVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStrVr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStrVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStrVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStrVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStrVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStrVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStrVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStrVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStrVr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeSrcVr(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeSrcVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeSrcVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeSrcVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeSrcVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeSrcVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeSrcVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeSrcVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeSrcVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeSrcVr
|
||||
else -> R.drawable.v2x_icon_live_logo
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取道路事件的背景色
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getPoiTypeBg(poiType: String, isVrMode: Boolean): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType -> R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.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,
|
||||
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
|
||||
else -> {
|
||||
if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeBgForShareItem(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType ->
|
||||
R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.poiType ->
|
||||
R.drawable.bg_v2x_event_type_orange
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_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 ->
|
||||
R.drawable.bg_v2x_event_type_read
|
||||
else -> R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是道路预警事件
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isRoadEvent(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_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 -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否需要UGC预警
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isNeedRoadEventUgc(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
ROAD_CLOSED.poiType, FOURS_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,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 UGC 问答使用的 Title 和 TTS 以及展示图表
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getUgcTitleStr(poiType: String?): Array<Any?>? {
|
||||
val str = arrayOfNulls<Any>(5)
|
||||
when (poiType) {
|
||||
ROAD_CLOSED.poiType -> {
|
||||
str[0] = "你刚经过 #### \n封路吗?"
|
||||
str[1] = "你刚路过的路段封路吗?您可以直接对我说封路、或者不封路。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_fenglu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ROAD_WORK.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有道路施工吗?"
|
||||
str[1] = "你刚路过的路段道路施工吗?您可以直接对我说有施工、或者没有施工。"
|
||||
str[2] = R.drawable.bg_v2x_cancel_help
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_BLOCK_UP.poiType -> {
|
||||
str[0] = "你刚路过 #### \n堵不堵?"
|
||||
str[1] = "你刚路过的路段堵不堵?您可以直接对我说拥赌、或者不堵。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_yongdu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有事故发生吗?"
|
||||
str[1] = "你刚路过的路段有交通事故吗?您可以直接对我说有事故、或者没有事故。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_shigu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP
|
||||
}
|
||||
else -> return null
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.tts
|
||||
GAS_STATION.poiType -> GAS_STATION.tts
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.tts
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.tts
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.tts
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.tts
|
||||
FOURS_FOG.poiType -> FOURS_FOG.tts
|
||||
FOURS_ICE.poiType -> FOURS_ICE.tts
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.tts
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTtsWithFeedback(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "有停车场"
|
||||
GAS_STATION.poiType -> "有加油站"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_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 -> "交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAlarmContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.content
|
||||
GAS_STATION.poiType -> GAS_STATION.content
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.content
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.content
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.content
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.content
|
||||
FOURS_FOG.poiType -> FOURS_FOG.content
|
||||
FOURS_ICE.poiType -> FOURS_ICE.content
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
FOURS_ACCIDENT.content
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeSmallRes(type: String): Int {
|
||||
return when (type) {
|
||||
TRAFFIC_CHECK.poiType ->
|
||||
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
|
||||
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
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_small
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_accident_small
|
||||
else -> R.drawable.mogo_image_shishilukuang_small
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeRes(type: String): Int {
|
||||
return when (type) {
|
||||
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
|
||||
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
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_nor
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_jiaotongshigu_nor
|
||||
else -> R.drawable.mogo_image_shishlukuang_nor
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeName(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getMarker3DRes(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
|
||||
FOURS_ACCIDENT.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
|
||||
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
|
||||
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
|
||||
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeNameTTS(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getUpdateIconRes(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
//交通检查
|
||||
TRAFFIC_CHECK.poiType -> {
|
||||
R.drawable.v_to_x_marker_2
|
||||
}
|
||||
//封路
|
||||
ROAD_CLOSED.poiType -> {
|
||||
R.drawable.v_to_x_marker_16
|
||||
}
|
||||
//施工
|
||||
FOURS_ROAD_WORK.poiType -> {
|
||||
R.drawable.v_to_x_marker_11
|
||||
}
|
||||
//拥堵
|
||||
FOURS_BLOCK_UP.poiType -> {
|
||||
R.drawable.v_to_x_marker_5
|
||||
}
|
||||
//积水
|
||||
FOURS_PONDING.poiType -> {
|
||||
R.drawable.v_to_x_marker_6
|
||||
}
|
||||
//浓雾
|
||||
FOURS_FOG.poiType -> {
|
||||
R.drawable.v_to_x_marker_9
|
||||
}
|
||||
//结冰
|
||||
FOURS_ICE.poiType -> {
|
||||
R.drawable.v_to_x_marker_8
|
||||
}
|
||||
//事故
|
||||
FOURS_ACCIDENT.poiType -> {
|
||||
R.drawable.v_to_x_marker_7
|
||||
}
|
||||
//事故
|
||||
FOURS_LIVING.poiType -> {
|
||||
R.drawable.v_to_x_marker_1
|
||||
}
|
||||
//红绿灯数据
|
||||
ALERT_TRAFFIC_LIGHT_SUGGEST.poiType -> {
|
||||
R.drawable.v_to_x_marker_3
|
||||
}
|
||||
//红绿灯数据
|
||||
ALERT_TRAFFIC_LIGHT_WARNING.poiType -> {
|
||||
R.drawable.v_to_x_marker_3
|
||||
}
|
||||
//前方静止or慢速车辆报警
|
||||
ALERT_FRONT_CAR.poiType -> {
|
||||
R.drawable.v_to_x_warning_car_red
|
||||
}
|
||||
// 故障车辆
|
||||
ALERT_CAR_TROUBLE_WARNING.poiType -> {
|
||||
R.drawable.icon_car_red
|
||||
}
|
||||
// 取快递
|
||||
ALERT_TRAFFIC_EXPRESS.poiType -> {
|
||||
R.drawable.v_to_x_marker_express
|
||||
}
|
||||
// 顺风车
|
||||
ALERT_TRAFFIC_TAXI.poiType -> {
|
||||
R.drawable.v_to_x_marker_taxi
|
||||
}
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
//===================告警类事件===================
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningIcon(poiType: String?): Int {
|
||||
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_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
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.poiTypeSrcVr
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.poiTypeSrcVr
|
||||
else -> TYPE_USECASE_ID_AVW.poiTypeSrcVr
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningContent(poiType: String?): String {
|
||||
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_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
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.content
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.content
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.content
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.content
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.content
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.content
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.content
|
||||
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.content
|
||||
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.content
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.content
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.content
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.content
|
||||
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.content
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.content
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.content
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.content
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.content
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.content
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.content
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.content
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.content
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.content
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.content
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.content
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.content
|
||||
else -> TYPE_USECASE_ID_AVW.content
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningTts(poiType: String?): String {
|
||||
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_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
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.tts
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.tts
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.tts
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.tts
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.tts
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.tts
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.tts
|
||||
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.tts
|
||||
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.tts
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.tts
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.tts
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.tts
|
||||
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.tts
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.tts
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.tts
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.tts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.tts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.tts
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.tts
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.tts
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.tts
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.tts
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.tts
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.tts
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.tts
|
||||
else -> TYPE_USECASE_ID_AVW.tts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,475 +0,0 @@
|
||||
package com.mogo.module.common.enums
|
||||
|
||||
import com.mogo.module.common.R
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum
|
||||
import com.mogo.module.common.utils.CloudPoiManager
|
||||
import com.mogo.module.common.utils.Const.*
|
||||
|
||||
enum class SceneTypeEnum(
|
||||
val poiType: String, val poiTypeStr: String = "其它道路事件",
|
||||
val poiTypeStrVr: String = "其它道路事件",
|
||||
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo
|
||||
) {
|
||||
//加油站
|
||||
GAS_STATION("10001", "加油站"),
|
||||
|
||||
//交通检查
|
||||
TRAFFIC_CHECK("10002", "交通检查", "前方交通检查", R.drawable.v2x_icon_jiaotongjiancha_vr),
|
||||
|
||||
//封路
|
||||
ROAD_CLOSED("10003", "封路", "前方封路", R.drawable.v2x_icon_fenglu_vr),
|
||||
|
||||
//商场打折
|
||||
SHOP_DISCOUNT("10004", ""),
|
||||
|
||||
//4S店
|
||||
FOURS_4S("10005", ""),
|
||||
|
||||
//施工
|
||||
FOURS_ROAD_WORK("10006", "道路施工", "前方施工", R.drawable.v2x_icon_daolushigong_vr),
|
||||
|
||||
//拥堵
|
||||
FOURS_BLOCK_UP("10007", "道路拥堵", "前方拥堵", R.drawable.v2x_icon_yongdu_vr),
|
||||
|
||||
//积水
|
||||
FOURS_PONDING("10008", "道路积水", "前方道路积水", R.drawable.v2x_icon_jishui_vr),
|
||||
|
||||
//超市打折
|
||||
FOURS_SHOP_FREE("10009", ""),
|
||||
|
||||
//浓雾
|
||||
FOURS_FOG("10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr),
|
||||
|
||||
//结冰
|
||||
FOURS_ICE("10011", "路面结冰"),
|
||||
|
||||
//停车场
|
||||
FOURS_PARKING("10012", "停车场"),
|
||||
|
||||
//事故
|
||||
FOURS_ACCIDENT("10013", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//重大事故
|
||||
FOURS_ACCIDENT_01("1001301", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//特大事故
|
||||
FOURS_ACCIDENT_02("1001302", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//较大事故
|
||||
FOURS_ACCIDENT_03("1001303", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//一般事故
|
||||
FOURS_ACCIDENT_04("1001304", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//轻微事故
|
||||
FOURS_ACCIDENT_05("1001305", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//身边
|
||||
FOURS_NEALY("10014", "身边事件"),
|
||||
|
||||
//实时路况
|
||||
FOURS_LIVING("10015", "实时路况"),
|
||||
|
||||
//违章停车
|
||||
ILLEGAL_PARK_LIVING("10016"),
|
||||
|
||||
//路面湿滑
|
||||
ROAD_SLIPPERY("10021");
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getPoiTypeStr(poiType: String): String {
|
||||
// 先获取网络配置的poi对应的名称
|
||||
CloudPoiManager.getInstance().getWrapperByPoiType(poiType)?.let {
|
||||
return it.title
|
||||
}
|
||||
// 如果获取不到,那么就用本地默认的
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeStrVr(poiType: String): String {
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStrVr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStrVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStrVr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStrVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStrVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStrVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStrVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStrVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStrVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStrVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStrVr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeSrcVr(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeSrcVr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeSrcVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeSrcVr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeSrcVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeSrcVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeSrcVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeSrcVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeSrcVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeSrcVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeSrcVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeSrcVr
|
||||
else -> R.drawable.v2x_icon_live_logo
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取道路事件的背景色
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getPoiTypeBg(poiType: String, isVrMode: Boolean): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType -> R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.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,
|
||||
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
|
||||
else -> {
|
||||
if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeBgForShareItem(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType ->
|
||||
R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.poiType ->
|
||||
R.drawable.bg_v2x_event_type_orange
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_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 ->
|
||||
R.drawable.bg_v2x_event_type_read
|
||||
else -> R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是道路预警事件
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isRoadEvent(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_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 -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否需要UGC预警
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isNeedRoadEventUgc(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
ROAD_CLOSED.poiType, FOURS_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,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 UGC 问答使用的 Title 和 TTS 以及展示图表
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getUgcTitleStr(poiType: String?): Array<Any?>? {
|
||||
val str = arrayOfNulls<Any>(5)
|
||||
when (poiType) {
|
||||
ROAD_CLOSED.poiType -> {
|
||||
str[0] = "你刚经过 #### \n封路吗?"
|
||||
str[1] = "你刚路过的路段封路吗?您可以直接对我说封路、或者不封路。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_fenglu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ROAD_WORK.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有道路施工吗?"
|
||||
str[1] = "你刚路过的路段道路施工吗?您可以直接对我说有施工、或者没有施工。"
|
||||
str[2] = R.drawable.bg_v2x_cancel_help
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_BLOCK_UP.poiType -> {
|
||||
str[0] = "你刚路过 #### \n堵不堵?"
|
||||
str[1] = "你刚路过的路段堵不堵?您可以直接对我说拥赌、或者不堵。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_yongdu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有事故发生吗?"
|
||||
str[1] = "你刚路过的路段有交通事故吗?您可以直接对我说有事故、或者没有事故。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_shigu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP
|
||||
}
|
||||
else -> return null
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "停车场"
|
||||
GAS_STATION.poiType -> "加油站"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
ROAD_CLOSED.poiType -> "道路封路"
|
||||
FOURS_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 -> "交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTtsWithFeedback(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "有停车场"
|
||||
GAS_STATION.poiType -> "有加油站"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_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 -> "交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAlarmContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "停车场附近"
|
||||
GAS_STATION.poiType -> "加油站附近"
|
||||
TRAFFIC_CHECK.poiType -> "前方交通检查"
|
||||
ROAD_CLOSED.poiType -> "前方封路"
|
||||
FOURS_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 ->
|
||||
"前方交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeSmallRes(type: String): Int {
|
||||
return when (type) {
|
||||
TRAFFIC_CHECK.poiType ->
|
||||
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
|
||||
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
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_small
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_accident_small
|
||||
else -> R.drawable.mogo_image_shishilukuang_small
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeRes(type: String): Int {
|
||||
return when (type) {
|
||||
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
|
||||
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
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_nor
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_jiaotongshigu_nor
|
||||
else -> R.drawable.mogo_image_shishlukuang_nor
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeName(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getMarker3DRes(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
|
||||
FOURS_ACCIDENT.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
|
||||
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
|
||||
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
|
||||
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeNameTTS(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
// @JvmStatic
|
||||
// fun getIconRes(poiType: String?): Int {
|
||||
// return when (poiType) {
|
||||
// //交通检查
|
||||
// TRAFFIC_CHECK.poiType -> {
|
||||
// R.drawable.v_to_x_marker_2
|
||||
// }
|
||||
// //封路
|
||||
// ROAD_CLOSED -> {
|
||||
// R.drawable.v_to_x_marker_16
|
||||
// }
|
||||
// //施工
|
||||
// FOURS_ROAD_WORK -> {
|
||||
// R.drawable.v_to_x_marker_11
|
||||
// }
|
||||
// //拥堵
|
||||
// FOURS_BLOCK_UP -> {
|
||||
// R.drawable.v_to_x_marker_5
|
||||
// }
|
||||
// //积水
|
||||
// FOURS_PONDING -> {
|
||||
// R.drawable.v_to_x_marker_6
|
||||
// }
|
||||
// //浓雾
|
||||
// FOURS_FOG -> {
|
||||
// R.drawable.v_to_x_marker_9
|
||||
// }
|
||||
// //结冰
|
||||
// FOURS_ICE -> {
|
||||
// R.drawable.v_to_x_marker_8
|
||||
// }
|
||||
// //事故
|
||||
// FOURS_ACCIDENT -> {
|
||||
// R.drawable.v_to_x_marker_7
|
||||
// }
|
||||
// //事故
|
||||
// FOURS_LIVING -> {
|
||||
// R.drawable.v_to_x_marker_1
|
||||
// }
|
||||
// //红绿灯数据
|
||||
// ALERT_TRAFFIC_LIGHT_SUGGEST -> {
|
||||
// R.drawable.v_to_x_marker_3
|
||||
// }
|
||||
// //红绿灯数据
|
||||
// ALERT_TRAFFIC_LIGHT_WARNING -> {
|
||||
// R.drawable.v_to_x_marker_3
|
||||
// }
|
||||
// //前方静止or慢速车辆报警
|
||||
// ALERT_FRONT_CAR -> {
|
||||
// R.drawable.v_to_x_warning_car_red
|
||||
// }
|
||||
// // 故障车辆
|
||||
// ALERT_CAR_TROUBLE_WARNING.toString() -> {
|
||||
// R.drawable.icon_car_red
|
||||
// }
|
||||
// // 取快递
|
||||
// ALERT_TRAFFIC_EXPRESS -> {
|
||||
// R.drawable.v_to_x_marker_express
|
||||
// }
|
||||
// // 顺风车
|
||||
// ALERT_TRAFFIC_TAXI -> {
|
||||
// R.drawable.v_to_x_marker_taxi
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
package com.mogo.module.common.enums
|
||||
|
||||
import com.mogo.module.common.R
|
||||
import com.zhidao.support.obu.constants.ObuConstants
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020-01-1514:47
|
||||
* desc : 预警类型枚举
|
||||
* version: 1.0
|
||||
*/
|
||||
enum class WarningTypeEnum(
|
||||
var useCaseId: Int,
|
||||
var desc: String,
|
||||
var warningContent: String,
|
||||
var warningTts: String,
|
||||
var warningIconId: Int
|
||||
) {
|
||||
|
||||
|
||||
TYPE_USECASE_ID_EBW(
|
||||
ObuConstants.USE_CASE_ID.EBW,
|
||||
"紧急制动预警",
|
||||
"前车急刹车",
|
||||
"前车急刹车",
|
||||
R.drawable.icon_warning_v2x_emergency_brake
|
||||
),
|
||||
TYPE_USECASE_ID_FCW(
|
||||
ObuConstants.USE_CASE_ID.FCW,
|
||||
"前向碰撞预警",
|
||||
"前车碰撞预警",
|
||||
"小心前车",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_ICW(
|
||||
ObuConstants.USE_CASE_ID.ICW,
|
||||
"交叉路口碰撞预警",
|
||||
"交叉路口碰撞预警",
|
||||
"注意交叉路口车辆",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_CLW(
|
||||
ObuConstants.USE_CASE_ID.CLW,
|
||||
"车辆失控预警",
|
||||
"前车失控预警",
|
||||
"小心前方失控车辆",
|
||||
R.drawable.icon_warning_v2x_vehicle_control
|
||||
),
|
||||
TYPE_USECASE_ID_DNPW(
|
||||
ObuConstants.USE_CASE_ID.DNPW,
|
||||
"逆向超车预警",
|
||||
"逆向超车预警",
|
||||
"注意对向来车",
|
||||
R.drawable.icon_warning_v2x_reverse_overtaking
|
||||
),
|
||||
TYPE_USECASE_ID_AVW(
|
||||
ObuConstants.USE_CASE_ID.AVW,
|
||||
"异常车辆提醒",
|
||||
"前车异常",
|
||||
"小心前方异常车辆",
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
),
|
||||
TYPE_USECASE_ID_BSW(
|
||||
ObuConstants.USE_CASE_ID.BSW,
|
||||
"盲区预警",
|
||||
"%s后盲区预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_blind_area_collision
|
||||
),
|
||||
TYPE_USECASE_ID_LCW(
|
||||
ObuConstants.USE_CASE_ID.LCW,
|
||||
"变道预警",
|
||||
"%s向变道预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_reverse_overtaking
|
||||
),//注意左后车辆/注意右后车辆
|
||||
TYPE_USECASE_ID_EVW(
|
||||
ObuConstants.USE_CASE_ID.EVW,
|
||||
"紧急车辆提醒",
|
||||
"请避让特种车辆",
|
||||
"后方特种车辆请避让",
|
||||
R.drawable.icon_warning_v2x_special_vehicle_access
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
0X2B0201,
|
||||
"弱势交通参与者碰撞预警",
|
||||
"行人碰撞预警",
|
||||
"行人碰撞预警",
|
||||
R.drawable.icon_warning_v2x_pedestrian_crossing
|
||||
),//行人/摩托车碰撞预警
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE(
|
||||
0X2B0202,
|
||||
"弱势交通参与者碰撞预警",
|
||||
"摩托车碰撞预警",
|
||||
"摩托车碰撞预警",
|
||||
R.drawable.icon_warning_v2x_motorcycle_collision
|
||||
),//摩托车碰撞预警
|
||||
TYPE_USECASE_ID_SLW(
|
||||
ObuConstants.USE_CASE_ID.SLW,
|
||||
"限速预警",
|
||||
"已超速",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_over_speed
|
||||
),
|
||||
TYPE_USECASE_ID_LTA(
|
||||
ObuConstants.USE_CASE_ID.LTA,
|
||||
"左转辅助",
|
||||
"左转碰撞预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_HLW(
|
||||
ObuConstants.USE_CASE_ID.HLW,
|
||||
"道路危险情况预警",
|
||||
"道路危险情况预警",
|
||||
"前方路况危险,小心行驶",
|
||||
R.drawable.icon_warning_v2x_road_dangerous
|
||||
),//(如果能给出具体的类别,则播报具体危险类别)
|
||||
TYPE_USECASE_ID_IVS(
|
||||
ObuConstants.USE_CASE_ID.IVS,
|
||||
"车内标牌",
|
||||
"前方施工",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_road_construction
|
||||
),
|
||||
TYPE_USECASE_ID_TJW(
|
||||
ObuConstants.USE_CASE_ID.TJW,
|
||||
"前方拥堵提醒",
|
||||
"前方道路拥堵",
|
||||
"前方%d米道路拥堵,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_congestion
|
||||
),
|
||||
TYPE_USECASE_ID_IVP(
|
||||
ObuConstants.USE_CASE_ID.IVP,
|
||||
"闯红灯预警",
|
||||
"路口红灯,禁止通行",
|
||||
"路口红灯,禁止通行",
|
||||
R.drawable.icon_warning_v2x_traffic_lights_red
|
||||
),
|
||||
TYPE_USECASE_ID_IVP_GREEN(
|
||||
0x2B091,
|
||||
"绿波通行",
|
||||
"绿波通行 %s km/h",
|
||||
"前方路口建议车速 %s 公里每小时",
|
||||
R.drawable.icon_warning_v2x_traffic_lights_green
|
||||
),
|
||||
TYPE_USECASE_ID_COC(
|
||||
ObuConstants.USE_CASE_ID.COC,
|
||||
"预留",
|
||||
"路况预警",
|
||||
"路况预警",
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR(
|
||||
0x2C01,
|
||||
"前方有轨电车提醒",
|
||||
"前方有轨电车提醒",
|
||||
"前方有轨电车经过,请注意行驶安全",
|
||||
R.drawable.icon_warning_v2x_tramcar
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP(
|
||||
0x2C02,
|
||||
"前方左转急弯",
|
||||
"前方左转急弯",
|
||||
"前方路口左转急弯,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_turn_left_sharp
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP(
|
||||
0x2C03,
|
||||
"前方右转急弯",
|
||||
"前方右转急弯",
|
||||
"前方路口右转急弯,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_turn_right_sharp
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING(
|
||||
0x2C04,
|
||||
"人行横道",
|
||||
"前方人行横道",
|
||||
"前方人行横道",
|
||||
R.drawable.icon_warning_v2x_pedestrian_crossing
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL(
|
||||
0x2C05,
|
||||
"学校",
|
||||
"前方学校,减速慢行",
|
||||
"前方人行横道,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_school
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING(
|
||||
0x2C06,
|
||||
"事故易发路段",
|
||||
"当前路段事故多发",
|
||||
"当前路段事故多发,请谨慎行驶",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG(
|
||||
0x2C07,
|
||||
"环岛行驶",
|
||||
"前方驶入环岛",
|
||||
"前方驶入环岛,请谨慎行驶",
|
||||
R.drawable.icon_warning_v2x_roundaboutpng
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION(
|
||||
0x2C08,
|
||||
"驾校考试路段",
|
||||
"前方考试路段",
|
||||
"前方考试路段,减速慢行",
|
||||
R.drawable.icon_warning_v2x_test_section
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE(
|
||||
0x2C09,
|
||||
"驼峰桥",
|
||||
"前方驼峰桥",
|
||||
"即将驶入桥梁,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_hump_bridge
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING(
|
||||
0x2C10,
|
||||
"禁止停车",
|
||||
"当前路段禁止停车",
|
||||
"当前路段,禁止停车",
|
||||
R.drawable.icon_warning_v2x_no_parking
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY(
|
||||
0x2C11,
|
||||
"减速慢行",
|
||||
"有车出入,减速慢行",
|
||||
"有车出入,减速慢行",
|
||||
R.drawable.icon_warning_v2x_give_way
|
||||
),
|
||||
TYPE_ERROR(
|
||||
ObuConstants.USE_CASE_ID.ERROR,
|
||||
"未知/错误/异常",
|
||||
"",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
);
|
||||
|
||||
|
||||
companion object {
|
||||
fun getWarningType(useCaseId: Int): WarningTypeEnum {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR
|
||||
else -> TYPE_USECASE_ID_AVW
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun getWarningIcon(useCaseId: Int): Int {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW.warningIconId
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON.warningIconId
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.warningIconId
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA.warningIconId
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS.warningIconId
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP.warningIconId
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN.warningIconId
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY.warningIconId
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR.warningIconId
|
||||
else -> TYPE_USECASE_ID_AVW.warningIconId
|
||||
}
|
||||
}
|
||||
|
||||
fun getWarningContent(useCaseId: Int): String {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW.warningContent
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW.warningContent
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW.warningContent
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW.warningContent
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW.warningContent
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW.warningContent
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW.warningContent
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW.warningContent
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW.warningContent
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON.warningContent
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.warningContent
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW.warningContent
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA.warningContent
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW.warningContent
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS.warningContent
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW.warningContent
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP.warningContent
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN.warningContent
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.warningContent
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.warningContent
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.warningContent
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.warningContent
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION.warningContent
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.warningContent
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING.warningContent
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY.warningContent
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR.warningContent
|
||||
else -> TYPE_USECASE_ID_AVW.warningContent
|
||||
}
|
||||
}
|
||||
|
||||
fun getWarningTts(useCaseId: Int): String {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW.warningTts
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW.warningTts
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW.warningTts
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW.warningTts
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW.warningTts
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW.warningTts
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW.warningTts
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW.warningTts
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW.warningTts
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON.warningTts
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.warningTts
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW.warningTts
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA.warningTts
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW.warningTts
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS.warningTts
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW.warningTts
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP.warningTts
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN.warningTts
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.warningTts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.warningTts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.warningTts
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.warningTts
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION.warningTts
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.warningTts
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING.warningTts
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY.warningTts
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR.warningTts
|
||||
else -> TYPE_USECASE_ID_AVW.warningTts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.common.marker.PoiWrapper;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
@@ -37,47 +37,47 @@ public class CloudPoiManager {
|
||||
|
||||
public void generateDefault() {
|
||||
if (poiWrapper.isEmpty()) {
|
||||
poiWrapper.put(SceneTypeEnum.GAS_STATION.getPoiType(), new PoiWrapper(SceneTypeEnum.GAS_STATION.getPoiType(), R.drawable.module_common_icon_map_marker_refuel,
|
||||
poiWrapper.put(EventTypeEnum.GAS_STATION.getPoiType(), new PoiWrapper(EventTypeEnum.GAS_STATION.getPoiType(), R.drawable.module_common_icon_map_marker_refuel,
|
||||
R.drawable.module_common_icon_map_marker_refuel, "加油站"));
|
||||
poiWrapper.put(SceneTypeEnum.TRAFFIC_CHECK.getPoiType(), new PoiWrapper(SceneTypeEnum.TRAFFIC_CHECK.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.TRAFFIC_CHECK.getPoiType(), new PoiWrapper(EventTypeEnum.TRAFFIC_CHECK.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_road_check2, R.drawable.module_common_icon_map_marker_road_check2_white, "交通检查"));
|
||||
poiWrapper.put(SceneTypeEnum.ROAD_CLOSED.getPoiType(), new PoiWrapper(SceneTypeEnum.ROAD_CLOSED.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.ROAD_CLOSED.getPoiType(), new PoiWrapper(EventTypeEnum.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(SceneTypeEnum.SHOP_DISCOUNT.getPoiType(), new PoiWrapper(SceneTypeEnum.SHOP_DISCOUNT.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.SHOP_DISCOUNT.getPoiType(), new PoiWrapper(EventTypeEnum.SHOP_DISCOUNT.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_shop_discount, R.drawable.module_common_icon_map_marker_shop_discount, "商场打折"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_4S.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_4S.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_4S.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_4S.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_4s, R.drawable.module_common_icon_map_marker_4s, "4S店"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ROAD_WORK.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ROAD_WORK.getPoiType(),
|
||||
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(SceneTypeEnum.FOURS_BLOCK_UP.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_BLOCK_UP.getPoiType(),
|
||||
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(SceneTypeEnum.FOURS_PONDING.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_PONDING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_PONDING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_PONDING.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_pondingl2, R.drawable.module_common_icon_map_marker_pondingl2_white, "积水"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_SHOP_FREE.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_SHOP_FREE.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_SHOP_FREE.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_SHOP_FREE.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_shop, R.drawable.module_common_icon_map_marker_shop, "超时打折"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_FOG.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_FOG.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_FOG.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_FOG.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_dark_frog2, R.drawable.module_common_ic_rc_dark_frog2_white, "浓雾"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ICE.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ICE.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ICE.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ICE.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_freeze2, R.drawable.module_common_ic_rc_freeze2_white, "结冰"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_PARKING.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_PARKING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_PARKING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_PARKING.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_parking2, R.drawable.module_common_ic_rc_parking2, "停车场"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_01.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_01.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_01.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_01.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "重大事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_02.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_02.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_02.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_02.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "特大事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_03.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_03.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_03.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_03.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "较大事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_04.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_04.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_04.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_04.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "一般事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_05.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_05.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_05.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_05.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "轻微事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_NEALY.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_NEALY.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_NEALY.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_NEALY.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_shear_news, R.drawable.module_common_icon_map_marker_shear_news, "身边"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_LIVING.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_LIVING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_LIVING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_LIVING.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_living, R.drawable.module_common_icon_map_marker_living_white, "实时路况"));
|
||||
poiWrapper.put(SceneTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(), new PoiWrapper(SceneTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(), new PoiWrapper(EventTypeEnum.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",
|
||||
|
||||
Reference in New Issue
Block a user