Merge branch 'dev2_aiSdk' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into dev2_aiSdk
This commit is contained in:
@@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<MogoLatLng> 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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<!-- module_map_layout_navi_info_panel.xml-->
|
||||
<dimen name="module_ext_top_view_width">1058px</dimen>
|
||||
<dimen name="module_ext_top_view_width_in_vr_mode">822px</dimen>
|
||||
<dimen name="module_ext_top_view_no_link_width_in_vr_mode">700px</dimen>
|
||||
<dimen name="module_ext_top_view_no_link_width_in_vr_mode">615px</dimen>
|
||||
<dimen name="module_ext_navi_info_panel_width">544px</dimen>
|
||||
<dimen name="module_ext_navi_info_panel_height">117px</dimen>
|
||||
<dimen name="module_ext_navi_info_panel_small_height">80px</dimen>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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<V2XWarning
|
||||
// 解析不同的Marker类型,然后对应的进行绘制
|
||||
if (info != null) {
|
||||
// 解析存储道路事件 liyz
|
||||
Log.d(V2XConst.LOG_NAME_WARN, "V2XWarnMessageListener onMsgReceived ----> ");
|
||||
V2XServiceManager.getMoGoV2XCloundDataManager().analysisV2XCloundDataEvent(info);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
||||
|
||||
// 连接线参数
|
||||
MogoPolylineOptions options = new MogoPolylineOptions();
|
||||
|
||||
List<Integer> 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);
|
||||
}
|
||||
|
||||
@@ -60,11 +60,11 @@ public class V2XPushLiveCarScenario extends AbsV2XScenario<V2XPushMessageEntity>
|
||||
@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);
|
||||
|
||||
@@ -142,7 +142,7 @@ public class V2XPushLiveCarWindow extends V2XBasWindow implements IV2XWindow<V2X
|
||||
if (runnableV2XEvent == null) {
|
||||
runnableV2XEvent = () -> {
|
||||
//Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。");
|
||||
// 移出Window详细信息
|
||||
//移出Window详细信息
|
||||
//移除窗体
|
||||
V2XServiceManager
|
||||
.getMogoTopViewManager()
|
||||
|
||||
@@ -73,11 +73,11 @@ public class V2XRoadLiveCarScenario extends AbsV2XScenario<List<V2XEventShowEnti
|
||||
public void showWindow() {
|
||||
Log.d(TAG, getV2XWindow().toString());
|
||||
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);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rlRoadEventDetail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_394"
|
||||
android:layout_height="@dimen/dp_366"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -1,18 +1,29 @@
|
||||
{
|
||||
"type":0,
|
||||
"lat":39.977148,
|
||||
"lon":116.417478,
|
||||
"type": 0,
|
||||
"lat": 39.977148,
|
||||
"lon": 116.417478,
|
||||
"distance": 2.22,
|
||||
"collisionLat": 39.977094,
|
||||
"collisionLon": 116.417634,
|
||||
"stopLines":[
|
||||
{
|
||||
"stopLineLat": 39.977082,
|
||||
"stopLineLon": 116.417553
|
||||
},
|
||||
{
|
||||
"stopLineLat": 39.977078,
|
||||
"stopLineLon": 116.417666
|
||||
}
|
||||
],
|
||||
"from": 1,
|
||||
"angle": 120,
|
||||
"direction": 10014,
|
||||
"speed":11.108121,
|
||||
"speed": 11.108121,
|
||||
"targetColor": "#FF4040",
|
||||
"stopLineDistance":20,
|
||||
"stopLineDistance": 20,
|
||||
"stopLineLat": 39.977094,
|
||||
"stopLineLon": 116.417634,
|
||||
"warningContent": "小心行人",
|
||||
"heading": 30
|
||||
"heading": 30,
|
||||
"showTime": 3000
|
||||
}
|
||||
@@ -420,19 +420,8 @@ public class MogoADASController implements IMogoADASController {
|
||||
}
|
||||
}
|
||||
|
||||
private LogWriter logWriter;
|
||||
|
||||
@Override
|
||||
public void notifyOwnerCarRect( List< AdasAIDLOwnerCarRectModel > 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();
|
||||
|
||||
Reference in New Issue
Block a user