diff --git a/OCH/mogo-och-bus-passenger/build.gradle b/OCH/mogo-och-bus-passenger/build.gradle index af805de9a1..0677d0aacd 100644 --- a/OCH/mogo-och-bus-passenger/build.gradle +++ b/OCH/mogo-och-bus-passenger/build.gradle @@ -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') } } diff --git a/OCH/mogo-och-common-module/build.gradle b/OCH/mogo-och-common-module/build.gradle index 6bcce00b7e..4045e3d793 100644 --- a/OCH/mogo-och-common-module/build.gradle +++ b/OCH/mogo-och-common-module/build.gradle @@ -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') } diff --git a/OCH/mogo-och-taxi-passenger/build.gradle b/OCH/mogo-och-taxi-passenger/build.gradle index a682c2e839..03c8289c7f 100644 --- a/OCH/mogo-och-taxi-passenger/build.gradle +++ b/OCH/mogo-och-taxi-passenger/build.gradle @@ -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') } } diff --git a/OCH/mogo-och-taxi/build.gradle b/OCH/mogo-och-taxi/build.gradle index f802637796..8ca98d2c2c 100644 --- a/OCH/mogo-och-taxi/build.gradle +++ b/OCH/mogo-och-taxi/build.gradle @@ -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') } } diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/TaxiOverlayManager.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/TaxiOverlayManager.java deleted file mode 100644 index d525f97b1b..0000000000 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/TaxiOverlayManager.java +++ /dev/null @@ -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 mPolylinePointList; - // 渐变色 - private List 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 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; - } - -} diff --git a/app/build.gradle b/app/build.gradle index 734265a7d3..b1a2ae93b4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 ==“ ” + // 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会忽略满足上述条件的所有变体 diff --git a/core/function-impl/mogo-core-function-obu-mogo/README.md b/core/function-impl/mogo-core-function-datacenter/README.md similarity index 100% rename from core/function-impl/mogo-core-function-obu-mogo/README.md rename to core/function-impl/mogo-core-function-datacenter/README.md diff --git a/core/function-impl/mogo-core-function-datacenter/build.gradle b/core/function-impl/mogo-core-function-datacenter/build.gradle index a4c999e435..57db40dfb8 100644 --- a/core/function-impl/mogo-core-function-datacenter/build.gradle +++ b/core/function-impl/mogo-core-function-datacenter/build.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') - - } } diff --git a/core/function-impl/mogo-core-function-obu-mogo/doc/ALPSALPINE CV2X AMI Specification v1.0.7.pdf b/core/function-impl/mogo-core-function-datacenter/doc/ALPSALPINE CV2X AMI Specification v1.0.7.pdf similarity index 100% rename from core/function-impl/mogo-core-function-obu-mogo/doc/ALPSALPINE CV2X AMI Specification v1.0.7.pdf rename to core/function-impl/mogo-core-function-datacenter/doc/ALPSALPINE CV2X AMI Specification v1.0.7.pdf diff --git a/core/function-impl/mogo-core-function-obu-mogo/doc/AMI通讯协议.docx b/core/function-impl/mogo-core-function-datacenter/doc/AMI通讯协议.docx similarity index 100% rename from core/function-impl/mogo-core-function-obu-mogo/doc/AMI通讯协议.docx rename to core/function-impl/mogo-core-function-datacenter/doc/AMI通讯协议.docx diff --git a/core/function-impl/mogo-core-function-obu-mogo/doc/CV2X_HLI_v1.0.1.pdf b/core/function-impl/mogo-core-function-datacenter/doc/CV2X_HLI_v1.0.1.pdf similarity index 100% rename from core/function-impl/mogo-core-function-obu-mogo/doc/CV2X_HLI_v1.0.1.pdf rename to core/function-impl/mogo-core-function-datacenter/doc/CV2X_HLI_v1.0.1.pdf diff --git a/core/function-impl/mogo-core-function-obu-mogo/doc/HLI通讯协议.docx b/core/function-impl/mogo-core-function-datacenter/doc/HLI通讯协议.docx similarity index 100% rename from core/function-impl/mogo-core-function-obu-mogo/doc/HLI通讯协议.docx rename to core/function-impl/mogo-core-function-datacenter/doc/HLI通讯协议.docx diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/AndroidManifest.xml b/core/function-impl/mogo-core-function-datacenter/src/main/AndroidManifest.xml index ee1c554d89..e641d09ce5 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/AndroidManifest.xml +++ b/core/function-impl/mogo-core-function-datacenter/src/main/AndroidManifest.xml @@ -1,6 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotProvider.kt index 7cf7e5da02..cc50534c63 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotProvider.kt @@ -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 : diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MoGoObuProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MoGoObuProvider.kt similarity index 98% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MoGoObuProvider.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MoGoObuProvider.kt index 2f8b946bee..b8c85a0b37 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MoGoObuProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MoGoObuProvider.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoObuConst.java b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuConst.java similarity index 95% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoObuConst.java rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuConst.java index c4aa8f0906..8134f27b41 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoObuConst.java +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuConst.java @@ -1,4 +1,4 @@ -package com.mogo.eagle.core.function.obu.mogo; +package com.mogo.eagle.core.function.datacenter.obu; /** * author : lxiiaopeng diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoObuDcCombineManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt similarity index 99% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoObuDcCombineManager.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt index f95f73480d..8950dd989b 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoObuDcCombineManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt similarity index 99% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt index b6fcf64afc..ed185ab548 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuRsuTestTriggerReceiver.kt similarity index 97% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuRsuTestTriggerReceiver.kt index 644de55099..d79a247af1 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuRsuTestTriggerReceiver.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestNewObuReceiver.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestNewObuReceiver.kt similarity index 91% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestNewObuReceiver.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestNewObuReceiver.kt index 17f677cd98..ed1abd5575 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestNewObuReceiver.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestNewObuReceiver.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestNewObuRsiReceiver.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestNewObuRsiReceiver.kt similarity index 82% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestNewObuRsiReceiver.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestNewObuRsiReceiver.kt index c216a9e7be..f0b78a14f8 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestNewObuRsiReceiver.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestNewObuRsiReceiver.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestTriggerReceiver.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestTriggerReceiver.kt similarity index 96% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestTriggerReceiver.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestTriggerReceiver.kt index de530930bd..052107741e 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestTriggerReceiver.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestTriggerReceiver.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestTriggerRecognizedReceiver.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestTriggerRecognizedReceiver.kt similarity index 93% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestTriggerRecognizedReceiver.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestTriggerRecognizedReceiver.kt index fa51916e3b..cd7f5ce3df 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuTestTriggerRecognizedReceiver.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/receiver/ObuTestTriggerRecognizedReceiver.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-obu-mogo/consumer-rules.pro b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/utils/TrafficDataConvertUtils.kt similarity index 100% rename from core/function-impl/mogo-core-function-obu-mogo/consumer-rules.pro rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/utils/TrafficDataConvertUtils.kt diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/utils/TrafficDataConvertUtilsNew.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/utils/TrafficDataConvertUtilsNew.kt similarity index 98% rename from core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/utils/TrafficDataConvertUtilsNew.kt rename to core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/utils/TrafficDataConvertUtilsNew.kt index 7a253a920d..551c4d9c8b 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/utils/TrafficDataConvertUtilsNew.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/utils/TrafficDataConvertUtilsNew.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-hmi/build.gradle b/core/function-impl/mogo-core-function-hmi/build.gradle index 26c469da4b..86fe27008a 100644 --- a/core/function-impl/mogo-core-function-hmi/build.gradle +++ b/core/function-impl/mogo-core-function-hmi/build.gradle @@ -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') diff --git a/core/function-impl/mogo-core-function-obu-mogo/.gitignore b/core/function-impl/mogo-core-function-obu-mogo/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/core/function-impl/mogo-core-function-obu-mogo/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-obu-mogo/build.gradle b/core/function-impl/mogo-core-function-obu-mogo/build.gradle deleted file mode 100644 index 5f05fb457c..0000000000 --- a/core/function-impl/mogo-core-function-obu-mogo/build.gradle +++ /dev/null @@ -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() \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-obu-mogo/gradle.properties b/core/function-impl/mogo-core-function-obu-mogo/gradle.properties deleted file mode 100644 index 0d4b689fa3..0000000000 --- a/core/function-impl/mogo-core-function-obu-mogo/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.eagle.core.function.impl -POM_ARTIFACT_ID=obu-mogo -VERSION_CODE=1 diff --git a/core/function-impl/mogo-core-function-obu-mogo/proguard-rules.pro b/core/function-impl/mogo-core-function-obu-mogo/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/core/function-impl/mogo-core-function-obu-mogo/proguard-rules.pro +++ /dev/null @@ -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 \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/AndroidManifest.xml b/core/function-impl/mogo-core-function-obu-mogo/src/main/AndroidManifest.xml deleted file mode 100644 index 1f72d0c85c..0000000000 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/AndroidManifest.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt deleted file mode 100644 index e291c91433..0000000000 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt +++ /dev/null @@ -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 - } - } - } -} \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt index fe41e2e245..6f2b6348d7 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoRoboBusJinlvM1StatesListener.kt @@ -1,6 +1,5 @@ package com.mogo.eagle.core.function.api.autopilot -import chassis.ChassisStatesOuterClass import chassis.VehicleStateOuterClass /** diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index a19f54dc4f..e158d6bced 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -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() { diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md index 6d3fa01f95..313da68621 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/REEADME.md @@ -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 diff --git a/modules.txt b/modules.txt index 4286b0eb33..775878c1c2 100644 --- a/modules.txt +++ b/modules.txt @@ -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 diff --git a/settings.gradle b/settings.gradle index c262ab3649..4954d993e1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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' // 模块