iterator = showedEvents.iterator();
while (iterator.hasNext()) {
@@ -51,20 +56,20 @@ public class V2XAlarmServer {
}
}
}
- Log.d("RWJ", "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
+ Logger.d(TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
if (currentLocation != null && v2XRoadEventEntityList != null) {
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
// 0、道路事件必须有朝向,角度>=0;
- Log.d("RWJ", "entity:" + v2XRoadEventEntity.getLocation());
+ Logger.d(TAG, "entity:" + v2XRoadEventEntity.getLocation());
if (v2XRoadEventEntity.getLocation().getAngle() >= 0) {
// 计算车辆距离指定气泡的距离
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
// 1、判断是否到达了触发距离,20 ~ 500,
double distance = v2XRoadEventEntity.getDistance();
- Log.d("RWJ", "distance:" + distance);
+ Logger.d(TAG, "distance:" + distance);
if (distance <= 500) {
- if (EventTypeEnum.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) {
+ if (EventTypeEnumNew.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) {
if (distance > 25) {
continue;
}
@@ -73,7 +78,7 @@ public class V2XAlarmServer {
double carBearing = currentLocation.getBearing();
double eventBearing = eventLocation.getAngle();
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
- Log.d("RWJ", "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
+ Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
if (diffAngle <= 20) {
// 3、计算当前车辆行驶方向与事件位置之间夹角《20度,保证道路事件在车辆前方
double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
@@ -84,12 +89,12 @@ public class V2XAlarmServer {
(int) currentLocation.getBearing()
);
- Log.d("RWJ", "eventAngle:" + eventAngle);
+ Logger.d(TAG, "eventAngle:" + eventAngle);
if (0 <= eventAngle && eventAngle <= 20) {
if (showedEvents.contains(v2XRoadEventEntity)) {
return null;
}
- Log.d("RWJ", "showed---");
+ Logger.d(TAG, "showed---");
showedEvents.add(v2XRoadEventEntity);
return v2XRoadEventEntity;
}
@@ -100,7 +105,7 @@ public class V2XAlarmServer {
}
} catch (Exception e) {
e.printStackTrace();
- Log.w("RWJ", "error: " + e.getMessage());
+ Logger.w(TAG, "error: " + e.getMessage());
}
return null;
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt
index 566587fc86..8a9b602209 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt
@@ -23,10 +23,6 @@ internal object BridgeApi {
ARouter.getInstance().build(MoGoV2XServicePaths.PATH_V2X_MARKER_MANAGER).navigation(context()) as? IMoGoV2XMarkerManager
}
- private val v2xPolyline by lazy {
- ARouter.getInstance().build(MoGoV2XServicePaths.PATH_V2X_POLYLINE_MANAGER).navigation(context()) as? IMoGoV2XPolylineManager
- }
-
private val v2xWarnPolyline by lazy {
ARouter.getInstance().build(MoGoV2XServicePaths.PATH_V2X_WARN_POLYLINE_MANAGER).navigation(context()) as? IMoGoWarnPolylineManager
}
@@ -39,10 +35,6 @@ internal object BridgeApi {
ARouter.getInstance().build(MoGoV2XServicePaths.PATH_V2X_STOP_POLYLINE_MANAGER).navigation(context()) as? IMoGoStopPolylineManager
}
- private val v2xStatus by lazy {
- ARouter.getInstance().build(MoGoV2XServicePaths.PATH_V2X_STATUS_MANAGER).navigation(context()) as? IMoGoV2XStatusManager
- }
-
fun init(context: Context) {
this.context.set(WeakReference(context))
}
@@ -51,14 +43,9 @@ internal object BridgeApi {
fun v2xMarker() = v2xMarker
- fun v2xPolyline() = v2xPolyline
-
fun v2xWarnPolyline() = v2xWarnPolyline
fun v2xPersonWarnPolyline() = v2xPersonWarnPolyline
fun v2xStopPolyline() = v2xStopPolyline
-
- fun v2xStatus() = v2xStatus
-
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java
index f82f7c4014..fdfe8dec63 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java
@@ -19,11 +19,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
*/
public interface IMoGoV2XMarkerManager extends IProvider {
- /**
- * 重新绘制最后一次的POI点
- */
- void drawableLastAllPOI();
-
/**
* 获取所有的道路事件点,探路事件,返回结果是按照距离当前车辆从近到远排列好的
*
@@ -43,20 +38,4 @@ public interface IMoGoV2XMarkerManager extends IProvider {
* @return
*/
IMogoMarker drawableAlarmPOI(Context context, V2XRoadEventEntity roadEventEntity, IMogoMarkerClickListener clickListener);
-
- /**
- * 清除 道路事件 POI
- */
- void clearAlarmPOI();
-
- /**
- * 清除 所有的 POI
- */
- void clearALLPOI();
-
-
- /**
- * 强制清除道路事件POI
- */
- void forceClearAlarmPOI();
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XPolylineManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XPolylineManager.java
deleted file mode 100644
index 00ccb22e7a..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XPolylineManager.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.manager;
-
-import android.content.Context;
-
-import com.alibaba.android.arouter.facade.template.IProvider;
-import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
-import com.mogo.map.overlay.IMogoPolyline;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/4/17 9:49 PM
- * desc : 当前车辆与道路事件的连接线
- * version: 1.0
- */
-public interface IMoGoV2XPolylineManager extends IProvider {
- /**
- * 绘制连接线,目标车,与当前车辆间连线
- *
- * @param context
- * @param roadEventEntity
- */
- void drawablePolyline(Context context, V2XRoadEventEntity roadEventEntity);
-
- /**
- * 移除连接线
- */
- void clearLine();
-
- IMogoPolyline getMogoPolyline();
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XStatusChangedListener.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XStatusChangedListener.java
deleted file mode 100644
index 964ce81d76..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XStatusChangedListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.manager;
-
-import com.alibaba.android.arouter.facade.template.IProvider;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/4/17 7:44 PM
- * desc : 状态控制器监听
- * version: 1.0
- */
-public interface IMoGoV2XStatusChangedListener extends IProvider {
-
- /**
- * @param descriptor 状态类型
- * @param isTrue true - v2x ui show
- */
- void onStatusChanged(V2XStatusDescriptor descriptor, boolean isTrue);
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XStatusManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XStatusManager.java
deleted file mode 100644
index 473b65bf7b..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XStatusManager.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.manager;
-
-import com.alibaba.android.arouter.facade.template.IProvider;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/4/17 7:20 PM
- * desc : V2X 状态管理
- * version: 1.0
- */
-public interface IMoGoV2XStatusManager extends IProvider {
- /**
- * 地图区域 V2X道路预警POI 是否在展示
- */
- boolean isRoadEventPOIShow();
-
- /**
- * 设置 V2X道路预警POI 是否在展示
- *
- * @param tag
- * @param show
- */
- void setRoadEventPOIShow(String tag, boolean show);
-
- /**
- * 地图区域 推送的 POI 是否在展示
- *
- * @param tag
- * @param show
- */
- void setPushPOIShow(String tag, boolean show);
-
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusDescriptor.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusDescriptor.java
deleted file mode 100644
index 2174ed12c4..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusDescriptor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.manager;
-
-/**
- * @author congtaowang
- * @since 2020-01-04
- *
- * 状态描述
- */
-public enum V2XStatusDescriptor {
-
- /**
- * 地图 V2X道路预警POI
- */
- RoadEventPOI_UI,
-
- /**
- * 按钮 V2X道路预警
- */
- RoadEventButton_UI,
-
- /**
- * 头部 V2X道路预警 UI
- */
- RoadEventWindow_UI,
-
- /**
- * 头部 V2X的道路直播 UI
- */
- RoadLiveCarWindow_UI,
-
- /**
- * 地图 他人车辆故障求助POI
- */
- OtherSeekHelpPOI_UI,
-
- /**
- * 头部 他人车辆故障求助 UI 是否在展示
- */
- OtherSeekHelpWindow_UI,
-
- /**
- * 右侧2/3 V2X 场景动画 UI 是否在展示
- */
- V2XAnimationWindow_UI,
-
- /**
- * 右侧2/3 左下角 模拟直播车机 UI 是否在展示
- */
- LiveCarWindow_UI,
-
- /**
- * 右侧2/3 左下角 模拟直播车机 UI 是否在展示
- */
- V2XRoadVideo_UI,
-
- /**
- * 推送的POI
- */
- PushWindowPOI_UI,
-
- /**
- * 推送的弹窗
- */
- PushWindow_UI,
-
- /**
- * 疲劳驾驶弹窗
- */
- FatigueDrivingWindow_UI
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusManager.java
deleted file mode 100644
index 541a2090a7..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusManager.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.manager;
-
-import com.mogo.eagle.core.data.map.MogoLatLng;
-import com.mogo.eagle.core.data.map.MogoLocation;
-import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/4/3 2:34 PM
- * desc : V2X状态管理
- * version: 1.0
- */
-public class V2XStatusManager {
- private static V2XStatusManager mV2XStatusManager;
- // 正在进行的告警事件详情
- private V2XRoadEventEntity mAlarmInfo;
-
- private MogoLocation mLocation;
-
- private V2XStatusManager() {
- }
-
- /**
- * 获取操作实体
- */
- public static synchronized V2XStatusManager getInstance() {
- synchronized (V2XStatusManager.class) {
- if (mV2XStatusManager == null) {
- mV2XStatusManager = new V2XStatusManager();
- }
- }
- return mV2XStatusManager;
- }
-
- public void setAlarmInfo(V2XRoadEventEntity eventEntity) {
- this.mAlarmInfo = eventEntity;
- }
-
- // 获取目标事件经纬度
- public MogoLatLng getTargetMoGoLatLng() {
- if (mAlarmInfo != null) {
- return new MogoLatLng(
- mAlarmInfo.getLocation().getLat(),
- mAlarmInfo.getLocation().getLon()
- );
- }
- return null;
- }
-
- public MogoLocation getLocation() {
- if (mLocation == null) {
- mLocation = new MogoLocation();
- }
- return mLocation;
- }
-
- public void setLocation(MogoLocation mLocation) {
- this.mLocation = mLocation;
- }
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java
index 13432dbf4f..627ddfed5d 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java
@@ -1,42 +1,31 @@
package com.mogo.eagle.core.function.v2x.events.manager.impl;
import static com.mogo.commons.module.ServiceConst.CARD_TYPE_NOVELTY;
-import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_EVENT_ALARM_POI;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
-
import android.content.Context;
-
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.commons.utils.CoordinateUtils;
-import com.mogo.commons.AbsMogoApplication;
-import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
+import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
-import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
-import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
-import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.marker.V2XMarkerAdapter;
import com.mogo.eagle.core.function.v2x.events.utils.EntityUtilsKt;
import com.mogo.eagle.core.function.v2x.events.utils.MapUtils;
-import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-import com.mogo.map.marker.IMogoMarker;
-import com.mogo.map.marker.IMogoMarkerClickListener;
-import com.mogo.map.marker.IMogoMarkerManager;
-import com.mogo.map.marker.MogoMarkerOptions;
-import com.mogo.eagle.core.data.enums.EventTypeEnum;
-import com.mogo.eagle.core.function.v2x.internal.V2XManager;
import com.mogo.eagle.core.function.v2x.internal.data.V2XMarkerCardResult;
import com.mogo.eagle.core.function.v2x.internal.data.V2XMarkerExploreWay;
import com.mogo.eagle.core.function.v2x.internal.data.V2XMarkerLocation;
-
+import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
+import com.mogo.map.marker.IMogoMarker;
+import com.mogo.map.marker.IMogoMarkerClickListener;
+import com.mogo.map.marker.MogoMarkerOptions;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -54,25 +43,16 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
private static final String TAG = "MoGoV2XMarkerManager";
// 记录所有的:新鲜事儿的道路事件点、探路事件
- private static final CopyOnWriteArraySet mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
-
+ private final CopyOnWriteArraySet mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
@Override
- public void drawableLastAllPOI() {
- // 清除连接线
- IMoGoV2XPolylineManager polylineManager = BridgeApi.INSTANCE.v2xPolyline();
- if (polylineManager != null) {
- polylineManager.clearLine();
- }
- clearAlarmPOI();
- V2XManager.INSTANCE.forceRefresh();
- }
+ public void init(Context context) {}
@Override
public CopyOnWriteArrayList getV2XRoadEventEntityList() {
CopyOnWriteArrayList roadEventEntities = new CopyOnWriteArrayList<>();
// 当前车辆数据
- MogoLocation currentLocation = V2XStatusManager.getInstance().getLocation();
+ MogoLocation currentLocation = CallerMapLocationListenerManager.INSTANCE.getCurrentLocation();
if (currentLocation != null) {
// 重新计算距离
for (V2XRoadEventEntity v2XRoadEventEntity : mV2XRoadEventEntityArrayList) {
@@ -110,7 +90,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
List exploreWayList = markerCardResult.getExploreWay();
if (exploreWayList != null) {
for (V2XMarkerExploreWay markerExploreWay : exploreWayList) {
- if (EventTypeEnum.isRoadEvent(markerExploreWay.getPoiType())) {
+ if (EventTypeEnumNew.isRoadEvent(markerExploreWay.getPoiType())) {
V2XMarkerLocation markerLocation = markerExploreWay.getLocation();
// 记录道路事件
V2XRoadEventEntity v2XRoadEventEntity = new V2XRoadEventEntity();
@@ -133,12 +113,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
@Override
public IMogoMarker drawableAlarmPOI(Context context, V2XRoadEventEntity roadEventEntity, IMogoMarkerClickListener clickListener) {
try {
- IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus();
- if (v2xStatus != null) {
- v2xStatus.setRoadEventPOIShow(TAG, true);
- }
// 清除原来的大而全的新鲜事儿
- clearAlarmPOI();
if (roadEventEntity.getLocation() != null) {
// 道路事件,或者水波纹扩散效果
MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
@@ -155,25 +130,11 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
markerShowEntity.setMarkerType(CARD_TYPE_NOVELTY);
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
optionsRipple.period(1);
- IMogoMarker ret = null;
- if (MogoStatusManager.getInstance().isVrMode()) {
- ret = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).drawMarker(markerShowEntity);
- } else {
- optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
- IMogoMarkerManager marker = CallerMapUIServiceManager.INSTANCE.getMarkerManager(context);
- if (marker != null) {
- ret = marker.addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
- }
- }
+ IMogoMarker ret = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).drawMarker(markerShowEntity);
// 当前Marker设置为最上面
if (ret != null) {
ret.setToTop();
}
- // 绘制连接线
- IMoGoV2XPolylineManager polylineManager = BridgeApi.INSTANCE.v2xPolyline();
- if (polylineManager != null) {
- polylineManager.drawablePolyline(context, roadEventEntity);
- }
// 缩放地图
MapUtils.zoomMap(
new MogoLatLng(roadEventEntity.getLocation().getLat(),
@@ -189,43 +150,4 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
}
return null;
}
-
- @Override
- public void clearAlarmPOI() {
-// boolean isRoadEventPOIShow = false;
-// IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus();
-// if (v2xStatus != null) {
-// isRoadEventPOIShow = v2xStatus.isRoadEventPOIShow();
-// }
-// if (isRoadEventPOIShow) {
-// v2xStatus.setRoadEventPOIShow(TAG, false);
-// if (mAlarmInfoMarker != null) {
-// mAlarmInfoMarker.remove();
-// }
-// }
- }
-
- @Override
- public void clearALLPOI() {
- try {
- IMogoMarkerManager markerManager = CallerMapUIServiceManager.INSTANCE.getMarkerManager(AbsMogoApplication.getApp());
- if (markerManager != null) {
- markerManager.removeMarkers();
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- @Override
- public void forceClearAlarmPOI() {
-// if (mAlarmInfoMarker != null) {
-// mAlarmInfoMarker.remove();
-// }
- }
-
- @Override
- public void init(Context context) {
-
- }
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java
deleted file mode 100644
index 91318099b4..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.manager.impl;
-
-import android.content.Context;
-
-import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
-import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
-import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
-import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
-import com.mogo.map.overlay.IMogoPolyline;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/4/17 10:00 PM
- * desc : 当前车辆与道路事件的连接线
- * version: 1.0
- */
-@Route(path = MoGoV2XServicePaths.PATH_V2X_POLYLINE_MANAGER)
-public class MoGoV2XPolylineManager implements IMoGoV2XPolylineManager {
- private static final String TAG = "MoGoV2XPolylineManager";
- private static IMogoPolyline mMogoPolyline;
-
- @Override
- public void drawablePolyline(Context context, V2XRoadEventEntity roadEventEntity) {
-// try {
-// if (mMogoPolyline != null) {
-// mMogoPolyline.remove();
-// }
-// boolean isRoadEventPOIShow = false;
-// boolean isOtherSeekHelpPOIShow = false;
-// IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus();
-// if (v2xStatus != null) {
-// isRoadEventPOIShow = v2xStatus.isRoadEventPOIShow();
-// isOtherSeekHelpPOIShow = v2xStatus.isOtherSeekHelpPOIShow();
-// }
-// boolean isVrMode = false;
-// IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
-// if (statusManager != null) {
-// isVrMode = statusManager.isVrMode();
-// }
-
-// if ((isRoadEventPOIShow
-// || isOtherSeekHelpPOIShow)
-// && V2XStatusManager.getInstance().getTargetMoGoLatLng() != null
-// && !isVrMode
-// ) {
-// // 连接线参数
-// MogoPolylineOptions options = new MogoPolylineOptions().setGps(true);
-//
-// // 渐变色
-// List colors = new ArrayList<>();
-//
-// if (EventTypeEnum.ALERT_TRAFFIC_LIGHT_SUGGEST.getPoiType().equals(roadEventEntity.getPoiType())
-// || EventTypeEnum.ALERT_TRAFFIC_LIGHT_WARNING.getPoiType().equals(roadEventEntity.getPoiType())
-// || EventTypeEnum.FOURS_BLOCK_UP.getPoiType().equals(roadEventEntity.getPoiType())
-// || EventTypeEnum.ALERT_CAR_TROUBLE_WARNING.getPoiType().equals(roadEventEntity.getPoiType())) {
-// colors.add(0xFFFFA31A);
-// colors.add(0xFFFFA31A);
-// } else {
-// colors.add(0xFFE32F46);
-// colors.add(0xFFE32F46);
-// }
-// // 线条粗细,渐变,渐变色值
-// options.width(10).useGradient(true).colorValues(colors);
-//
-// // 当前车辆位置
-// MogoLatLng carLocation = new MogoLatLng(
-// CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat(),
-// CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon()
-// );
-//
-// if (carLocation != null) {
-// options.add(carLocation);
-// } else {
-// options.add(V2XStatusManager.getInstance().getLocation());
-// }
-// // 目标车辆、道路事件位置
-// options.add(V2XStatusManager.getInstance().getTargetMoGoLatLng());
-//
-// // 绘制线的对象
-// IMogoOverlayManager overlay = MogoOverlayManager.getInstance();
-// if (overlay != null) {
-// mMogoPolyline = overlay.addPolyline(options);
-// }
-// }
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
- }
-
- @Override
- public void clearLine() {
- if (mMogoPolyline != null) {
- mMogoPolyline.remove();
- mMogoPolyline = null;
- V2XStatusManager.getInstance().setAlarmInfo(null);
- }
- }
-
- @Override
- public void init(Context context) {
-
- }
-
- /**
- * @return 绘制连接线的对象
- */
- @Override
- public IMogoPolyline getMogoPolyline() {
- return mMogoPolyline;
- }
-
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XStatusManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XStatusManager.java
deleted file mode 100644
index 9f04357bb1..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XStatusManager.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.manager.impl;
-
-import android.content.Context;
-
-import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
-import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusChangedListener;
-import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
-import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusDescriptor;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/4/17 7:34 PM
- * desc :
- * version: 1.0
- */
-@Route(path = MoGoV2XServicePaths.PATH_V2X_STATUS_MANAGER)
-public class MoGoV2XStatusManager implements IMoGoV2XStatusManager {
- private static final String TAG = "MoGoV2XStatusManager";
-
- /**
- * 状态记录
- */
- private static final Map mStatus = new ConcurrentHashMap<>();
-
- /**
- * 回调集合
- */
- private static final Map> mListeners = new ConcurrentHashMap<>();
-
- /**
- * 状态类型修改记录
- */
- private static final Map mModifier = new ConcurrentHashMap<>();
-
- // 查询状态存储情况
- private boolean get_bool_val(V2XStatusDescriptor descriptor) {
- Boolean val = mStatus.get(descriptor);
- return val == null ? false : val;
- }
-
- @Override
- public boolean isRoadEventPOIShow() {
- return get_bool_val(V2XStatusDescriptor.RoadEventPOI_UI);
- }
-
- @Override
- public void setRoadEventPOIShow(String tag, boolean show) {
- mStatus.put(V2XStatusDescriptor.RoadEventPOI_UI, show);
- invokeStatusChangedListener(V2XStatusDescriptor.RoadEventPOI_UI, show);
- recordStatusModifier(tag, V2XStatusDescriptor.RoadEventPOI_UI);
- }
-
-
- @Override
- public void setPushPOIShow(String tag, boolean show) {
- mStatus.put(V2XStatusDescriptor.PushWindowPOI_UI, show);
- invokeStatusChangedListener(V2XStatusDescriptor.PushWindowPOI_UI, show);
- recordStatusModifier(tag, V2XStatusDescriptor.PushWindowPOI_UI);
- }
-
- /**
- * 调用所有存储的监听
- *
- * @param descriptor
- * @param status
- */
- private void invokeStatusChangedListener(V2XStatusDescriptor descriptor, boolean status) {
- if (mListeners.containsKey(descriptor)) {
- List listeners = mListeners.get(descriptor);
- if (listeners != null) {
- for (IMoGoV2XStatusChangedListener listener : listeners) {
- if (listener != null) {
- listener.onStatusChanged(descriptor, status);
- }
- }
- }
- }
- }
-
- /**
- * 记录状态
- *
- * @param tag
- * @param descriptor
- */
- private void recordStatusModifier(String tag, V2XStatusDescriptor descriptor) {
- mModifier.put(descriptor, tag);
- }
-
- @Override
- public void init(Context context) {
-
- }
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java
index f612b4e6b5..12a6e872f0 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java
@@ -2,12 +2,10 @@ package com.mogo.eagle.core.function.v2x.events.marker;
import android.content.Context;
import android.graphics.Bitmap;
-
+import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.R;
-import com.mogo.eagle.core.data.enums.EventTypeEnum;
import com.mogo.eagle.core.function.v2x.events.view.V2XMarkerRoadEventView;
-
import java.util.ArrayList;
/**
@@ -26,37 +24,15 @@ public class V2XMarkerAdapter {
return new V2XMarkerRoadEventView(context, alarmInfo).setBackground(imageRes).getView();
}
- /**
- * 返回道路事件静态的图,因为车机性能不行,会卡顿
- */
- public static Bitmap getV2XRoadEventViewPng(Context context, V2XRoadEventEntity alarmInfo) {
- Bitmap bitmap;
- if (EventTypeEnum.ALERT_TRAFFIC_LIGHT_SUGGEST.getPoiType().equals(alarmInfo.getPoiType())
- || EventTypeEnum.ALERT_TRAFFIC_LIGHT_WARNING.getPoiType().equals(alarmInfo.getPoiType())
- || EventTypeEnum.FOURS_BLOCK_UP.getPoiType().equals(alarmInfo.getPoiType())
- || EventTypeEnum.ALERT_CAR_TROUBLE_WARNING.getPoiType().equals(alarmInfo.getPoiType())) {
- bitmap = getV2XRoadEventMarkerView(
- context,
- alarmInfo,
- R.drawable.v_to_x_warning_circle_orange_00040);
- } else {
- bitmap = getV2XRoadEventMarkerView(
- context,
- alarmInfo,
- R.drawable.v_to_x_warning_circle_red_00040);
- }
- return bitmap;
- }
-
/**
* 返回道路事件gif序列图集合
*/
public static ArrayList getV2XRoadEventViewGif(Context context, V2XRoadEventEntity alarmInfo) {
ArrayList bitmapArrayList;
- if (EventTypeEnum.ALERT_TRAFFIC_LIGHT_SUGGEST.getPoiType().equals(alarmInfo.getPoiType())
- || EventTypeEnum.ALERT_TRAFFIC_LIGHT_WARNING.getPoiType().equals(alarmInfo.getPoiType())
- || EventTypeEnum.FOURS_BLOCK_UP.getPoiType().equals(alarmInfo.getPoiType())
- || EventTypeEnum.ALERT_CAR_TROUBLE_WARNING.getPoiType().equals(alarmInfo.getPoiType())) {
+ if (EventTypeEnumNew.ALERT_TRAFFIC_LIGHT_SUGGEST.getPoiType().equals(alarmInfo.getPoiType())
+ || EventTypeEnumNew.ALERT_TRAFFIC_LIGHT_WARNING.getPoiType().equals(alarmInfo.getPoiType())
+ || EventTypeEnumNew.FOURS_BLOCK_UP.getPoiType().equals(alarmInfo.getPoiType())
+ || EventTypeEnumNew.ALERT_CAR_TROUBLE_WARNING.getPoiType().equals(alarmInfo.getPoiType())) {
bitmapArrayList = getV2XRoadEventOrangeMarkerView(context, alarmInfo);
} else {
bitmapArrayList = getV2XRoadEventRedMarkerView(context, alarmInfo);
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/observer/CarLocationObserver.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/observer/CarLocationObserver.java
deleted file mode 100644
index 06e910f8e9..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/observer/CarLocationObserver.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.observer;
-
-import com.mogo.eagle.core.data.map.MogoLocation;
-
-/**
- * @author donghongyu
- * @date 4/9/21 2:14 PM
- * 当前车辆位置观察者接口
- */
-public abstract class CarLocationObserver {
- // 更新状态
- public abstract void update(MogoLocation carLocation);
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/observer/V2XOptimalRouteObserver.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/observer/V2XOptimalRouteObserver.java
deleted file mode 100644
index a67b45437a..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/observer/V2XOptimalRouteObserver.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.observer;
-
-import com.mogo.eagle.core.data.map.MogoLatLng;
-import com.mogo.eagle.core.data.map.MogoLocation;
-import com.mogo.eagle.core.function.v2x.events.overlay.V2XOptimalRouteOverlay;
-import java.util.List;
-
-/**
- * @author donghongyu
- * @date 4/9/21 2:38 PM
- * 最优路线推荐
- */
-public class V2XOptimalRouteObserver extends CarLocationObserver {
- public static String TYPE = "V2XOptimalRouteObserver";
-
- private static V2XOptimalRouteObserver v2XOptimalRouteObserver;
- //最优路线覆盖物绘制
- private V2XOptimalRouteOverlay mV2XOptimalRouteOverlay;
- // 要绘制的数据
- private List polylinePoint;
-
- public static V2XOptimalRouteObserver getInstance() {
- if (v2XOptimalRouteObserver == null) {
- synchronized (V2XOptimalRouteObserver.class) {
- if (v2XOptimalRouteObserver == null) {
- v2XOptimalRouteObserver = new V2XOptimalRouteObserver();
- }
- }
- }
- return v2XOptimalRouteObserver;
- }
-
- private V2XOptimalRouteObserver() {
- mV2XOptimalRouteOverlay = new V2XOptimalRouteOverlay();
- }
-
- /**
- * 设置推荐路线
- *
- * @param polylinePoint 推荐的路线
- */
- public void setPolylinePoint(List polylinePoint) {
- this.polylinePoint = polylinePoint;
- }
-
- @Override
- public void update(MogoLocation carLocation) {
- mV2XOptimalRouteOverlay.draw(carLocation, polylinePoint);
- }
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/overlay/V2XOptimalRouteOverlay.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/overlay/V2XOptimalRouteOverlay.java
deleted file mode 100644
index d922119aff..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/overlay/V2XOptimalRouteOverlay.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.overlay;
-
-import com.mogo.commons.AbsMogoApplication;
-import com.mogo.eagle.core.data.map.MogoLatLng;
-import com.mogo.eagle.core.data.map.MogoLocation;
-import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
-import com.mogo.commons.utils.LocationUtils;
-import com.mogo.eagle.core.utilcode.util.ColorUtils;
-import com.mogo.map.overlay.IMogoOverlayManager;
-import com.mogo.map.overlay.IMogoPolyline;
-import com.mogo.map.overlay.MogoPolylineOptions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 最优路线推荐的图覆盖物
- *
- * @author donghongyu
- * @date 4/8/21 6:06 PM
- */
-public class V2XOptimalRouteOverlay {
- private IMogoPolyline mMoGoPolyline;
- // 连接线参数
- private MogoPolylineOptions mPolylineOptions;
- // 线路径集合
- private List mPolylinePointList;
- // 渐变色
- private List mPolylineColors;
-
- public V2XOptimalRouteOverlay() {
- mPolylineOptions = new MogoPolylineOptions();
- // 绘制路径集合
- mPolylinePointList = new ArrayList<>();
- // 引导线颜色
- mPolylineColors = new ArrayList<>();
- }
-
- /**
- * 绘制最优路线
- *
- * @param polylinePoint 要绘制的经纬度度集合
- */
- public IMogoPolyline draw(MogoLocation carLocal, List polylinePoint) {
- if (mMoGoPolyline != null) {
- mMoGoPolyline.remove();
- mPolylinePointList.clear();
- mPolylineColors.clear();
- }
- if (polylinePoint != null) {
-
- // 将当前车辆位置放进去
- mPolylinePointList.add(new MogoLatLng(carLocal.getLatitude(), carLocal.getLongitude()));
- // 过滤后台推送的推荐路线集合
- for (MogoLatLng polyline : polylinePoint) {
- //需要剔除已经行驶过的经纬度,这里需要比对推荐路线集合中的点是否在当前车辆行驶方向前面如果不在则抛弃
- if (LocationUtils.isPointOnCarFront(carLocal, polyline)) {
- mPolylinePointList.add(polyline);
- }
- }
-
- mPolylineColors.addAll(ColorUtils.getGradientAlpha("#002965ED", "#FF2965ED", "#002965ED", mPolylinePointList.size()));
-
- // 替换路径集合
- mPolylineOptions.points(mPolylinePointList);
- // 线条粗细,渐变,渐变色值
- mPolylineOptions.width(25).useGradient(true).colorValues(mPolylineColors);
- // 绘制线
- IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager(AbsMogoApplication.getApp());
- if (overlay != null) {
- mMoGoPolyline = overlay.addPolyline(mPolylineOptions);
- }
- }
- return mMoGoPolyline;
- }
-
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/MarkerManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/remove/MarkerRemoveManager.kt
similarity index 83%
rename from core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/MarkerManager.kt
rename to core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/remove/MarkerRemoveManager.kt
index 1039bbcd30..238af1abca 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/MarkerManager.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/remove/MarkerRemoveManager.kt
@@ -1,15 +1,15 @@
-package com.mogo.eagle.core.function.v2x.events.marker
+package com.mogo.eagle.core.function.v2x.events.remove
import android.os.Handler
import android.os.HandlerThread
import android.util.Log
import com.mogo.cloud.commons.utils.CoordinateUtils
-import com.mogo.eagle.core.data.map.MogoLocation
-import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
+import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.utilcode.util.*
import com.mogo.map.marker.IMogoMarker
import com.mogo.map.overlay.IMogoPolyline
import kotlinx.coroutines.Runnable
+import mogo.telematics.pad.MessagePad.GnssInfo
import java.util.LinkedList
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicBoolean
@@ -52,7 +52,7 @@ data class MarkerWrapper(val id: String, val lon: Double, val lat: Double, val c
}
}
-object MarkerManager {
+object MarkerRemoveManager {
private const val TAG = "MarkerManager"
@@ -64,9 +64,9 @@ object MarkerManager {
private val elapsedDistances by lazy { ConcurrentHashMap() }
- private val lastCarLocation by lazy { AtomicReference() }
+ private val lastCarLocation by lazy { AtomicReference>() }
- private val lastGpsLocation by lazy { AtomicReference() }
+ private val lastGpsLocation by lazy { AtomicReference>() }
private val checkTask = object : Runnable {
@@ -83,21 +83,22 @@ object MarkerManager {
}
Log.d(TAG, "--- checkTask --- 3 ---")
val toRemove = toRemoveMakers.iterator()
- val carLoc = AtomicReference()
+ val carLoc = AtomicReference()
while (toRemove.hasNext()) {
val marker = toRemove.next()
if (carLoc.get() == null) {
carLoc.set(if (marker.coordinateType == 0) {
//高德坐标
- CallerMapLocationListenerManager.getCurrentLocation()
+ CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
} else {
- CallerMapLocationListenerManager.getCurrentGpsLocation()
+ //高精坐标
+ CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
})
}
val currentLocation = carLoc.get()
val lastLocation = if (marker.coordinateType == 0) lastCarLocation.get() else lastGpsLocation.get()
if (currentLocation != null && lastLocation != null) {
- val delta = CoordinateUtils.calculateLineDistance(currentLocation.longitude, currentLocation.latitude, lastLocation.longitude, lastLocation.latitude)
+ val delta = CoordinateUtils.calculateLineDistance(currentLocation.longitude, currentLocation.latitude, lastLocation.first, lastLocation.second)
Log.d(TAG, "--- checkTask --- 4 ---:delta:$delta, id:${marker.id}")
var elapsed = elapsedDistances[marker]
if (elapsed == null) {
@@ -148,14 +149,15 @@ object MarkerManager {
if (carLoc.get() == null) {
carLoc.set(if (marker.coordinateType == 0) {
//高德坐标
- CallerMapLocationListenerManager.getCurrentLocation()
+ CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
} else {
- CallerMapLocationListenerManager.getCurrentGpsLocation()
+ //高精坐标
+ CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
})
}
val location = carLoc.get()
if (location != null) {
- val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(location.longitude, location.latitude, marker.lon, marker.lat, location.bearing.toDouble())
+ val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(location.longitude, location.latitude, marker.lon, marker.lat, location.heading)
if (angle >= 90) {
iterator.remove()
synchronized(toRemoveMakers) {
@@ -167,8 +169,10 @@ object MarkerManager {
} catch (t: Throwable) {
t.printStackTrace()
} finally {
- lastCarLocation.set(CallerMapLocationListenerManager.getCurrentLocation())
- lastGpsLocation.set(CallerMapLocationListenerManager.getCurrentGpsLocation())
+ val gcInfo = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
+ lastCarLocation.set((gcInfo?.longitude ?: 0.0) to (gcInfo?.latitude ?: 0.0))
+ val wgsInfo = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
+ lastGpsLocation.set((wgsInfo?.longitude ?: 0.0) to (wgsInfo?.latitude ?: 0.0))
handler.postDelayed(this, 1000)
}
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java
index 1928101ce5..1f43cac2e9 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java
@@ -13,7 +13,6 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenarioManager;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.road.V2XRoadEventScenario;
-import com.mogo.eagle.core.function.v2x.events.scenario.scene.route.V2XOptimalRouteVREventScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.warning.V2XFrontWarningScenario;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
@@ -21,7 +20,6 @@ import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.map.uicontroller.VisualAngleMode;
-import java.util.concurrent.atomic.AtomicReference;
/**
* author : donghongyu
@@ -68,10 +66,6 @@ public class V2XScenarioManager implements IV2XScenarioManager {
case V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING:
mV2XScenario = new V2XRoadEventScenario();
break;
- case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW:
- sceneChange();
- mV2XScenario = new V2XOptimalRouteVREventScenario();
- break;
case V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS:
if (HmiBuildConfig.isShowCloudWeaknessTrafficView) { //默认关闭云端弱势交通
sceneChange();
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt
index b653876cc6..e1eb7d8be3 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt
@@ -10,6 +10,7 @@ import com.mogo.cloud.commons.utils.*
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
+import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.function.v2x.events.scenario.scene.road.V2XAiRoadEventMarker
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
@@ -17,14 +18,11 @@ import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
import com.mogo.map.MogoMap
import com.mogo.map.overlay.IMogoPolyline
import com.mogo.map.overlay.MogoPolylineOptions
-import mogo.telematics.pad.MessagePad
import java.util.*
-import java.util.concurrent.Executors
-import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.atomic.AtomicReference
import java.util.concurrent.ConcurrentHashMap
-import com.mogo.eagle.core.function.v2x.events.marker.MarkerManager
-import com.mogo.eagle.core.function.v2x.events.marker.MarkerWrapper
+import com.mogo.eagle.core.function.v2x.events.remove.MarkerRemoveManager
+import com.mogo.eagle.core.function.v2x.events.remove.MarkerWrapper
/**
* Ai云道路施工事件,道路颜色标记类
@@ -61,7 +59,7 @@ class AiRoadMarker {
private val checkExpiredTask = Runnable {
val poi = this.marker.get()
- val car = CallerMapLocationListenerManager.getCurrentGpsLocation()
+ val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
if (poi != null && car != null) {
val distance = CoordinateUtils.calculateLineDistance(car.longitude, car.latitude, poi.poi_lon, poi.poi_lat)
if (distance < 500) {
@@ -80,7 +78,7 @@ class AiRoadMarker {
}
fun marker(marker: Marker, drawMarker: Boolean, drawRoadLine: Boolean = false) {
- val location = CallerMapLocationListenerManager.getCurrentGpsLocation() ?: return
+ val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() ?: return
this.marker.set(marker)
val wrapper = MarkerWrapper(marker.id, marker.poi_lon, marker.poi_lat, 1, null, null)
if (drawMarker) {
@@ -88,10 +86,10 @@ class AiRoadMarker {
}
if (drawRoadLine) {
//施工中心点前方的自车行驶方向上300米距离
- val l1 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(marker.poi_lon, marker.poi_lat, location.bearing, 300f)
+ val l1 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(marker.poi_lon, marker.poi_lat, location.heading.toFloat(), 300f)
//施工中心点后方的自车行驶方向上300米距离
Logger.d(TAG, "--- marker --- 3 --- l1: $l1")
- val l2 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(marker.poi_lon, marker.poi_lat, location.bearing, -300f)
+ val l2 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(marker.poi_lon, marker.poi_lat, location.heading.toFloat(), -300f)
if (l1.points.isEmpty() || l2.points.isEmpty()) {
Logger.d(TAG, "--- marker --- 3 --- return ----")
return
@@ -110,7 +108,7 @@ class AiRoadMarker {
var find: Pair = Pair(centerX, centerY)
var min = Long.MAX_VALUE
for (p in it) {
- val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(centerX, centerY, p.first, p.second, location.bearing.toDouble())
+ val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(centerX, centerY, p.first, p.second, location.heading)
if (angle < min) {
min = angle
find = p
@@ -122,7 +120,7 @@ class AiRoadMarker {
Logger.d(TAG, "--- marker --- 6 --- marker: $marker")
if (l1 != null && l1.points.isNotEmpty()) {
for (l in l1.points) {
- if (DrivingDirectionUtils.getDegreeOfCar2Poi2(farthestPoint.lon, farthestPoint.lat, l.first, l.second, (location.bearing + 180).toDouble()) < 90L) {
+ if (DrivingDirectionUtils.getDegreeOfCar2Poi2(farthestPoint.lon, farthestPoint.lat, l.first, l.second, (location.heading + 180)) < 90L) {
points.add(l.let { MogoLatLng(it.second, it.first) })
}
}
@@ -155,7 +153,7 @@ class AiRoadMarker {
wrapper.addLine(line)
}
}
- MarkerManager.addMarker(wrapper)
+ MarkerRemoveManager.addMarker(wrapper)
}
private fun removeLine() {
@@ -180,7 +178,7 @@ class AiRoadMarker {
fun receive() {
Logger.d(TAG, "receive --- 1 ---")
val poi = this.marker.get()
- val car = CallerMapLocationListenerManager.getCurrentGpsLocation()
+ val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
if (poi != null && car != null) {
val distance = CoordinateUtils.calculateLineDistance(car.longitude, car.latitude, poi.poi_lon, poi.poi_lat)
Logger.d(TAG, "receive --- 2 ---:car:[${car.longitude}, ${car.latitude}] -> poi:[${poi.poi_lon}, ${poi.poi_lat}] --> distance:$distance")
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt
index 563aada462..1ad84664da 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt
@@ -6,7 +6,7 @@ import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.v2xMarker
-import com.mogo.eagle.core.function.v2x.events.marker.MarkerWrapper
+import com.mogo.eagle.core.function.v2x.events.remove.MarkerWrapper
import com.mogo.map.*
import com.mogo.map.marker.*
import com.mogo.map.overlay.*
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java
index 4de55a0c84..a743246918 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java
@@ -10,8 +10,8 @@ import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
-import com.mogo.eagle.core.function.v2x.events.marker.MarkerWrapper;
-import com.mogo.eagle.core.function.v2x.events.marker.MarkerManager;
+import com.mogo.eagle.core.function.v2x.events.remove.MarkerWrapper;
+import com.mogo.eagle.core.function.v2x.events.remove.MarkerRemoveManager;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.map.marker.IMogoMarker;
@@ -44,7 +44,7 @@ public class V2XRoadEventMarker implements IV2XMarker {
ArrayList markers = new ArrayList<>();
markers.add(iMarker);
String id = entity.getLocation().getLon() + "_" + entity.getLocation().getLat();
- MarkerManager.INSTANCE.addMarker(new MarkerWrapper(id, entity.getLocation().getLon(), entity.getLocation().getLat(), 0, markers, null));
+ MarkerRemoveManager.INSTANCE.addMarker(new MarkerWrapper(id, entity.getLocation().getLon(), entity.getLocation().getLat(), 0, markers, null));
} else {
Log.d("RWJ", "V2XRoadEventMarker:" + entity.getPoiType() + "--- return empty marker");
}
@@ -101,20 +101,4 @@ public class V2XRoadEventMarker implements IV2XMarker {
private boolean isDrawRoadLine(String poiType) {
return EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.getPoiType().equals(poiType);
}
-
- @Override
- public void clearPOI() {
- // 移除线
-// IMoGoV2XPolylineManager polyLineManager = BridgeApi.INSTANCE.v2xPolyline();
-// if (polyLineManager != null) {
-// polyLineManager.clearLine();
-// }
-// IMoGoV2XMarkerManager v2xMarker = BridgeApi.INSTANCE.v2xMarker();
-// if (v2xMarker != null) {
-// // 移除事件POI
-// v2xMarker.clearAlarmPOI();
-// // 绘制上次的数据
-// v2xMarker.drawableLastAllPOI();
-// }
- }
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java
index 5441044185..7585e7f6c8 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java
@@ -1,14 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.scenario.scene.road;
-
-
-import android.util.Log;
-
-import com.mogo.cloud.commons.utils.CoordinateUtils;
-import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
-import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
@@ -18,21 +11,16 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType;
import com.mogo.eagle.core.data.msgbox.V2XMsg;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
-import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
-import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
-import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.eagle.core.network.utils.GsonUtil;
-import java.util.HashMap;
-import java.util.Map;
+import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
-
/**
* author : donghongyu
* e-mail : 1358506549@qq.com
@@ -50,7 +38,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp
@Override
public void init(V2XMessageEntity v2XMessageEntity) {
try {
- Log.d(TAG, "v2XMessageEntity:" + GsonUtil.jsonFromObject(v2XMessageEntity));
+ Logger.d(TAG, "v2XMessageEntity:" + GsonUtil.jsonFromObject(v2XMessageEntity));
V2XRoadEventEntity v2XRoadEventEntity = v2XMessageEntity.getContent();
if (v2XRoadEventEntity != null) {
if (v2XMessageEntity.isShowState()) {
@@ -89,18 +77,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp
}
}
showWindow();
- String poiType = entity.getContent().getPoiType();
- String lat = String.valueOf(entity.getContent().getLocation().getLat());
- String lon = String.valueOf(entity.getContent().getLocation().getLon());
- String infoId = entity.getContent().getNoveltyInfo().getInfoId();
- String style = "1";
- Map properties = new HashMap<>();
- properties.put("dbid", infoId);
- properties.put("type", poiType);
- properties.put("lng", lon);
- properties.put("lat", lat);
- properties.put("style", style);
- AnalyticsUtils.track(V2XConst.V2X_ROAD_SHOW, properties);
}
} catch (Exception e) {
e.printStackTrace();
@@ -116,16 +92,15 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp
String ttsText = content.getTts();
if (alarmText == null || alarmText.isEmpty()
|| ttsText == null || ttsText.isEmpty()) {
- Log.d("MsgBox-V2XRoadScenario", "alertContent或ttsContent为空!");
+ Logger.d("MsgBox-V2XRoadScenario", "alertContent或ttsContent为空!");
}
String poiType = content.getPoiType();
if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.getPoiType().equals(poiType) ||
EventTypeEnumNew. TYPE_SOCKET_ROAD_JINGZHI.getPoiType().equals(poiType) ||
EventTypeEnumNew.TYPE_SOCKET_ROAD_CONGESTION.getPoiType().equals(poiType) ||
EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(poiType)) {
- MogoLocation carLocation = CallerMapLocationListenerManager.INSTANCE.getCurrentLocation();
MarkerExploreWay noveltyInfo = content.getNoveltyInfo();
- if (carLocation != null && noveltyInfo != null) {
+ if (noveltyInfo != null) {
MarkerLocation eventLocation = noveltyInfo.getLocation();
if (eventLocation != null) {
double distance = content.getDistance();
@@ -154,7 +129,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp
IV2XMarker marker = getV2XMarker();
if (marker != null) {
// 重置告警信息
- V2XStatusManager.getInstance().setAlarmInfo(getV2XMessageEntity().getContent());
marker.drawPOI(getV2XMessageEntity().getContent());
}
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventMarker.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventMarker.java
deleted file mode 100644
index e2e6c77c1f..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventMarker.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.scenario.scene.route;
-
-import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
-
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
-import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
-import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
-import com.mogo.eagle.core.function.v2x.events.observer.V2XOptimalRouteObserver;
-import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
-import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/5/15 5:37 PM
- * desc : 推送VR场景
- * version: 1.0
- */
-public class V2XOptimalRouteVREventMarker implements IV2XMarker {
- private final String TAG = "V2XPushVREventMarker";
-
- @Override
- public void drawPOI(V2XOptimalRouteDataRes entity) {
- CallerLogger.INSTANCE.d(M_V2X + TAG, "drawPOI 绘制VR Marker");
-
- try {
- // 清除道路事件
- IMoGoV2XMarkerManager v2xMarker = BridgeApi.INSTANCE.v2xMarker();
- if (v2xMarker != null) {
- v2xMarker.clearAlarmPOI();
- }
- // 绘制引导线
- V2XOptimalRouteObserver.getInstance()
- .setPolylinePoint(entity.getGd_locus_list());
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- @Override
- public void clearPOI() {
-// // 移除线
-// clearLine();
-// // 绘制上次的数据
-// IMoGoV2XMarkerManager v2xMarker = BridgeApi.INSTANCE.v2xMarker();
-// if (v2xMarker != null) {
-// v2xMarker.drawableLastAllPOI();
-// }
- }
-
- public void clearLine() {
- V2XOptimalRouteObserver.getInstance().setPolylinePoint(null);
- }
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java
deleted file mode 100644
index 2e38a64747..0000000000
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.mogo.eagle.core.function.v2x.events.scenario.scene.route;
-
-import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
-
-import androidx.annotation.Nullable;
-
-import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
-import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
-import com.mogo.eagle.core.data.msgbox.MsgBoxType;
-import com.mogo.eagle.core.data.msgbox.V2XMsg;
-import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
-import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
-import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
-import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
-import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
-import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
-import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
-import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
-import com.mogo.eagle.core.network.utils.GsonUtil;
-
-import java.util.concurrent.TimeUnit;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/5/15 5:37 PM
- * desc : 最优车道选择
- * version: 1.0
- * wiki : http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=52829799
- */
-public class V2XOptimalRouteVREventScenario
- extends AbsV2XScenario
- implements IMoGoWarningStatusListener {
- private String TAG = "V2XPushVREventWindow";
-
- public V2XOptimalRouteVREventScenario() {
- setV2XMarker(new V2XOptimalRouteVREventMarker());
- }
-
- @Override
- public void init(@Nullable V2XMessageEntity v2XMessageEntity) {
- CallerLogger.INSTANCE.w(M_V2X + TAG, "处理推送VR:" + GsonUtil.jsonFromObject(v2XMessageEntity));
- if (!isSameScenario(v2XMessageEntity)) {
- setV2XMessageEntity(v2XMessageEntity);
- show();
- } else {
- setV2XMessageEntity(v2XMessageEntity);
- show();
- CallerLogger.INSTANCE.w(M_V2X + TAG, "要处理的场景已经存在,丢弃这次初始化");
- }
- }
-
- @Override
- public void show() {
- V2XMessageEntity entity = getV2XMessageEntity();
- if (entity != null) {
- V2XOptimalRouteDataRes content = entity.getContent();
- if (content != null) {
- CallerMsgBoxManager.INSTANCE.saveMsgBox(
- new MsgBoxBean(
- MsgBoxType.V2X,
- new V2XMsg(entity.getType() + "",
- "为您推荐最优路线",
- "已为您选择最优路线")
- )
- );
- CallerHmiManager.INSTANCE.warningV2X(entity.getType() + "",
- "为您推荐最优路线", "已为您选择最优路线", TAG,
- this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30));
- }
- }
- }
-
- @Override
- public void drawPOI() {
- IV2XMarker marker = getV2XMarker();
- if (marker != null) {
- marker.drawPOI(getV2XMessageEntity().getContent());
- IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus();
- if (v2xStatus != null) {
- v2xStatus.setPushPOIShow(TAG, true);
- }
- }
- }
-
- @Override
- public void clearPOI() {
-// if (getV2XMarker() != null) {
-// getV2XMarker().clearPOI();
-// }
-// IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus();
-// if (v2xStatus != null) {
-// v2xStatus.setPushPOIShow(TAG, false);
-// }
- }
-
- @Override
- public void onShow() {
- drawPOI();
- }
-
- @Override
- public void onDismiss() {
- }
-}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java
index 85dc9db343..549e56d19f 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java
@@ -7,9 +7,7 @@ import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
-
import androidx.annotation.Nullable;
-
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java
index fe3932017b..5bd251ea4e 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java
@@ -2,9 +2,7 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.warning;
import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
-import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_FRONT_WARNING_MARKER;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
-
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.module.status.MogoStatusManager;
@@ -26,12 +24,10 @@ import com.mogo.map.overlay.IMogoPolyline;
import com.mogo.commons.utils.Trigonometric;
import com.mogo.eagle.core.function.v2x.internal.data.V2XLocation;
import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
-
import mogo.telematics.pad.MessagePad;
/**
@@ -446,19 +442,4 @@ public class V2XWarningMarker implements IV2XMarker {
}
CallerLogger.INSTANCE.d(M_V2X + TAG, "车辆行驶轨迹" + latLng.getLongitude() + "," + latLng.getLatitude());
}
-
- @Override
- public void clearPOI() {
- IMogoMarkerManager marker = CallerMapUIServiceManager.INSTANCE.getMarkerManager(AbsMogoApplication.getApp());
- if (marker != null) {
- marker.removeMarkers(V2X_FRONT_WARNING_MARKER);
- }
- }
-
- public void clearLine() {
- IMoGoWarnPolylineManager warnPolylineManager = BridgeApi.INSTANCE.v2xWarnPolyline();
- if (warnPolylineManager != null) {
- warnPolylineManager.clearLine();
- }
- }
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/view/IV2XMarker.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/view/IV2XMarker.java
index 5540ad2f79..8dcf008880 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/view/IV2XMarker.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/view/IV2XMarker.java
@@ -10,7 +10,4 @@ package com.mogo.eagle.core.function.v2x.events.scenario.view;
public interface IV2XMarker {
void drawPOI(T entity);
-
- void clearPOI();
-
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/test/TestOnLineCarUtils.java
similarity index 99%
rename from core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java
rename to core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/test/TestOnLineCarUtils.java
index 62c8a64efa..0070ffbed8 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/test/TestOnLineCarUtils.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.v2x.events.utils;
+package com.mogo.eagle.core.function.v2x.events.test;
import static com.mogo.eagle.core.data.map.entity.V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/test/TestV2XReceiver.java
similarity index 87%
rename from core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java
rename to core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/test/TestV2XReceiver.java
index 59d5471e0f..70c5eae7c3 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/test/TestV2XReceiver.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.v2x.events.receiver;
+package com.mogo.eagle.core.function.v2x.events.test;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -12,7 +12,6 @@ import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
-import com.mogo.eagle.core.function.v2x.events.utils.TestOnLineCarUtils;
import java.util.List;
@@ -21,8 +20,8 @@ import java.util.List;
*
* @author donghongyu
*/
-public class TestPanelBroadcastReceiver extends BroadcastReceiver {
- private static final String TAG = V2XConst.MODULE_NAME + "_TestPanelBroadcastReceiver";
+public class TestV2XReceiver extends BroadcastReceiver {
+ private static final String TAG = "TestV2XReceiver";
private Context mContext;
@@ -74,11 +73,7 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, messageEntity);
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
- } /*else if (sceneType == 16) {//触发基于目的地预测的线路推荐
- V2XRefreshModel model = BridgeApi.INSTANCE.refreshModel();
- model.
- V2XServiceManager.getV2XRefreshModel().queryRoadData("F803EB2046PZD00149");
- } */ else if (sceneType == 17) {//最优路线推荐
+ } else if (sceneType == 17) {//最优路线推荐
V2XMessageEntity v2XMessageEntity =
TestOnLineCarUtils.getV2XOptimalRoute();
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TrackUtils.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TrackUtils.java
index 87bf002efa..7d7f1a2244 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TrackUtils.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TrackUtils.java
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.v2x.events.utils;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
-import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
import java.util.HashMap;
import java.util.Map;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XMarkerRoadEventView.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XMarkerRoadEventView.kt
index 1b3e41053c..c9d1589194 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XMarkerRoadEventView.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XMarkerRoadEventView.kt
@@ -5,10 +5,10 @@ import android.content.Context
import android.graphics.Bitmap
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
+import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.v2x.R
import com.mogo.eagle.core.utilcode.util.ViewUtils
-import com.mogo.eagle.core.data.enums.EventTypeEnum
import kotlinx.android.synthetic.main.view_marker_event_car.view.*
/**
@@ -33,8 +33,8 @@ class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
}
fun initView(context: Context, alarmInfo: V2XRoadEventEntity) {
- if (alarmInfo.poiType == EventTypeEnum.ALERT_FRONT_CAR.poiType ||
- alarmInfo.poiType == EventTypeEnum.ALERT_CAR_TROUBLE_WARNING.poiType
+ if (alarmInfo.poiType == EventTypeEnumNew.ALERT_FRONT_CAR.poiType ||
+ alarmInfo.poiType == EventTypeEnumNew.ALERT_CAR_TROUBLE_WARNING.poiType
) {
LayoutInflater.from(context)
.inflate(R.layout.view_marker_event_car, this)
@@ -46,11 +46,11 @@ class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
}
/**
- * @see EventTypeEnum
+ * @see EventTypeEnumNew
*/
private fun updateIcon(alarmInfo: V2XRoadEventEntity) {
// 道路施工、积水、路面结冰、浓雾、事故、拥堵
- val iconResId = EventTypeEnum.getUpdateIconRes(alarmInfo.poiType)
+ val iconResId = EventTypeEnumNew.getUpdateIconRes(alarmInfo.poiType)
if (iconResId != 0) {
ivCar.setImageResource(iconResId)
}
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/EnvConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/EnvConfig.kt
new file mode 100644
index 0000000000..817b76ee90
--- /dev/null
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/EnvConfig.kt
@@ -0,0 +1,3 @@
+package com.mogo.eagle.core.data
+
+data class EnvConfig(val cityCode: String, val netMode: Int, val lat: Double, val lon: Double)
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/CloudPoiManager.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/CloudPoiManager.java
index 7bb1b06c72..1359dd3e6b 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/CloudPoiManager.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/CloudPoiManager.java
@@ -6,7 +6,6 @@ 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;
@@ -39,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(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.getPoiType(), new PoiWrapper(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.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",
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java
index 1472bca2d5..4bade961f8 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java
@@ -74,4 +74,10 @@ public class MogoServicePaths {
@Keep
public static final String PATH_MSG_BOX_MODULE = "/msg_box/api";
+
+ @Keep
+ public static final String PATH_STARTUP_PROVIDER = "/start_up/api";
+
+ @Keep
+ public static final String PATH_DATA_CENTER_MODULE = "/data_center/api";
}
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/DataSourceType.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/DataSourceType.kt
new file mode 100644
index 0000000000..7cc8ddb8fa
--- /dev/null
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/DataSourceType.kt
@@ -0,0 +1,11 @@
+package com.mogo.eagle.core.data.enums
+
+enum class DataSourceType(name: String) {
+ DEFAULT("defalut"),
+ OBU("OBU"),
+ MAP("MAP"),
+ TELEMATIC("TELEMATIC"),
+ AICLOUD("AI云"),
+ SUMMARY("汇总")// V2X事件汇总
+
+}
\ No newline at end of file
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt
deleted file mode 100644
index e291c91433..0000000000
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt
+++ /dev/null
@@ -1,894 +0,0 @@
-package com.mogo.eagle.core.data.enums
-
-import com.mogo.eagle.core.data.R
-import com.mogo.eagle.core.data.config.CloudPoiManager
-
-
-
-/**
- * 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 = ""
-) {
-
- //交通检查
- TRAFFIC_CHECK(
- "10002", "交通检查", "前方交通检查",
- R.drawable.v2x_icon_jiaotongjiancha_vr, "前方交通检查", "交通检查"
- ),
-
- //封路
- ROAD_CLOSED(
- "10003", "封路", "前方封路", R.drawable.v2x_icon_fenglu_vr,
- "前方封路", "道路封路"
- ),
-
- //施工
- FOURS_ROAD_WORK(
- "10006", "道路施工", "道路施工", R.drawable.icon_warning_v2x_road_construction,
- "道路施工", "道路施工"
- ),
-
- //施工-AI云下发
- AI_ROAD_WORK(
- "100061", "道路施工", "道路施工", R.drawable.icon_warning_v2x_road_construction,
- "道路施工", "道路施工"
- ),
-
- //拥堵
- FOURS_BLOCK_UP(
- "10007", "道路拥堵", "前方拥堵", R.drawable.icon_warning_v2x_congestion,
- "前方道路拥堵", "道路拥堵"
- ),
-
- //积水
- FOURS_PONDING(
- "10008", "道路积水", "前方道路积水", R.drawable.v2x_icon_jishui_vr,
- "前方道路积水", "道路积水"
- ),
-
- //浓雾
- FOURS_FOG(
- "10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr,
- "前方出现浓雾", "出现浓雾"
- ),
-
- //结冰
- FOURS_ICE(
- "10011", "路面结冰", "路面结冰", R.drawable.v2x_icon_jiebing_vr,
- "前方路面结冰", "路面结冰"
- ),
-
- //事故
- 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_LIVING("10015", "实时路况"),
-
- //违章停车
- ILLEGAL_PARK_LIVING("10016"),
-
- //路面湿滑
- ROAD_SLIPPERY("10021"),
-
- //鬼探头类型
- 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"),
-
- // 限行管理
- 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"),
-
- TYPE_USECASE_ID_EBW(
- 0x2A01.toString(),
- "紧急制动预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_emergency_brake,
- content = "前车急刹车",
- tts = "前车急刹车"
- ),
- TYPE_USECASE_ID_FCW(
- 0x2A02.toString(),
- "前向碰撞预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
- content = "前车碰撞预警",
- tts = "小心前车"
- ),
- TYPE_USECASE_ID_ICW(
- 0x2A03.toString(),
- "交叉路口碰撞预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
- content = "交叉路口碰撞预警",
- tts = "注意交叉路口车辆"
- ),
- TYPE_USECASE_ID_CLW(
- 0x2A04.toString(),
- "车辆失控预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_vehicle_control,
- content = "前%s失控预警",
- tts = "小心%s失控车辆"
- ),
- TYPE_USECASE_ID_DNPW(
- 0x2A05.toString(),
- "逆向超车预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking,
- content = "逆向超车预警",
- tts = "注意对向来车"
- ),
- TYPE_USECASE_ID_AVW(
- 0x2A06.toString(),
- "异常车辆提醒",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
- content = "%s车异常",
- tts = "小心%s异常车辆"
- ),
- TYPE_USECASE_ID_BSW(
- 0x2A07.toString(),
- "盲区预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_blind_area_collision,
- content = "%s后盲区预警",
- tts = "注意%s后车辆"
- ),
- TYPE_USECASE_ID_LCW(
- 0x2A08.toString(),
- "变道预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking,
- content = "%s向变道预警",
- tts = "注意%s后车辆"
- ),//注意左后车辆/注意右后车辆
- TYPE_USECASE_ID_EVW(
- 0x2A09.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(
- 0x2B04.toString(),
- "限速预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_over_speed,
- content = "已超速",
- tts = "已超速"
- ),
- TYPE_USECASE_ID_LTA(
- 0x2B05.toString(),
- "左转辅助",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
- content = "左转碰撞预警",
- tts = "注意路口对向来车"
- ),
- TYPE_USECASE_ID_HLW(
- 0x2B06.toString(),
- "道路危险情况预警",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_road_dangerous,
- content = "道路危险情况预警",
- tts = "前方路况危险,小心行驶"
- ),//(如果能给出具体的类别,则播报具体危险类别)
- TYPE_USECASE_OPTIMAL_LANE(
- 0x2B06.toString(),
- "最优车道",
- poiTypeSrcVr = R.drawable.v2x_icon_live_logo,
- content = "最优车道",
- tts = "最优车道"
- ),
- TYPE_USECASE_ID_IVS(
- 0x2B07.toString(),
- "车内标牌",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_road_construction,
- content = "车内标牌",
- tts = ""
- ),
- TYPE_USECASE_ID_TJW(
- 0x2B08.toString(),
- "前方拥堵提醒",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_congestion,
- content = "前方%d米道路拥堵",
- tts = "前方拥堵,减速慢行"
- ),
- TYPE_USECASE_ID_IVP(
- 0x2B09.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 KM/H"
- ),
- TYPE_USECASE_ID_COC(
- 0x2B0A.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(
- "-1",
- "未知/错误/异常",
- poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
- content = "",
- tts = ""
- ),
-
- 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, "为您推荐最优路线", "已为您选择最优路线");
-
-
- companion object {
- @JvmStatic
- fun getPoiTypeStr(poiType: String): String {
- // 先获取网络配置的poi对应的名称
- CloudPoiManager.getInstance().getWrapperByPoiType(poiType)?.let {
- return it.title
- }
- // 如果获取不到,那么就用本地默认的
- return when (poiType) {
- TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStr
- ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStr
- FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
- AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeStr
- FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
- FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
- FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
- FOURS_ICE.poiType -> FOURS_ICE.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_LIVING.poiType -> FOURS_LIVING.poiTypeStr
- GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeStr
- else -> "其它道路事件"
- }
- }
-
- @JvmStatic
- fun getPoiTypeStrVr(poiType: String): String {
- return when (poiType) {
- TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStrVr
- ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStrVr
- FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
- AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeStrVr
- FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
- FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
- FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
- FOURS_ICE.poiType -> FOURS_ICE.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_LIVING.poiType -> FOURS_LIVING.poiTypeStrVr
- GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeStrVr
- else -> "其它道路事件"
- }
- }
-
- @JvmStatic
- fun getPoiTypeSrcVr(poiType: String): Int {
- return when (poiType) {
- TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeSrcVr
- ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeSrcVr
- FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
- AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeSrcVr
- FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
- FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
- FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
- FOURS_ICE.poiType -> FOURS_ICE.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_LIVING.poiType -> FOURS_LIVING.poiTypeSrcVr
- else -> R.drawable.v2x_icon_live_logo
- }
- }
-
- /**
- * 获取道路事件的背景色
- */
- @JvmStatic
- fun getPoiTypeBg(poiType: String, isVrMode: Boolean): Int {
- return when (poiType) {
- FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType-> if (isVrMode) R.drawable.bg_v2x_event_type_orange_vr else R.drawable.bg_v2x_event_type_orange
- TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType, AI_ROAD_WORK.poiType,
- 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_BLOCK_UP.poiType, FOURS_LIVING.poiType ->
- R.drawable.bg_v2x_event_type_orange
- TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
- FOURS_ROAD_WORK.poiType, AI_ROAD_WORK.poiType, FOURS_PONDING.poiType,
- FOURS_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, AI_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType,
- FOURS_PONDING.poiType, FOURS_FOG.poiType,
- FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
- FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
- FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
- FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType, AI_ROAD_WORK.poiType -> true
- else -> false
- }
- }
-
- /**
- * 是否需要UGC预警
- */
- @JvmStatic
- fun isNeedRoadEventUgc(poiType: String?): Boolean {
- return when (poiType) {
- ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType, AI_ROAD_WORK.poiType,
- FOURS_BLOCK_UP.poiType, FOURS_ACCIDENT.poiType,
- FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
- FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
- FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType -> true
- else -> false
- }
- }
-
-
- @JvmStatic
- fun getTts(poiType: String?): String {
- return when (poiType) {
- TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.tts
- ROAD_CLOSED.poiType -> ROAD_CLOSED.tts
- FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
- AI_ROAD_WORK.poiType -> AI_ROAD_WORK.tts
- FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.tts
- FOURS_PONDING.poiType -> FOURS_PONDING.tts
- FOURS_FOG.poiType -> FOURS_FOG.tts
- 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) {
- TRAFFIC_CHECK.poiType -> "交通检查"
- ROAD_CLOSED.poiType -> "封路"
- FOURS_ROAD_WORK.poiType -> "施工"
- AI_ROAD_WORK.poiType -> "施工"
- FOURS_BLOCK_UP.poiType -> "道路拥堵"
- FOURS_PONDING.poiType -> "道路积水"
- FOURS_FOG.poiType -> "出现浓雾"
- FOURS_ICE.poiType -> "路面结冰"
- FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
- FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
- else -> "道路事件"
- }
- }
-
- @JvmStatic
- fun getAlarmContent(poiType: String?): String {
- return when (poiType) {
- TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.content
- ROAD_CLOSED.poiType -> ROAD_CLOSED.content
- FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
- AI_ROAD_WORK.poiType -> AI_ROAD_WORK.content
- FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.content
- FOURS_PONDING.poiType -> FOURS_PONDING.content
- FOURS_FOG.poiType -> FOURS_FOG.content
- 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
- GHOST_PROBE.poiType -> GHOST_PROBE.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
- AI_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_small
- FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_small
- FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_small
- FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_small
- 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
- AI_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_nor
- FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_nor
- FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_nor
- FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_nor
- 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 -> "施工"
- AI_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,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
- FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
- AI_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
- FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
- FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
- GHOST_PROBE.poiType -> R.raw.v2x_guzhangqiuzhu
- 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 -> "施工"
- AI_ROAD_WORK.poiType -> "施工"
- FOURS_PONDING.poiType -> "道路积水"
- else -> "实时路况"
- }
- }
-
- @JvmStatic
- fun getUpdateIconRes(poiType: String?): Int {
- return when (poiType) {
- //交通检查
- TRAFFIC_CHECK.poiType -> {
- R.drawable.v2x_icon_jiaotongjiancha_vr
- }
- //封路
- ROAD_CLOSED.poiType -> {
- R.drawable.v2x_icon_fenglu_vr
- }
- //施工
- FOURS_ROAD_WORK.poiType -> {
- R.drawable.icon_warning_v2x_road_construction
- }
- //AI施工
- AI_ROAD_WORK.poiType -> {
- R.drawable.icon_warning_v2x_road_construction
- }
- //拥堵
- FOURS_BLOCK_UP.poiType -> {
- R.drawable.icon_warning_v2x_congestion
- }
- //积水
- FOURS_PONDING.poiType -> {
- R.drawable.v2x_icon_jishui_vr
- }
- //浓雾
- FOURS_FOG.poiType -> {
- R.drawable.v2x_icon_nongwu_vr
- }
- //结冰
- FOURS_ICE.poiType -> {
- R.drawable.v2x_icon_jiebing_vr
- }
- //事故
- FOURS_ACCIDENT.poiType -> {
- 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 -> {
- 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
- }
- //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
- }
- //鬼探头类型
- GHOST_PROBE.poiType -> {
- R.drawable.icon_warning_v2x_pedestrian_crossing
- }
- //接管
- TAKE_OVER_EVENT.poiType -> {
- R.drawable.icon_warning_take_over
- }
- else -> {
- R.drawable.icon_default
- }
- }
- }
-
- //===================告警类事件===================
-
- @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_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
- AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeSrcVr
- else -> TYPE_ERROR.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_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
- TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.content
- GHOST_PROBE.poiType -> GHOST_PROBE.content
- else -> TYPE_ERROR.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_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
- TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.tts
- GHOST_PROBE.poiType -> GHOST_PROBE.tts
- else -> TYPE_ERROR.tts
- }
- }
- }
-}
\ No newline at end of file
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt
index 6de86e6a02..3579d55ea4 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt
@@ -106,6 +106,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"),
@@ -494,8 +500,9 @@ enum class EventTypeEnumNew(
tts = ""
),
- TYPE_VIP_IDENTIFICATION("10022", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行", "已为您变灯,请优先通行"),
-
+ TYPE_VIP_IDENTIFICATION_PASS("20022", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行,已为您变为绿灯", "VIP车辆优先通行,已为您变为绿灯"),
+ TYPE_VIP_IDENTIFICATION_EXTEND("20023", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行,已为您延长绿灯", "VIP车辆优先通行,已为您延长绿灯"),
+ TYPE_VIP_ERROR_IDENTIFICATION("20024", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "请求失败,", "请求失败,稍后重试"),
TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线");
@@ -547,6 +554,22 @@ enum class EventTypeEnumNew(
}
}
+ @JvmStatic
+ fun getTtsWithFeedback(poiType: String?): String {
+ 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 -> "交通事故"
+ else -> "道路事件"
+ }
+ }
+
@JvmStatic
fun getPoiTypeSrcVr(poiType: String): Int {
return when (poiType) {
@@ -669,7 +692,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
@@ -690,15 +713,15 @@ 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施工
TYPE_SOCKET_ROAD_SHIGONG.poiType -> R.drawable.icon_warning_v2x_road_construction
@@ -707,23 +730,43 @@ enum class EventTypeEnumNew(
TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.drawable.v2x_icon_yongdu_vr
//拥堵
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 -> {
@@ -745,16 +788,38 @@ 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
}
-
+ //闯红灯预警
+ TYPE_USECASE_ID_IVP_RED.poiType -> {
+ R.drawable.icon_warning_v2x_traffic_lights_red
+ }
+ //鬼探头类型
+ 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
@@ -812,7 +877,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
@@ -820,7 +885,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
@@ -876,7 +942,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
@@ -884,7 +950,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
TYPE_SOCKET_ROAD_SHIGONG.poiType -> TYPE_SOCKET_ROAD_SHIGONG.content
TYPE_SOCKET_ROAD_JINGZHI.poiType -> TYPE_SOCKET_ROAD_JINGZHI.content
@@ -942,7 +1009,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
@@ -950,7 +1017,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
TYPE_SOCKET_ROAD_SHIGONG.poiType -> TYPE_SOCKET_ROAD_SHIGONG.tts
TYPE_SOCKET_ROAD_JINGZHI.poiType -> TYPE_SOCKET_ROAD_JINGZHI.tts
@@ -1014,5 +1082,4 @@ enum class EventTypeEnumNew(
}
}
}
-
}
\ No newline at end of file
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeHelper.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeHelper.kt
index 8f8cd1ff35..b1da3cc519 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeHelper.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeHelper.kt
@@ -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())
)
}
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java
index 0bd2dab8fd..2c2b3a4e5a 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java
@@ -1,9 +1,6 @@
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;
@@ -59,12 +56,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);
@@ -80,7 +77,7 @@ public class V2XRoadEventEntity implements Serializable {
*/
public String getTtsWithFeedback() {
tts = "检测到附近";
- tts += EventTypeEnum.getTtsWithFeedback(getPoiType());
+ tts += EventTypeEnumNew.getTtsWithFeedback(getPoiType());
tts += ",确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。";
return tts;
}
@@ -102,7 +99,7 @@ public class V2XRoadEventEntity implements Serializable {
}
public String getAlarmContent() {
- alarmContent = EventTypeEnum.getAlarmContent(getPoiType());
+ alarmContent = EventTypeEnumNew.getAlarmContent(getPoiType());
return alarmContent;
}
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/msgbox/DataSourceType.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/msgbox/DataSourceType.kt
deleted file mode 100644
index af15d0b8a7..0000000000
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/msgbox/DataSourceType.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.mogo.eagle.core.data.msgbox
-
-enum class DataSourceType {
- DEFAULT,
- OBU,
- TELEMATIC,
- AICLOUD,
- SUMMARY// V2X事件汇总
-}
\ No newline at end of file
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/msgbox/MsgBoxBean.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/msgbox/MsgBoxBean.kt
index 9c370be85d..0626508331 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/msgbox/MsgBoxBean.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/msgbox/MsgBoxBean.kt
@@ -1,5 +1,7 @@
package com.mogo.eagle.core.data.msgbox
+import com.mogo.eagle.core.data.enums.DataSourceType
+
data class MsgBoxBean(val type: MsgBoxType, val bean: Any) {
var timestamp: Long = 0
var bean2Json: String = ""
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt
index fe41e2e245..6f2b6348d7 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt
@@ -1,6 +1,5 @@
package com.mogo.eagle.core.function.api.autopilot
-import chassis.ChassisStatesOuterClass
import chassis.VehicleStateOuterClass
/**
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/IDataCenterProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/IDataCenterProvider.kt
new file mode 100644
index 0000000000..2440a49a65
--- /dev/null
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/IDataCenterProvider.kt
@@ -0,0 +1,7 @@
+package com.mogo.eagle.core.function.api.datacenter
+
+import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
+
+interface IDataCenterProvider: IMoGoFunctionServerProvider {
+
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt
index 8615e1c05d..38480a3936 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt
@@ -5,6 +5,7 @@ import android.content.Context
import android.view.View
import android.view.ViewGroup
import com.alibaba.android.arouter.facade.template.IProvider
+import com.mogo.eagle.core.data.EnvConfig
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
import com.mogo.eagle.core.data.deva.scene.SceneModule
@@ -157,4 +158,6 @@ interface IDevaToolsProvider : IProvider {
* 查询app是否有更新
*/
fun queryAppUpgrade()
+
+ fun getEnvConfig(): EnvConfig?
}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/IMoGoHmiViewProxy.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/IMoGoHmiViewProxy.kt
index 7dd525ac24..7b760ac015 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/IMoGoHmiViewProxy.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/IMoGoHmiViewProxy.kt
@@ -1,7 +1,5 @@
package com.mogo.eagle.core.function.api.hmi
-import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
-import com.mogo.eagle.core.function.api.hmi.view.IViewNotification
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
/**
@@ -15,10 +13,4 @@ interface IMoGoHmiViewProxy {
*/
fun setProxyTrafficLightView(view: IViewTrafficLight)
- /**
- * 设置 限速 代理View
- * @param view
- */
- fun setProxyLimitingSpeedView(view: IViewLimitingVelocity)
-
}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt
index 4a1c67310f..2bdf8d3bce 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt
@@ -5,12 +5,8 @@ import android.view.ViewGroup
interface IViewControlListener {
companion object{
- const val SpeedPanelView_TAG = "SpeedPanelView_TAG"
- const val AutoPilotStatusView_TAG = "AutoPilotStatusView_TAG"
- const val PerspectiveSwitchView_TAG = "PerspectiveSwitchView_TAG"
- const val CameraView_TAG = "CameraView_TAG"
- const val ToolsView_TAG = "ToolsView_TAG"
const val TrafficLightView_TAG = "TrafficLightView_TAG"
+ const val LimitingVelocityView_TAG = "LimitingVelocityView_TAG"
}
/** --------- View --------- **/
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewLimitingVelocity.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewLimitingVelocity.kt
deleted file mode 100644
index c1b5499a1d..0000000000
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewLimitingVelocity.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.mogo.eagle.core.function.api.hmi.view
-
-import android.content.Context
-import android.util.AttributeSet
-import android.widget.LinearLayout
-
-/**
- * 定义限速View具备的接口
- */
-abstract class IViewLimitingVelocity(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) :
- LinearLayout(context, attrs, defStyleAttr) {
-
- /**
- * 更新限速数据
- * @param limitingSpeed 限速值,单位:km/h
- * @param limitSource 限速来源 1:MAP, 2:RSU
- */
- open fun updateLimitingSpeed(limitingSpeed: Int, limitSource: Int) {}
-}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt
index 266eaa8fa6..928554ef5b 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt
@@ -1,6 +1,5 @@
package com.mogo.eagle.core.function.api.hmi.warning
-import android.view.View
import android.view.ViewGroup
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean
@@ -22,38 +21,6 @@ interface IMoGoHmiProvider : IMoGoHmiViewProxy {
*/
fun displayEffects()
- /**
- * 隐藏 脉速表
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setSpeedChartViewVisibility(visibility: Int)
-
- /**
- * 隐藏 红绿灯UI
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setTrafficLightVrVisibility(visibility: Int)
-
- /**
- * 隐藏 自动驾驶触发 按钮
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setAutopilotStatusViewVisibility(visibility: Int)
-
- /**
- * 隐藏 切换视角 按钮
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setPerspectiveSwitchViewVisibility(visibility: Int)
-
- /**
- * 隐藏 工具箱 按钮
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setToolsViewVisibility(visibility: Int)
-
- fun setCameraViewVisibility(visibility: Int)
-
/**
* 控制转向灯
*/
@@ -135,19 +102,6 @@ interface IMoGoHmiProvider : IMoGoHmiViewProxy {
*/
fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int)
- /**
- * 展示限速预警
- *
- * @param limitingSpeed 限速速度
- * @param limitSpeedSource 限速来源 1:MAP, 2:RSU
- */
- fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int)
-
- /**
- * 关闭限速预警
- */
- fun disableLimitingVelocity()
-
/**
* 展示指定方位上的红框预警
* @param direction
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/msgbox/IMsgBoxEventListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/msgbox/IMsgBoxEventListener.kt
new file mode 100644
index 0000000000..cebfca9d9b
--- /dev/null
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/msgbox/IMsgBoxEventListener.kt
@@ -0,0 +1,9 @@
+package com.mogo.eagle.core.function.api.msgbox
+/**
+ * @author XuXinChao
+ * @date 2023/1/16
+ * 消息盒子事件监听回调
+ */
+interface IMsgBoxEventListener {
+ fun onSummaryClickEvent()
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/startup/IStartUpProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/startup/IStartUpProvider.kt
new file mode 100644
index 0000000000..1eedc3c215
--- /dev/null
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/startup/IStartUpProvider.kt
@@ -0,0 +1,9 @@
+package com.mogo.eagle.core.function.api.startup
+
+import com.alibaba.android.arouter.facade.template.IProvider
+
+interface IStartUpProvider: IProvider {
+ fun initStageOne()
+
+ fun initStageTwo()
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/ILimitingVelocityListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/ILimitingVelocityListener.kt
new file mode 100644
index 0000000000..49bfecb6dd
--- /dev/null
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/ILimitingVelocityListener.kt
@@ -0,0 +1,10 @@
+package com.mogo.eagle.core.function.api.v2x
+
+import com.mogo.eagle.core.data.enums.DataSourceType
+
+/**
+ * 限速信息回掉
+ */
+interface ILimitingVelocityListener {
+ fun onLimitingVelocityChange(limitingVelocity: Int,sourceType: DataSourceType)
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/LimitingVelocityListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/LimitingVelocityListener.kt
deleted file mode 100644
index 4df12373e2..0000000000
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/LimitingVelocityListener.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.mogo.eagle.core.function.api.v2x
-
-/**
- * 限速信息回掉
- */
-interface LimitingVelocityListener {
- fun onLimitingVelocityChange(limitingVelocity: Int)
-}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/ObuLimitingSpeedListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/ObuLimitingSpeedListener.kt
deleted file mode 100644
index 1fb84cdeaa..0000000000
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/v2x/ObuLimitingSpeedListener.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.mogo.eagle.core.function.api.v2x
-
-/**
- * 限速信息
- */
-interface ObuLimitingSpeedListener {
- fun onObuLimitingSpeedChange(limitingSpeed: Int)
-}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt
index a19f54dc4f..e158d6bced 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt
@@ -10,9 +10,9 @@ import mogo_msg.MogoReportMsg
import system_master.SystemStatusInfo
/**
- * @author xiaoyuzhou
- * @date 2021/9/30 5:48 下午
* 域控制器相关的回调监听
+ * @date 2021/9/30 5:48 下午
+ * @author xiaoyuzhou
*/
object CallerAutoPilotStatusListenerManager : CallerBase() {
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md
index 6d3fa01f95..313da68621 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md
@@ -1,6 +1,58 @@
-#### CallerAutoPilotStatusListenerManager 管理自动驾驶中的状态及参数信息
+#### 管理与工控机相关的数据回掉
+
+``` kotlin
+/**
+ * 添加 监听
+ * @param tag 标记,用来注销监听使用
+ * @param listener 监听回调
+ */
+fun addListener(
+ tag: String,
+ listener: T
+)
+
+/**
+ * 在添加了监听后执行
+ */
+open fun doSomeAfterAddListener(tag: String, listener: T)
+
+/**
+ * 删除监听
+ * @param tag 标记,用来注销监听使用
+ */
+fun removeListener(tag: String)
+
+/**
+ * 删除监听
+ * @param listener 要删除的监听对象
+ */
+fun removeListener(listener: T)
+```
+
+CallerAutopilotActionsListenerManager
+CallerAutopilotCarConfigListenerManager
+CallerAutopilotIdentifyListenerManager
+CallerAutoPilotManager
+CallerAutopilotPointCloudListenerManager
+CallerAutopilotRecordListenerManager
+CallerAutopilotStatisticsListenerManager
+CallerAutoPilotStatusListenerManager
+CallerAutopilotVehicleStateListenerManager
+CallerBatteryManagementSystemListenerManager
+CallerChassisAccStateListenerManager
+CallerChassisBrakeStateListenerManager
+CallerChassisGearStateListenerManager
+CallerChassisLamplightListenerManager
+CallerChassisLocationGCJ20ListenerManager
+CallerChassisLocationWGS84ListenerManager
+CallerChassisSteeringStateListenerManager
+CallerChassisThrottleStateListenerManager
+CallerPlanningActionsListenerManager
+CallerPlanningRottingListenerManager
+CallerPlanningTrajectoryListenerManager
+CallerRoboBusJinlvM1StatesListenerManager
+CallerStartAutopilotFailedListenerManager
+CallerSweeperFutianCleanSystemListenerManager
+
+
-AutopilotStatusInfo:
-连接信息
-实时经纬度、速度、车辆硬件状态
-最后一次启动自动驾驶时候的启动参数 AutopilotControlParameters
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt
index 8827cbd6ed..6631dd2382 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt
@@ -4,6 +4,7 @@ import android.app.Activity
import android.content.Context
import android.view.View
import android.view.ViewGroup
+import com.mogo.eagle.core.data.EnvConfig
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MogoServicePaths
@@ -172,6 +173,10 @@ object CallerDevaToolsManager {
devaToolsProviderApi?.syncConfig()
}
+ fun getEnvConfig(): EnvConfig? {
+ return devaToolsProviderApi?.getEnvConfig()
+ }
+
fun modifyCarInfo(callBack: (ModifyBindingcarInfo) -> Unit){
devaToolsProviderApi?.modifyCarInfo(callBack)
}
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt
index 1a1eedf412..b89e16b16d 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt
@@ -1,23 +1,18 @@
package com.mogo.eagle.core.function.call.hmi
-import android.view.View
import android.view.ViewGroup
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
-import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_SLW
-import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.map.Infrastructure
import com.mogo.eagle.core.data.notice.NoticeNormalData
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
import com.mogo.eagle.core.data.report.ReportEntity
-import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
-import com.zhjt.service_biz.BizConfig
/**
* @author xiaoyuzhou
@@ -37,42 +32,6 @@ object CallerHmiManager {
waringProviderApi?.displayEffects()
}
- /**
- * 隐藏 脉速表
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setSpeedChartViewVisibility(visibility: Int) {
- waringProviderApi?.setSpeedChartViewVisibility(visibility)
- }
-
- /**
- * 隐藏 自动驾驶触发 按钮
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setAutopilotStatusViewVisibility(visibility: Int) {
- waringProviderApi?.setAutopilotStatusViewVisibility(visibility)
- }
-
- /**
- * 隐藏 切换视角 按钮
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setPerspectiveSwitchViewVisibility(visibility: Int) {
- waringProviderApi?.setPerspectiveSwitchViewVisibility(visibility)
- }
-
- /**
- * 隐藏 工具箱 按钮
- * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE
- */
- fun setToolsViewVisibility(visibility: Int) {
- waringProviderApi?.setToolsViewVisibility(visibility)
- }
-
- fun setCameraViewVisibility(visibility: Int) {
- waringProviderApi?.setCameraViewVisibility(visibility)
- }
-
/**
* 控制转向灯功能
*/
@@ -200,24 +159,6 @@ object CallerHmiManager {
waringProviderApi?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
}
- /**
- * 展示限速预警
- *
- * @param limitingSpeed 限速速度
- * @param limitSpeedSource 限速来源 1:MAP, 2:RSU
- */
- @BizConfig(V2I, "", BIZ_SLW)
- fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
- waringProviderApi?.showLimitingVelocity(limitingSpeed, limitSpeedSource)
- }
-
- /**
- * 关闭限速预警
- */
- fun disableLimitingVelocity() {
- waringProviderApi?.disableLimitingVelocity()
- }
-
/**
* 展示指定方位上的红框预警
* @param direction
@@ -346,14 +287,6 @@ object CallerHmiManager {
waringProviderApi?.setProxyTrafficLightView(view)
}
- /**
- * 设置 限速 代理View
- * @param view
- */
- fun setProxyLimitingSpeedView(view: IViewLimitingVelocity) {
- waringProviderApi?.setProxyLimitingSpeedView(view)
- }
-
/**
* 展示工控机监控上报数据
* @param errorReportList 错误级别上报数据列表
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerMapLocationListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerMapLocationListenerManager.kt
index c779e1e802..08ab9ff67f 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerMapLocationListenerManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerMapLocationListenerManager.kt
@@ -13,21 +13,9 @@ import java.util.concurrent.ConcurrentHashMap
object CallerMapLocationListenerManager : CallerBase() {
// 记录地图最后一次位置
+ @Volatile
private var mLocation: MogoLocation? = null
- /**
- * 记录最后一次高精坐标的位置
- */
- private var mGpsLocation: MogoLocation? = null
-
- // 存储所有注册了监听的对象,invokeXXXX进行遍历回调,将信息同步
- private val mMapStyleChangeListeners: ConcurrentHashMap =
- ConcurrentHashMap()
-
-
- // 高精坐标回调
- private val mGpsChangedListeners: ConcurrentHashMap = ConcurrentHashMap()
-
/**
* 获取当前经纬度
*/
@@ -35,103 +23,7 @@ object CallerMapLocationListenerManager : CallerBase() {
return mLocation
}
- /**
- * 获取当前高精坐标
- */
- fun getCurrentGpsLocation(): MogoLocation? {
- return mGpsLocation
- }
-
- /**
- * 添加 地图样式改变 监听
- * @param tag 标记,用来注销监听使用
- * @param listener 监听回调
- */
- fun addListener(tag: String, listener: IMoGoMapLocationListener, isGps: Boolean) {
- if (!isGps) {
- if (mMapStyleChangeListeners.containsKey(tag)) {
- return
- }
- mMapStyleChangeListeners[tag] = listener
- listener.onLocationChanged(mLocation, 0, isGps)
- } else {
- if (mGpsChangedListeners.containsKey(tag)) {
- return
- }
- mGpsChangedListeners[tag] = listener
- listener.onLocationChanged(mGpsLocation, 0, isGps)
- }
-
- }
-
- /**
- * 删除 地图样式改变 监听
- * @param tag 标记,用来注销监听使用
- */
- fun removeListener(tag: String, isGps: Boolean) {
- if (!isGps) {
- if (!mMapStyleChangeListeners.containsKey(tag)) {
- return
- }
- mMapStyleChangeListeners.remove(tag)
- } else {
- if (!mGpsChangedListeners.containsKey(tag)) {
- return
- }
- mGpsChangedListeners.remove(tag)
- }
-
- }
-
- /**
- * 删除 地图样式改变 监听
- * @param listener 要删除的监听对象
- */
- fun removeListener(listener: IMoGoMapLocationListener, isGps: Boolean) {
- if (!isGps) {
- if (!mMapStyleChangeListeners.containsValue(listener)) {
- return
- }
- mMapStyleChangeListeners.forEach {
- if (it.value == listener) {
- mMapStyleChangeListeners.remove(it.key)
- }
- }
- } else {
- if (!mGpsChangedListeners.containsValue(listener)) {
- return
- }
- mGpsChangedListeners.forEach {
- if (it.value == listener) {
- mGpsChangedListeners.remove(it.key)
- }
- }
- }
- }
-
- /**
- * 触发 地图样式改变 监听
- */
- fun invokeMapLocationChangeListener() {
- invokeMapLocationChangeListener(mLocation, 0, false)
- }
-
- /**
- * 触发 地图样式改变 监听
- * @param location 选中状态
- */
- fun invokeMapLocationChangeListener(location: MogoLocation?, from: Int, isGps: Boolean) {
- if (!isGps) {
- mLocation = location
- mMapStyleChangeListeners.forEach {
- val listener = it.value
- listener.onLocationChanged(location, from, isGps)
- }
- } else {
- mGpsLocation = location
- mGpsChangedListeners.forEach {
- it.value.onLocationChanged(location, from, isGps)
- }
- }
+ fun setCurrentLocation(location: MogoLocation) {
+ mLocation = location
}
}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt
index 75b7b224e5..5e314cb6aa 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt
@@ -12,6 +12,7 @@ import androidx.lifecycle.LifecycleOwner
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
+import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoadListener
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.*
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleOwner
@@ -23,6 +24,7 @@ import com.zhidaoauto.map.sdk.open.tools.MapTools
import kotlinx.coroutines.*
import kotlinx.coroutines.android.asCoroutineDispatcher
import kotlinx.coroutines.internal.synchronized
+import mogo.telematics.pad.MessagePad.GnssInfo
import java.util.*
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeUnit.SECONDS
@@ -63,7 +65,7 @@ object CallerVisualAngleManager {
val displayThreshold: Long //最大展示时长 > 0; 表示最长展示多长时间, -1 表示,一直展示,直到触发默认视角, 0: 默认视角专用值,
}
- private val triggerLocation = AtomicReference()
+ private val triggerLocation = AtomicReference()
private val distanceOfCarToStopLine = AtomicReference(0.0)
@@ -76,7 +78,7 @@ object CallerVisualAngleManager {
override fun onRoadIdInfo(roadId: String) {
this.roadId.set(roadId)
Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.triggerRoadId.get()} -> curr: $roadId")
- val loc = CallerMapLocationListenerManager.getCurrentLocation()
+ val loc = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
var triggerClose = false
val distance = distanceOfCarToStopLine.get() + 5
if (hasCrossRoad && distance > 0) {
@@ -109,7 +111,7 @@ object CallerVisualAngleManager {
hasCrossRoad = true
triggerRoadId.set(this.roadId.get())
distanceOfCarToStopLine.set(info.distanceOfCarToStopLine)
- triggerLocation.set(CallerMapLocationListenerManager.getCurrentLocation())
+ triggerLocation.set(CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02())
changeVisualAngle(CrossRoad(true))
}
}
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/msgbox/CallerMsgBoxEventListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/msgbox/CallerMsgBoxEventListenerManager.kt
new file mode 100644
index 0000000000..9b61eec3f2
--- /dev/null
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/msgbox/CallerMsgBoxEventListenerManager.kt
@@ -0,0 +1,30 @@
+package com.mogo.eagle.core.function.call.msgbox
+
+import androidx.annotation.Nullable
+import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
+import com.mogo.eagle.core.function.call.base.CallerBase
+import java.util.concurrent.ConcurrentHashMap
+
+/**
+ * @author XuXinChao
+ * @date 2023/1/16
+ * 消息盒子事件监听管理
+ */
+object CallerMsgBoxEventListenerManager: CallerBase() {
+
+ private val statusListeners: ConcurrentHashMap =
+ ConcurrentHashMap()
+
+ /**
+ * 触发监听
+ */
+ fun invokeListener(){
+ statusListeners.forEach {
+ val tag = it.key
+ val listener = it.value
+ listener.onSummaryClickEvent()
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/startup/CallerStartUpManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/startup/CallerStartUpManager.kt
new file mode 100644
index 0000000000..1cf10c2a65
--- /dev/null
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/startup/CallerStartUpManager.kt
@@ -0,0 +1,25 @@
+package com.mogo.eagle.core.function.call.startup
+
+import com.mogo.eagle.core.data.constants.MogoServicePaths
+import com.mogo.eagle.core.function.api.startup.IStartUpProvider
+import com.mogo.eagle.core.function.call.base.CallerBase
+
+object CallerStartUpManager {
+ private val TAG = "CallerStartUpManager"
+
+ private val providerApi: IStartUpProvider?
+ get() = CallerBase.getApiInstance(
+ IStartUpProvider::class.java,
+ MogoServicePaths.PATH_STARTUP_PROVIDER
+ )
+
+ @JvmStatic
+ fun initStageOne() {
+ providerApi?.initStageOne()
+ }
+
+ @JvmStatic
+ fun initStageTwo() {
+ providerApi?.initStageTwo()
+ }
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallLimitingVelocityListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallLimitingVelocityListenerManager.kt
deleted file mode 100644
index 726288cd2d..0000000000
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallLimitingVelocityListenerManager.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.mogo.eagle.core.function.call.v2x
-
-import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener
-import com.mogo.eagle.core.function.call.base.CallerBase
-
-/**
- * 限速信息监听
- */
-object CallLimitingVelocityListenerManager : CallerBase() {
-
- private const val TAG = "CallLimitingVelocityListenerManager"
-
- private var mCurrentLimitingVelocity = 0
-
- override fun doSomeAfterAddListener(tag: String, listener: LimitingVelocityListener) {
- listener.onLimitingVelocityChange(mCurrentLimitingVelocity)
- }
-
- fun invokeOnLimitingVelocityChange(limitingVelocity: Int) {
- this.mCurrentLimitingVelocity = limitingVelocity
- M_LISTENERS.forEach {
- val tag = it.key
- //LogUtils.dTag(TAG, "invokeOnLimitingVelocityChange tag is : $tag")
- val listener = it.value
- listener.onLimitingVelocityChange(limitingVelocity)
- }
- }
-
-}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallObuLimitingSpeedListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallObuLimitingSpeedListenerManager.kt
deleted file mode 100644
index 1a33b7af68..0000000000
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallObuLimitingSpeedListenerManager.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.mogo.eagle.core.function.call.v2x
-
-import com.mogo.eagle.core.function.api.v2x.ObuLimitingSpeedListener
-import com.mogo.eagle.core.function.call.base.CallerBase
-import java.util.concurrent.ConcurrentHashMap
-
-/**
- * 限速信息监听
- */
-object CallObuLimitingSpeedListenerManager : CallerBase(){
-
- private const val TAG = "CallObuLimitingSpeedListenerManager"
- private val M_TRAFFIC_LIGHT_LISTENER: ConcurrentHashMap =
- ConcurrentHashMap()
- private var mObuLimitSpeed = 0
-
- fun invokeOnObuLimitingSpeedChange(limitingSpeed: Int) {
- this.mObuLimitSpeed = limitingSpeed
- M_TRAFFIC_LIGHT_LISTENER.forEach {
- val tag = it.key
- val listener = it.value
- listener.onObuLimitingSpeedChange(limitingSpeed)
- }
- }
-
-}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerLimitingVelocityListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerLimitingVelocityListenerManager.kt
new file mode 100644
index 0000000000..4d9211b39c
--- /dev/null
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerLimitingVelocityListenerManager.kt
@@ -0,0 +1,28 @@
+package com.mogo.eagle.core.function.call.v2x
+
+import com.mogo.eagle.core.data.enums.DataSourceType
+import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
+import com.mogo.eagle.core.function.call.base.CallerBase
+
+/**
+ * 限速信息监听
+ */
+object CallerLimitingVelocityListenerManager : CallerBase() {
+
+ private var mCurrentLimitingVelocity = 0
+ private var sourceType = DataSourceType.DEFAULT
+
+ override fun doSomeAfterAddListener(tag: String, listener: ILimitingVelocityListener) {
+ listener.onLimitingVelocityChange(mCurrentLimitingVelocity, sourceType)
+ }
+
+ fun invokeOnLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
+ this.mCurrentLimitingVelocity = limitingVelocity
+ this.sourceType = sourceType
+ M_LISTENERS.forEach {
+ val listener = it.value
+ listener.onLimitingVelocityChange(limitingVelocity, sourceType)
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerViewLimitingVelocityListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerViewLimitingVelocityListenerManager.kt
new file mode 100644
index 0000000000..cdfbe782b8
--- /dev/null
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerViewLimitingVelocityListenerManager.kt
@@ -0,0 +1,28 @@
+package com.mogo.eagle.core.function.call.v2x
+
+import com.mogo.eagle.core.data.enums.DataSourceType
+import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
+import com.mogo.eagle.core.function.call.base.CallerBase
+
+/**
+ * 限速信息监听
+ */
+object CallerViewLimitingVelocityListenerManager : CallerBase() {
+
+ private var mCurrentLimitingVelocity = 0
+ private var sourceType = DataSourceType.DEFAULT
+
+ override fun doSomeAfterAddListener(tag: String, listener: ILimitingVelocityListener) {
+ listener.onLimitingVelocityChange(mCurrentLimitingVelocity, sourceType)
+ }
+
+ fun invokeOnLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
+ this.mCurrentLimitingVelocity = limitingVelocity
+ this.sourceType = sourceType
+ M_LISTENERS.forEach {
+ val listener = it.value
+ listener.onLimitingVelocityChange(limitingVelocity, sourceType)
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
index 80f9e2a682..075f159e6f 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
@@ -121,10 +121,6 @@ public class AMapViewWrapper implements IMogoMapView,
private boolean mIsFirstLocated = true;
private boolean mIsDelayed = false;
- // GPS 位置回调
- private final LocationListener mGpsLocationListener =
- location -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(ObjectUtils.fromLocation(location), 0, true);
-
public AMapViewWrapper(MapAutoView mMapView) {
CallerLogger.INSTANCE.i(M_MAP + TAG, "autoop--AMapViewWrapper: init");
this.mMapView = mMapView;
@@ -189,7 +185,6 @@ public class AMapViewWrapper implements IMogoMapView,
LocationClient client = mMapView.getLocationClient();
if (client != null) {
client.registerListener(this);
- client.registerGpsListener(mGpsLocationListener);
}
mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_ZOOM);
mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_ROTATE);
@@ -704,45 +699,12 @@ public class AMapViewWrapper implements IMogoMapView,
CallerMapDevaListenerManager.INSTANCE.invokeUploadLogFile(filePath);
}
- // TODO 这里需要数据中心代理
-// private static class LocationTask implements Runnable {
-//
-// private MogoLocation location;
-//
-// public void setMoGoLocation(MogoLocation location) {
-// this.location = location;
-// }
-//
-// @Override
-// public void run() {
-// if (location != null) {
-// CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(location, 1, false);
-// location = null;
-// }
-// }
-// }
-
-// private volatile LocationTask mLocationTask;
-
-// private final Handler mainHandler = new Handler(Looper.getMainLooper());
-
@Override
public void onLocationChanged(@NotNull com.zhidaoauto.map.sdk.open.location.MogoLocation location) {
-// MogoLocation currentLocation = ObjectUtils.fromLocation(location);
-// if (Looper.myLooper() == Looper.getMainLooper()) {
-// CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(currentLocation, 1, false);
-// } else {
-// if (mLocationTask == null) {
-// mLocationTask = new LocationTask();
-// }
-// mLocationTask.setMoGoLocation(currentLocation);
-// mainHandler.removeCallbacks(mLocationTask);
-// mainHandler.post(mLocationTask);
-// }
-
+ CallerMapLocationListenerManager.INSTANCE.setCurrentLocation(ObjectUtils.fromLocation(location));
// 将有效经纬度暂存本地,提供给下一次的Http-DNS使用,防止首次请求位置获取不到
if (location.getLat() > 0 && location.getLon() > 0) {
- if (location.getCityCode() != null && !location.getCityCode().isEmpty()) {
+ if (location.getCityCode() != null && !location.getCityCode().isEmpty()) {
SharedPrefsMgr.getInstance(mMapView.getContext())
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, location.getCityCode());
}
@@ -752,20 +714,6 @@ public class AMapViewWrapper implements IMogoMapView,
.putString(SharedPrefsConstants.LOCATION_LONGITUDE, String.valueOf(location.getLon()));
}
-// // 同步给各个模块
-// Location sysLocation = new Location(location.getProvider());
-// sysLocation.setAltitude(location.getAltitude());
-// sysLocation.setLatitude(location.getLat());
-// sysLocation.setLongitude(location.getLon());
-// sysLocation.setProvider(location.getProvider());
-// sysLocation.setAccuracy(location.getAcceleration());
-// sysLocation.setTime(location.duration);
-// sysLocation.setBearing((float) location.getHeading());
-// sysLocation.setSpeed(location.getSpeed());
-
-// if (MogoCarLocationChangedListenerRegister.getInstance().getListener() != null) {
-// MogoCarLocationChangedListenerRegister.getInstance().getListener().onCarLocationChanged2(sysLocation);
-// }
if (checkAMapView() && mMapLoaded) {
// 地图初始化完成后,每隔5s自动判断当前地图的模式
if (mIsFirstLocated) {
diff --git a/modules.txt b/modules.txt
index 4286b0eb33..775878c1c2 100644
--- a/modules.txt
+++ b/modules.txt
@@ -18,7 +18,7 @@
:test:crashreport-apm
:test:crashreport-noop
:test:crashreport-upgrade
-:core:function-impl:mogo-core-function-obu-mogo
+:core:function-impl:mogo-core-function-datacenter
:core:function-impl:mogo-core-function-hmi
:core:function-impl:mogo-core-function-map
:core:function-impl:mogo-core-function-v2x
diff --git a/settings.gradle b/settings.gradle
index c262ab3649..99625fde8b 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -28,14 +28,14 @@ include ':core:function-impl:mogo-core-function-hmi'
include ':core:function-impl:mogo-core-function-map'
// v2x预警业务,本地+云端预警
include ':core:function-impl:mogo-core-function-v2x'
-// 自研OBU业务
-include ':core:function-impl:mogo-core-function-obu-mogo'
// 车聊聊业务
include ':core:function-impl:mogo-core-function-chat'
// 业务biz
include ':core:function-impl:mogo-core-function-biz'
-// 消息盒子
+// 消息盒子、自研OBU业务
include ':core:function-impl:mogo-core-function-datacenter'
+// 初始化
+include ':core:function-impl:mogo-core-function-startup'
// 模块
include ':foudations:mogo-aicloud-services-sdk'