@@ -47,9 +47,6 @@ adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei ob
|
||||
// (旧版本)使用命令行触发各种测试场景演示
|
||||
adb shell am broadcast -a com.v2x.test_panel_control --ei sceneType 1
|
||||
|
||||
// 右侧弱势交通参与者
|
||||
adb shell am broadcast -a com.v2x.adas_data_broadcast --es ADASData right
|
||||
|
||||
// 调用应用内的模拟
|
||||
adb shell am broadcast -a com.mogo.mock --ei oper 46
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_900"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="@dimen/dp_900"
|
||||
android:background="#FFFFFF">
|
||||
|
||||
<ScrollView
|
||||
@@ -139,6 +139,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#32009688"
|
||||
android:gravity="center"
|
||||
android:minHeight="48dp"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="192.168.1.199"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.module.common.drawer;
|
||||
|
||||
import static com.mogo.cloud.socket.entity.SocketDownDataHelper.FROM_ADAS;
|
||||
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -12,6 +13,7 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.module.common.drawer.bean.SpeedData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -213,7 +215,6 @@ public class IdentifyDataDrawer extends BaseDrawer {
|
||||
* @return {@link IMogoMarker}
|
||||
*/
|
||||
private IMogoMarker drawAdasRecognizedDataMarker(TrafficData recognizedListResult) {
|
||||
long start = System.nanoTime();
|
||||
if (recognizedListResult == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -9,13 +9,7 @@
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<!--adas数据-->
|
||||
<receiver android:name=".receiver.AdasDataBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.v2x.adas_data_broadcast" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
|
||||
<receiver android:name=".receiver.TestPanelBroadcastReceiver">
|
||||
<intent-filter>
|
||||
@@ -25,14 +19,6 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!--ugc上报状态反馈广播-->
|
||||
<receiver android:name=".receiver.UgcUploadStatusReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.v2x.ugc.upload.status" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.module.v2x;
|
||||
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
@@ -36,12 +34,6 @@ public class V2XConst {
|
||||
public static final String BROADCAST_SCENE_HANDLER_ACTION = "com.v2x.scene_handler_broadcast";
|
||||
public static final String BROADCAST_SCENE_EXTRA_KEY = "V2XMessageEntity";
|
||||
|
||||
/**
|
||||
* V2X ADASData Action
|
||||
*/
|
||||
public static final String BROADCAST_ADAS_SCENE_HANDLER_ACTION = "com.v2x.adas_data_broadcast";
|
||||
public static final String BROADCAST_ADAS_EXTRA_KEY = "ADASData";
|
||||
|
||||
/**
|
||||
* V2X 测试控制面板广播Action
|
||||
*/
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.mogo.module.v2x.receiver;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
|
||||
/**
|
||||
* 单车预警,车辆盲区预警,弱势交通参与者预警
|
||||
*/
|
||||
public class AdasDataBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
try {
|
||||
// ADASRecognizedResult adasResult = (ADASRecognizedResult) intent.getSerializableExtra(V2XConst.BROADCAST_ADAS_EXTRA_KEY);
|
||||
// Logger.d(V2XConst.LOG_NAME_WARN, "AdasDataBroadcastReceiver -->" + GsonUtil.jsonFromObject(adasResult));
|
||||
String adasResult = (String) intent.getSerializableExtra(V2XConst.BROADCAST_ADAS_EXTRA_KEY);
|
||||
Log.d(V2XConst.LOG_NAME_WARN, "AdasDataBroadcastReceiver -----> ");
|
||||
// V2XWaringManager.getInstance().handleAdasData(intent);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,10 @@ package com.mogo.module.v2x.receiver;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
/**
|
||||
* 场景广播接收,道路预警、后台下发、违章停车、故障求助、疲劳驾驶
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.mogo.module.v2x.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.module.common.entity.V2XMessageEntity
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity
|
||||
import com.mogo.module.v2x.V2XConst
|
||||
import com.mogo.module.v2x.alarm.V2XEarlyWarningServer
|
||||
|
||||
/**
|
||||
* ugc上报反馈
|
||||
* http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
|
||||
*/
|
||||
class UgcUploadStatusReceiver : BroadcastReceiver() {
|
||||
private val TAG = "UgcUploadStatusReceiver"
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
if (intent.action == "com.v2x.ugc.upload.status") {
|
||||
val id = intent.getLongExtra("id", 0)
|
||||
val type = intent.getStringExtra("type")
|
||||
val fromType = intent.getStringExtra("fromType")
|
||||
Log.d(V2XConst.MODULE_NAME + "_" + TAG, "后台上传道路事件成功:id=$id type=$type fromType=$fromType")
|
||||
|
||||
/*
|
||||
// 由于目前日活不多,所以先采用直接上传的方式,不进行用户反馈删除,
|
||||
// 先保证用户体验,建议后续还是将分享事件的修改为可以临时存储的方式@李小鹏
|
||||
// 记录新上传的Ugc事件Id
|
||||
V2XEarlyWarningServer.ugcEventId = id
|
||||
// 弹窗
|
||||
val v2xMessageEntity = V2XMessageEntity<V2XRoadEventEntity>()
|
||||
// 控制类型
|
||||
v2xMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING
|
||||
// 设置数据
|
||||
v2xMessageEntity.content = V2XEarlyWarningServer.currentUgcRoadEvent
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.isShowState = true
|
||||
|
||||
val intent = Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION)
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity)
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(intent)
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user