diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 83405b8de1..4ff10f68a5 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -91,6 +91,7 @@ diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java index 6e4b115c29..4ba2230b01 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java @@ -71,7 +71,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog drawStopLine(cloundWarningInfo, newLocation); //添加停止线marker handleStopLine(); - }, 800); + }, 600); UiThreadHandler.postDelayed(() -> { V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); @@ -99,15 +99,17 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog private void handleStopLine() { - for (int i = 0; i < fillPoints.size(); i++) { - V2XWarningEntity entity = new V2XWarningEntity(); - MogoLatLng latLng = (MogoLatLng) fillPoints.get(i); - entity.setLat(latLng.lat); - entity.setLon(latLng.lon); - entity.setCollisionLat(mCloundWarningInfo.getCollisionLat()); - entity.setCollisionLon(mCloundWarningInfo.getCollisionLon()); - entity.heading = mCloundWarningInfo.heading; - V2XWarnDataDrawer.getInstance().renderStopLineData(entity); + if (mCloundWarningInfo != null) { + for (int i = 0; i < fillPoints.size(); i++) { + V2XWarningEntity entity = new V2XWarningEntity(); + MogoLatLng latLng = (MogoLatLng) fillPoints.get(i); + entity.setLat(latLng.lat); + entity.setLon(latLng.lon); + entity.setCollisionLat(mCloundWarningInfo.getCollisionLat()); + entity.setCollisionLon(mCloundWarningInfo.getCollisionLon()); + entity.heading = mCloundWarningInfo.heading; + V2XWarnDataDrawer.getInstance().renderStopLineData(entity); + } } } @@ -140,7 +142,6 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog V2XServiceManager.getMoGoStopPolylineManager().drawStopPolyline(getContext(), lineInfo); } } else { - Log.e(V2XConst.LOG_NAME_WARN, "drawStopLine info == null"); V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); } } @@ -191,7 +192,9 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog public void onCarLocationChanged2(Location latLng) { // Log.d(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 latLng = " + latLng.getLatitude() + "--" + latLng.getLongitude() + "---isSelfLineClear = " + isSelfLineClear); //当行人经纬度交点 开始画线,否则清理 - mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude())); + if (mCloundWarningInfo != null) { + mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude())); + } drawSlefCarLine(latLng); } @@ -237,7 +240,6 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(getContext(), info); } } else { - Log.e(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 mCloundWarningInfo == null"); V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); } }