fixed obu conflict
This commit is contained in:
@@ -57,7 +57,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_hmi
|
||||
}else {
|
||||
implementation project(':foudations:mogo-aicloud-services-sdk')
|
||||
@@ -65,7 +64,6 @@ dependencies {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,14 +62,12 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_hmi
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
}
|
||||
|
||||
|
||||
@@ -60,14 +60,12 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:mogo-core-res')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,14 +59,12 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_hmi
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
package com.mogo.och.taxi;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
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;
|
||||
|
||||
public class TaxiOverlayManager {
|
||||
|
||||
|
||||
private IMogoPolyline mMoGoPolyline;
|
||||
// 连接线参数
|
||||
private MogoPolylineOptions mPolylineOptions;
|
||||
// 线路径集合
|
||||
private List<MogoLatLng> mPolylinePointList;
|
||||
// 渐变色
|
||||
private List<Integer> mPolylineColors;
|
||||
private Context mContext;
|
||||
IMogoOverlayManager mogoOverlayManager;
|
||||
public TaxiOverlayManager(Context context) {
|
||||
mPolylineOptions = new MogoPolylineOptions();
|
||||
// 绘制路径集合
|
||||
mPolylinePointList = new ArrayList<>();
|
||||
// 引导线颜色
|
||||
mPolylineColors = new ArrayList<>();
|
||||
mContext = context;
|
||||
mogoOverlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制最优路线
|
||||
*
|
||||
* @param polylinePoint 要绘制的经纬度度集合
|
||||
*/
|
||||
public IMogoPolyline draw(MogoLocation carLocal, List<MogoLatLng> 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);
|
||||
// 绘制线
|
||||
mMoGoPolyline = mogoOverlayManager.addPolyline(mPolylineOptions);
|
||||
}
|
||||
return mMoGoPolyline;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -210,6 +210,9 @@ android {
|
||||
buildConfigField 'String', 'MAP_SDK_VERSION', "\"${MAP_SDK_VERSION}\""
|
||||
buildConfigField 'String', 'MAP_SDK_OPT_VERSION', "\"${MAP_SDK_OPERATION_VERSION}\""
|
||||
}
|
||||
noop {
|
||||
dimension "business"
|
||||
}
|
||||
busbase {
|
||||
dimension "business"
|
||||
}
|
||||
@@ -253,6 +256,12 @@ android {
|
||||
variantFilter { variant ->
|
||||
def names = variant.flavors*.name
|
||||
//要检查特定的构建类型,请使用variant.buildType.name ==“ <buildType>”
|
||||
// region 过滤noop 的flavors 不带och业务的
|
||||
if (names.contains("noop")&&!names.contains("fPadLenovo")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
setIgnore(true)
|
||||
}
|
||||
// endregion
|
||||
// region 过滤sweper 的flavors
|
||||
if (names.contains("sweeper")&&!names.contains("fPadLenovoOchSweeper")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
|
||||
@@ -56,13 +56,15 @@ dependencies {
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoaicloudtelematic
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoobu
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
|
||||
implementation project(':libraries:mogo-adas')
|
||||
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
@@ -70,8 +72,6 @@ dependencies {
|
||||
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.datacenter">
|
||||
|
||||
<application>
|
||||
<receiver android:name=".obu.receiver.ObuTestTriggerReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_trigger" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".obu.receiver.ObuTestTriggerRecognizedReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_trigger_recognized" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".obu.receiver.ObuRsuTestTriggerReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_light_recognized" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".obu.receiver.ObuTestNewObuReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_newobu" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".obu.receiver.ObuTestNewObuRsiReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_newobu_rsi" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -62,9 +62,9 @@ import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
/**
|
||||
* 域控制器
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/22 8:43 下午
|
||||
* 域控制器
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_AUTO_PILOT)
|
||||
class MoGoAutopilotProvider :
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo
|
||||
package com.mogo.eagle.core.function.datacenter.obu
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo;
|
||||
package com.mogo.eagle.core.function.datacenter.obu;
|
||||
|
||||
/**
|
||||
* author : lxiiaopeng
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo
|
||||
package com.mogo.eagle.core.function.datacenter.obu
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo
|
||||
package com.mogo.eagle.core.function.datacenter.obu
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -19,7 +19,7 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallObuLimitingSpeedListenerManager
|
||||
import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtilsNew
|
||||
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoObuConst
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
//import com.zhidao.support.obu.constants.ObuConstants
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuNewManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuNewManager
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData
|
||||
import com.mogo.support.obu.model.advance.V2xWarning
|
||||
import com.mogo.support.obu.model.advance.VehBasics
|
||||
@@ -1,16 +1,11 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuNewManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuNewManager
|
||||
import com.mogo.support.obu.model.MogoObuRsiWarningData
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData
|
||||
import com.mogo.support.obu.model.advance.RsiWarning
|
||||
import com.mogo.support.obu.model.advance.V2xWarning
|
||||
import com.mogo.support.obu.model.advance.VehBasics
|
||||
import com.mogo.support.obu.model.advance.WarningData
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoObuConst
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
//import com.zhidao.support.obu.constants.ObuConstants
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoObuConst
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
//import com.zhidao.support.obu.model.CvxHvInfoIndInfo
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.utils
|
||||
package com.mogo.eagle.core.function.datacenter.obu.utils
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -86,7 +86,6 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogo_core_data
|
||||
api rootProject.ext.dependencies.mogo_core_utils
|
||||
api rootProject.ext.dependencies.mogo_core_network
|
||||
api rootProject.ext.dependencies.mogo_core_function_obu_mogo
|
||||
api rootProject.ext.dependencies.mogo_core_function_map
|
||||
api rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
api rootProject.ext.dependencies.mogo_core_function_devatools
|
||||
@@ -102,7 +101,6 @@ dependencies {
|
||||
api project(':core:mogo-core-res')
|
||||
api project(':core:mogo-core-data')
|
||||
api project(':core:mogo-core-utils')
|
||||
api project(':core:function-impl:mogo-core-function-obu-mogo')
|
||||
api project(':core:function-impl:mogo-core-function-map')
|
||||
api project(':core:function-impl:mogo-core-function-v2x')
|
||||
api project(':core:function-impl:mogo-core-function-devatools')
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,66 +0,0 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'kotlin-kapt'
|
||||
id 'com.alibaba.arouter'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode Integer.valueOf(VERSION_CODE)
|
||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
|
||||
//ARouter apt 参数
|
||||
kapt {
|
||||
useBuildCache = false
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
} else {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
}
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoobu
|
||||
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -1,3 +0,0 @@
|
||||
GROUP=com.mogo.eagle.core.function.impl
|
||||
POM_ARTIFACT_ID=obu-mogo
|
||||
VERSION_CODE=1
|
||||
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.obu.mogo">
|
||||
|
||||
|
||||
<application>
|
||||
<receiver android:name="com.mogo.eagle.core.function.obu.mogo.receiver.ObuTestTriggerReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_trigger" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name="com.mogo.eagle.core.function.obu.mogo.receiver.ObuTestTriggerRecognizedReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_trigger_recognized" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name="com.mogo.eagle.core.function.obu.mogo.receiver.ObuRsuTestTriggerReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_light_recognized" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name="com.mogo.eagle.core.function.obu.mogo.receiver.ObuTestNewObuReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_newobu" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name="com.mogo.eagle.core.function.obu.mogo.receiver.ObuTestNewObuRsiReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_newobu_rsi" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<IMoGoAutopilotStatusListener>() {
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -28,13 +28,11 @@ 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'
|
||||
|
||||
// 模块
|
||||
|
||||
Reference in New Issue
Block a user