diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java index 305520801b..6b1644d604 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java @@ -2,6 +2,7 @@ package com.mogo.module.common.drawer; import android.os.Message; import android.text.TextUtils; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; @@ -149,7 +150,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic } MogoMarkerOptions options = new MogoMarkerOptions() - .owner( DataTypes.TYPE_MARKER_CLOUD_DATA ) + .owner( DataTypes.TYPE_MARKER_CLOUD_WARN_DATA ) .anchor( 0.5f, 0.5f ) .rotate( ( float ) data.getHeading() ) .object( data ) @@ -158,6 +159,8 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic .position( new MogoLatLng( data.getLat(), data.getLon())); String resIdVal = null; + IMogoMarker marker = null; + if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) { options.set3DMode( true ); options.anchorColor(data.color); @@ -165,13 +168,15 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic resIdVal = resId + ""; // options.resName( mMarkerCachesResMd5Values.get( resIdVal ) ); options.icon3DRes( resId ); + marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( DataTypes.TYPE_MARKER_CLOUD_WARN_DATA, options ); + } else { // options.set3DMode( false ); // View view = inflateView( data ); // options.icon( view ); // resIdVal = view.getId() + ""; } - IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( DataTypes.TYPE_MARKER_CLOUD_DATA, options ); + // cacheMarkerIconResMd5Val( resIdVal, marker ); return marker; @@ -179,19 +184,20 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic /** - * + * 绘制行人和二轮车 * @param data */ -// public void renderWarnData(V2XWarningEntity data ) { -// IMogoMarker marker = drawWarnDataMarker(data); -// -// if ( marker == null ) { -// continue; -// } -// -// renderSnapshotOneFrame( marker, uniqueKey, cloudRoadData, newMarkersCaches ); -// -// } + public void renderWarnData(V2XWarningEntity data ) { + IMogoMarker marker = drawWarnDataMarker(data); + + if ( marker != null ) { + marker.addDynamicAnchorPosition( new MogoLatLng(data.getCollisionLat(), data.getCollisionLon()), ( float ) data.getHeading(), 2000); + + } else { + Log.e("liyz", "renderWarnData marker == null "); + } + + } /** diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java index 01665c64f1..4510dd5821 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java @@ -1,6 +1,9 @@ package com.mogo.module.common.entity; +import com.mogo.map.MogoLatLng; + import java.io.Serializable; +import java.util.List; /** * @author liujing @@ -28,8 +31,7 @@ public class V2XWarningEntity implements Serializable { //速度 private float speed; //停止线经纬度 - private double stopLineLat; - private double stopLineLon; + private List stopLines; //自车到停止线距离 private double stopLineDistance; //道路唯一标识 @@ -50,8 +52,8 @@ public class V2XWarningEntity implements Serializable { public long systemTime; //定位卫星时间 暂时没用 public long satelliteTime; - //莫顿码 暂时没用 - public long mortonCode; + //预警蒙层等展示时长 + private long showTime; //自组字段 //tts播报 @@ -152,6 +154,15 @@ public class V2XWarningEntity implements Serializable { this.speed = speed; } + + public void setStopLineDistance(double stopLineDistance) { + this.stopLineDistance = stopLineDistance; + } + + public void setWarningContent(String warningContent) { + this.warningContent = warningContent; + } + public int getType() { return type; } @@ -231,10 +242,6 @@ public class V2XWarningEntity implements Serializable { return satelliteTime; } - public long getMortonCode() { - return mortonCode; - } - public String getTts() { if (tts == null) { @@ -243,12 +250,8 @@ public class V2XWarningEntity implements Serializable { return tts; } - public double getStopLineLat() { - return stopLineLat; - } - - public double getStopLineLon() { - return stopLineLon; + public double getStopLineDistance() { + return stopLineDistance; } @Override @@ -257,26 +260,25 @@ public class V2XWarningEntity implements Serializable { "type=" + type + ", lat=" + lat + ", lon=" + lon + + ", targetColor='" + targetColor + '\'' + ", distance=" + distance + ", collisionLat=" + collisionLat + ", collisionLon=" + collisionLon + ", angle=" + angle + ", direction=" + direction + ", speed=" + speed + - ", stopLineLat=" + stopLineLat + - ", stopLineLon=" + stopLineLon + + ", stopLineDistance=" + stopLineDistance + ", roadId='" + roadId + '\'' + ", laneId='" + laneId + '\'' + ", uuid='" + uuid + '\'' + ", color='" + color + '\'' + ", carId='" + carId + '\'' + ", warningContent='" + warningContent + '\'' + - ", tts='" + tts + '\'' + - ", location=" + location + ", heading=" + heading + ", systemTime=" + systemTime + ", satelliteTime=" + satelliteTime + - ", mortonCode=" + mortonCode + + ", tts='" + tts + '\'' + + ", location=" + location + '}'; } } diff --git a/modules/mogo-module-extensions/src/main/res/values/dimens.xml b/modules/mogo-module-extensions/src/main/res/values/dimens.xml index d5dfbd26b9..9cc9dc544b 100644 --- a/modules/mogo-module-extensions/src/main/res/values/dimens.xml +++ b/modules/mogo-module-extensions/src/main/res/values/dimens.xml @@ -89,7 +89,7 @@ 1058px 822px - 700px + 615px 544px 117px 80px diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XWaringManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XWaringManager.java index d7247e54cc..06d7b96225 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XWaringManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XWaringManager.java @@ -7,12 +7,18 @@ import com.mogo.map.MogoLatLng; import com.mogo.map.overlay.IMogoPolyline; import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.drawer.AdasRecognizedResultDrawer; +import com.mogo.module.common.entity.V2XMessageEntity; +import com.mogo.module.common.entity.V2XWarningEntity; import com.mogo.module.v2x.entity.model.DrawLineInfo; -import com.mogo.module.v2x.listener.V2XMessageListener_401011; import com.mogo.module.v2x.listener.V2XWarnMessageListener; +import com.mogo.module.v2x.utils.V2XUtils; import com.mogo.realtime.entity.ADASRecognizedResult; +import com.mogo.utils.UiThreadHandler; import com.mogo.utils.logger.Logger; +import com.mogo.utils.network.utils.GsonUtil; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; import java.util.ArrayList; import java.util.List; @@ -57,6 +63,34 @@ public class V2XWaringManager { registerWarnListener(); // handleAdasData(); + + } + + /** + * TODO 测试数据 + */ + private void testData() { + + try { + InputStream inputStream = V2XUtils.getApp() + .getResources() + .openRawResource(R.raw.scenario_warning_event_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XWarningEntity warningEntity = GsonUtil.objectFromJson(baos.toString(), V2XWarningEntity.class); + V2XServiceManager.getMoGoV2XCloundDataManager().analysisV2XCloundDataEvent(warningEntity); + + } catch (Exception e) { + e.printStackTrace(); + } + } /** @@ -93,55 +127,64 @@ public class V2XWaringManager { * 处理adas返回的数据 */ public void handleAdasData() { - Logger.d(V2XConst.LOG_NAME_WARN, "V2XWaringManager ---- handleAdasData "); + Log.d(V2XConst.LOG_NAME_WARN, "V2XWaringManager ---- handleAdasData "); + + //测试数据 + testData(); // 绘制连接线 - DrawLineInfo info1 = new DrawLineInfo(); - MogoLatLng startLatlng1 = new MogoLatLng(39.968919,116.407642); - MogoLatLng endLatlng1 = new MogoLatLng(40.010906,116.423821); - info1.setHeading(10); - info1.setStartLocation(startLatlng1); - info1.setEndLocation(endLatlng1); - +// DrawLineInfo info1 = new DrawLineInfo(); +// MogoLatLng startLatlng1 = new MogoLatLng(39.968919,116.407642); +// MogoLatLng endLatlng1 = new MogoLatLng(40.010906,116.423821); +// info1.setHeading(10); +// info1.setStartLocation(startLatlng1); +// info1.setEndLocation(endLatlng1); +// +// //只有在3d模型下才有值 // if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) { -// float roadWidth = V2XServiceManager.getMapUIController().getRoadWidth(116.411194781192, -// 39.9808395231999, 10, true, true); +// float roadWidth = V2XServiceManager.getMapUIController().getRoadWidth(116.411198243370, +// 39.9809517154582, (float) 3.13919341919472 , true, true); // Log.d(V2XConst.LOG_NAME_WARN, "roadWidth = " + roadWidth); // info1.setWidth(roadWidth); // } +// +// V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(getContext(), info1); +// +// //延迟3秒清理线 +// UiThreadHandler.postDelayed( () -> { +// V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); +// }, 3000 ); - V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(getContext(), info1); - - // adas 每隔一秒传递的他车或行人数据 - V2XServiceManager.getmIMogoADASController().addAdasRecognizedDataCallback(resultList -> { - // 绘制近景识别到的车辆,行人和二轮车 - AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult( resultList ); - - //清理 - V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); - - // 绘制连接线 - DrawLineInfo info = new DrawLineInfo(); - MogoLatLng startLatlng = new MogoLatLng(39.969247,116.407299); - MogoLatLng endLatlng = new MogoLatLng(39.971089,116.407384); - info.setStartLocation(startLatlng); - info.setEndLocation(endLatlng); - V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(mContext, info); - - //更新数据 - for (ADASRecognizedResult result : resultList) { - MogoLatLng latLng = new MogoLatLng(result.lat, result.lon); - lonLats.add(latLng); - } - IMogoPolyline mMogoPolyline = V2XServiceManager.getMoGoWarnPolylineManager().getMogoWarnPolyline(); - mMogoPolyline.setPoints(lonLats); - - } ); - - double lon = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon(); - double lat = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(); - Log.d(V2XConst.LOG_NAME_WARN, "lon = " + lon + "----lat = " + lat); + // adas 每隔一秒传递的他车或行人数据 TODO +// V2XServiceManager.getmIMogoADASController().addAdasRecognizedDataCallback(resultList -> { +// // 绘制近景识别到的车辆,行人和二轮车 +// AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult( resultList ); +// +// //清理 +// V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); +// +// // 绘制连接线 +// DrawLineInfo info = new DrawLineInfo(); +// MogoLatLng startLatlng = new MogoLatLng(39.969247,116.407299); +// MogoLatLng endLatlng = new MogoLatLng(39.971089,116.407384); +// info.setStartLocation(startLatlng); +// info.setEndLocation(endLatlng); +// V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(mContext, info); +// +// //更新数据 +// for (ADASRecognizedResult result : resultList) { +// MogoLatLng latLng = new MogoLatLng(result.lat, result.lon); +// lonLats.add(latLng); +// } +// IMogoPolyline mMogoPolyline = V2XServiceManager.getMoGoWarnPolylineManager().getMogoWarnPolyline(); +// mMogoPolyline.setPoints(lonLats); +// +// } ); +// + //adas自车定位 +// double lon = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon(); +// double lat = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(); } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XWarnMessageListener.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XWarnMessageListener.java index a88353cec1..fd0d2541c0 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XWarnMessageListener.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XWarnMessageListener.java @@ -1,6 +1,9 @@ package com.mogo.module.v2x.listener; +import android.util.Log; + import com.mogo.module.common.entity.V2XWarningEntity; +import com.mogo.module.v2x.V2XConst; import com.mogo.module.v2x.V2XServiceManager; import com.mogo.module.v2x.utils.V2XUtils; import com.mogo.service.connection.IMogoOnMessageListener; @@ -22,6 +25,7 @@ public class V2XWarnMessageListener implements IMogoOnMessageListener "); V2XServiceManager.getMoGoV2XCloundDataManager().analysisV2XCloundDataEvent(info); } }); 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 ebd2cbacb5..1fa27c155e 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 @@ -16,6 +16,7 @@ import com.mogo.module.v2x.V2XConst; import com.mogo.module.v2x.V2XServiceManager; import com.mogo.module.v2x.entity.model.DrawLineInfo; import com.mogo.module.v2x.manager.IMoGoV2XCloundDataManager; +import com.mogo.utils.UiThreadHandler; import java.util.Arrays; @@ -37,13 +38,11 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog mCloundWarningInfo = cloundWarningInfo; //TODO 根据判断条件,决定是否画线或者删除线 - - //绘制识别物与交汇点连线,并且更新连线数据 - drawOtherObjectLine(cloundWarningInfo); + //绘制识别物与交汇点连线,并且更新连线数据 TODO VR模式无法获取道路宽度 +// drawOtherObjectLine(cloundWarningInfo); //二轮车和行人的移动和渲染 -// SnapshotSetDataDrawer.getInstance().renderWarnData(cloundWarningInfo); - + SnapshotSetDataDrawer.getInstance().renderWarnData(cloundWarningInfo); } /** @@ -53,20 +52,18 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog IMogoPolyline polyLine = V2XServiceManager.getMoGoPersonWarnPolylineManager().getMogoPersonWarnPolyline(); if (info != null) { if (polyLine != null) { + Log.d(V2XConst.LOG_NAME_WARN, "polyLine != null"); polyLine.setPoints(Arrays.asList(new MogoLatLng(info.getLat(), info.getLon()), new MogoLatLng(info.getCollisionLat(), info.getCollisionLon()))); } else { + Log.d(V2XConst.LOG_NAME_WARN, "polyLine == null"); DrawLineInfo lineInfo = new DrawLineInfo(); -// MogoLatLng startLatlng = new MogoLatLng(39.968919,116.407642); -// MogoLatLng endLatlng = new MogoLatLng(40.010906,116.423821); MogoLatLng startLatlng = new MogoLatLng(info.getLat(), info.getLon()); MogoLatLng endLatlng = new MogoLatLng(info.getCollisionLat(), info.getCollisionLon()); lineInfo.setStartLocation(startLatlng); lineInfo.setEndLocation(endLatlng); lineInfo.setHeading(info.heading); if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) { -// float roadWidth = V2XServiceManager.getMapUIController().getRoadWidth(116.411194781192, -// 39.9808395231999, 10, true, true); float roadWidth = V2XServiceManager.getMapUIController().getRoadWidth(info.getLon(), info.getLat(), (float) info.heading, true, true); Log.d(V2XConst.LOG_NAME_WARN, "roadWidth = " + roadWidth); @@ -74,8 +71,14 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog } V2XServiceManager.getMoGoPersonWarnPolylineManager().drawPersonWarnPolyline(getContext(), lineInfo); } + + //延迟3秒清理线 + UiThreadHandler.postDelayed( () -> { + V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); + }, 6000 ); + } else { - Log.e(V2XConst.LOG_NAME_WARN, "mCloundWarningInfo == null"); + Log.e(V2XConst.LOG_NAME_WARN, "info == null"); V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); } @@ -87,7 +90,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog } /** - * 自车定位 移动完成需要 3s消失 TODO + * 自车定位 移动完成需要 3s消失 */ @Override public void onCarLocationChanged2(Location latLng) { @@ -101,19 +104,24 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog new MogoLatLng(mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon()))); } else { - Log.e(V2XConst.LOG_NAME_WARN, "V2XServiceManager.getMoGoWarnPolylineManager().getMogoWarnPolyline() == null"); - DrawLineInfo info = new DrawLineInfo(); // 对象 TODO -// MogoLatLng startLatlng = new MogoLatLng(39.968919, 116.407642); -// MogoLatLng endLatlng = new MogoLatLng(40.010906, 116.423821); + Log.e(V2XConst.LOG_NAME_WARN, "mogoPolyline == null"); + DrawLineInfo info = new DrawLineInfo(); // 对象 MogoLatLng startLatlng = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()); MogoLatLng endLatlng = new MogoLatLng(mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon()); info.setHeading(latLng.getBearing()); info.setStartLocation(startLatlng); info.setEndLocation(endLatlng); + info.setWidth(60); //TODO V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(getContext(), info); } + + //延迟3秒清理线 + UiThreadHandler.postDelayed( () -> { + V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); + }, 3000 ); + } else { - Log.e(V2XConst.LOG_NAME_WARN, "mCloundWarningInfo == null"); + Log.e(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 mCloundWarningInfo == null"); V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); } } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoWarnPolylineManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoWarnPolylineManager.java index 9752a13441..723e182ccc 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoWarnPolylineManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoWarnPolylineManager.java @@ -42,7 +42,6 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager { // 连接线参数 MogoPolylineOptions options = new MogoPolylineOptions(); - List colors = new ArrayList<>(); if (info.getType() != null) { @@ -54,7 +53,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager { colors.add(0xFFE32F46); } } else { - Log.e(V2XConst.LOG_NAME_WARN, "info.getType() == null "); + Log.e(V2XConst.LOG_NAME_WARN, "drawWarnPolyline info.getType() == null "); colors.add(0xFFE32F46); colors.add(0xFFE32F46); } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java index 68d8db9e04..812f088cdd 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java @@ -60,11 +60,11 @@ public class V2XPushLiveCarScenario extends AbsV2XScenario @Override public void showWindow() { if (getV2XWindow() != null) { - ViewGroup.LayoutParams layoutParams = - new ViewGroup.LayoutParams( - ViewGroup.LayoutParams.MATCH_PARENT, - (int) V2XUtils.getApp().getResources() - .getDimension(R.dimen.v2x_video_window_height)); + int width = (int) V2XUtils.getApp().getResources().getDimension(V2XServiceManager.getMoGoStatusManager().isVrMode() ? + R.dimen.module_v2x_event_window_width_vr : R.dimen.module_v2x_event_window_width); + int height = (int) V2XUtils.getApp().getResources().getDimension(V2XServiceManager.getMoGoStatusManager().isVrMode() ? + R.dimen.module_v2x_event_see_live_window_height_vr : R.dimen.module_v2x_event_see_live_window_height); + ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(width, height); V2XServiceManager .getMogoTopViewManager() .addViewNoLinkage(getV2XWindow().getView(), layoutParams, this); diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java index 92e7004ef9..5c1675c924 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java @@ -142,7 +142,7 @@ public class V2XPushLiveCarWindow extends V2XBasWindow implements IV2XWindow { //Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。"); - // 移出Window详细信息 + //移出Window详细信息 //移除窗体 V2XServiceManager .getMogoTopViewManager() diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XRoadLiveCarScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XRoadLiveCarScenario.java index 87c3408f56..a42a33ca8f 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XRoadLiveCarScenario.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XRoadLiveCarScenario.java @@ -73,11 +73,11 @@ public class V2XRoadLiveCarScenario extends AbsV2XScenario ownerCarStateRectList ) { - - if ( logWriter == null ) { - SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddhhmmss" ); - String date = sdf.format( new Date() ); - String path = context.getExternalCacheDir().getAbsolutePath() + "/adaslog/" + date + "/ownerCarStateInfo.txt"; - Logger.d( TAG, path ); - logWriter = new LogWriter( path ); - } - logWriter.write( ownerCarStateRectList ); // 物体识别返回 Logger.d( TAG, "ADAS-REC-received data: size = %s", ownerCarStateRectList == null ? 0 : ownerCarStateRectList.size() ); final long start = System.currentTimeMillis();