diff --git a/app/README.md b/app/README.md index fb3b7736f9..a74139426c 100644 --- a/app/README.md +++ b/app/README.md @@ -2,6 +2,10 @@ ## 加载模块 +### 模块加载顺序(必须按照这个顺序) +因为模块之间有状态依赖关系,例如:Http-DNS是否初始化完成,是否进入VR模式、定位服务是否可用、地图是否加载完成 + + ## 初始化部分服务 ## 定义 flavor diff --git a/app/build.gradle b/app/build.gradle index 5e5bd5f4d6..aeef22bbed 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'android-aspectjx' -Properties properties = new Properties(); +Properties properties = new Properties() properties.load(project.rootProject.file("gradle.properties").newDataInputStream()) android { @@ -475,8 +475,9 @@ dependencies { if (Boolean.valueOf(RELEASE)) { implementation rootProject.ext.dependencies.mogocommons - implementation rootProject.ext.dependencies.modulecommon implementation rootProject.ext.dependencies.mogobasewebsocketsdk + implementation rootProject.ext.dependencies.modulecommon + implementation rootProject.ext.dependencies.mogomodulecheck implementation rootProject.ext.dependencies.modulesearch implementation rootProject.ext.dependencies.mogomoduleauth implementation rootProject.ext.dependencies.modulesplash @@ -494,6 +495,7 @@ dependencies { implementation project(':foudations:mogo-commons') implementation project(':foudations:mogo-base-websocket-sdk') implementation project(':modules:mogo-module-common') + implementation project(':modules:mogo-module-check') implementation project(':modules:mogo-module-search') implementation project(':modules:mogo-module-authorize') implementation project(':modules:mogo-module-service') diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 208ff80e70..ad16928b8f 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -287,18 +287,19 @@ public class MogoApplication extends AbsMogoApplication { MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_STRATEGY_SHARE, "StrategyShare")); MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GAODE_AIMLESS_SHARE, "GaoDeAimlessShare")); MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor")); + // 自动驾驶系统检测模块 + MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_CHECK, "CheckProvider")); + // 推送模块 MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, PushUIConstants.NAME)); // 碰撞报警模块 MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_CRASH_WARNING, "CrashWarning")); -// MogoModulePaths.addModule( new MogoModule( IMogoMachineVisionProvider.path, "IMogoMachineVisionProvider" ) ); - // 小地图模块 MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_SMALL_MAP, "IMogoSmallMapProvider")); // ADAS模块 MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider")); - //前方碰撞预警 + // 前方碰撞预警 MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_FRONT_CRASH_WARNING, "IV2XManagerProvider")); - + // 全局语音唤醒 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake")); if (!DebugConfig.isLauncher()) { diff --git a/config.gradle b/config.gradle index 60f5f6a454..0c76c33b14 100644 --- a/config.gradle +++ b/config.gradle @@ -108,12 +108,12 @@ ext { mogoservice : "com.mogo.service:mogo-service:${MOGO_SERVICE_VERSION}", mogoserviceapi : "com.mogo.service:mogo-service-api:${MOGO_SERVICE_API_VERSION}", moduleapps : "com.mogo.module:module-apps:${MOGO_MODULE_APPS_VERSION}", - mogoconnection : "com.mogo.connection:mogo-connection:${MOGO_CONNECTION_VERSION}", moduleextensions : "com.mogo.module:module-extensions:${MOGO_MODULE_EXTENSIONS_VERSION}", callchat : "com.mogo.module.carchatout:module-carchatting:${CARCHATTING_VERSION}", callchatprovider : "com.mogo.module.carchatout:module-carchatting-provider:${CARCHATTINGPROVIDER_VERSION}", guideshow : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDESHOW_VERSION}", + mogomodulecheck : "com.mogo.module:mogo-module-check:${MOGO_MODULE_CHECK_VERSION}", // V2X moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}", moduleSmallMap : "com.mogo.module:module-small-map:${MOGO_MODULES_SMALL_MAP}", diff --git a/gradle.properties b/gradle.properties index 79a33b8505..1358058584 100644 --- a/gradle.properties +++ b/gradle.properties @@ -62,6 +62,7 @@ MOGO_SERVICE_VERSION=2.0.12 MOGO_SERVICE_API_VERSION=2.0.14 MOGO_CONNECTION_VERSION=2.0.12 MOGO_MODULE_APPS_VERSION=2.0.12 +MOGO_MODULE_CHECK_VERSION=2.0.12 MOGO_MODULE_NAVI_VERSION=2.0.12 MOGO_MODULE_SHARE_VERSION=2.0.12 MOGO_MODULE_COMMON_VERSION=2.0.12 diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/占位文件可删除.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/占位文件可删除.java deleted file mode 100644 index 5d869e103a..0000000000 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/占位文件可删除.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.mogo.module.adas; - -/** - * @author donghongyu - * @date 4/21/21 2:52 PM - */ -public class 占位文件可删除 { - /** TODO 本模块提供能力范围 - * 1、与工控机数据交互,具体能力与 @宋克难 沟通 - * a、建立车机与工控机的数据通路 - * b、保证数据通路的稳定性 - * - * 2、暴露API接口共上层业务使用 - * a、上层业务可主动订阅、取消订阅数据 - * b、自动驾驶控制下发 - * b、自动驾驶状态获取 - * c、自动驾驶规划路径下发 - * e、ADAS识别报警 - * - * 3、项目中已经使用到的ADAS数据的业务如下,可参考下面业务层使用情况来封装本模块的API - * AdasControlCommandParameter - * AdasLogWriter - * AdasObjectUtils - * CarModelInfoNetApiServices - * LogWriter - * MogoADASController - * OnAdasListenerAdapter - */ - -} diff --git a/modules/mogo-module-check/.gitignore b/modules/mogo-module-check/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/modules/mogo-module-check/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/modules/mogo-module-check/README.md b/modules/mogo-module-check/README.md new file mode 100644 index 0000000000..e88aa5b838 --- /dev/null +++ b/modules/mogo-module-check/README.md @@ -0,0 +1,37 @@ +# 状态检测模块 +硬件检测范围 + 主激光雷达 + 侧激光雷达-2个 + ADAS长焦摄像头-前 + ADAS广角摄像头-前 + ADAS标准摄像头-前 + ADAS广角摄像头-后 + RTK设备 + OUB设备 + PAD + 路由器 + +软件检测范围 节点 + 车控节点 + 轨迹地图加载节点 + 轨迹规划节点 + 定位转化节点 + 融合节点 + yolov5节点(包含红绿灯检测) + 激光雷达渲染节点 + 摄像头驱动节点 + gnss定位驱动节点 + 中激光驱动节点 + 左激光解码节点 + 左激光驱动节点 + 右激光解码节点 + 右激光驱动节点 + 监控节点 + 通讯交互节点 + 轨迹录制节点 + can车辆控制节点 + 鹰眼 + +版本更新 + 自动驾驶版本 + 鹰眼版本 \ No newline at end of file diff --git a/modules/mogo-module-check/build.gradle b/modules/mogo-module-check/build.gradle new file mode 100644 index 0000000000..00725adbb5 --- /dev/null +++ b/modules/mogo-module-check/build.gradle @@ -0,0 +1,67 @@ +apply plugin: 'com.android.library' +apply plugin: 'com.alibaba.arouter' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' + +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") + + javaCompileOptions { + annotationProcessorOptions { + arguments = [AROUTER_MODULE_NAME: project.getName()] + } + } + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles 'consumer-rules.pro' + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation rootProject.ext.dependencies.androidxappcompat + implementation rootProject.ext.dependencies.androidxrecyclerview + implementation rootProject.ext.dependencies.androidxconstraintlayout + implementation rootProject.ext.dependencies.arouter + implementation rootProject.ext.dependencies.callchatprovider + implementation rootProject.ext.dependencies.coroutinesandroid + implementation rootProject.ext.dependencies.coroutinescore + implementation rootProject.ext.dependencies.kotlinstdlibjdk7 + + annotationProcessor rootProject.ext.dependencies.aroutercompiler + + if (Boolean.valueOf(RELEASE)) { + api rootProject.ext.dependencies.mogomap + api rootProject.ext.dependencies.mogomapapi + api rootProject.ext.dependencies.mogoutils + api rootProject.ext.dependencies.mogocommons + api rootProject.ext.dependencies.mogoserviceapi + } else { + api project(":libraries:mogo-map") + api project(":libraries:mogo-map-api") + api project(":foudations:mogo-utils") + api project(":foudations:mogo-commons") + api project(':services:mogo-service-api') + } + + +} + +apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() diff --git a/modules/mogo-module-check/consumer-rules.pro b/modules/mogo-module-check/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/modules/mogo-module-check/gradle.properties b/modules/mogo-module-check/gradle.properties new file mode 100644 index 0000000000..622ce1b86c --- /dev/null +++ b/modules/mogo-module-check/gradle.properties @@ -0,0 +1,3 @@ +GROUP=com.mogo.module +POM_ARTIFACT_ID=module-check +VERSION_CODE=1 diff --git a/modules/mogo-module-check/proguard-rules.pro b/modules/mogo-module-check/proguard-rules.pro new file mode 100644 index 0000000000..481bb43481 --- /dev/null +++ b/modules/mogo-module-check/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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/modules/mogo-module-check/src/main/AndroidManifest.xml b/modules/mogo-module-check/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..a64fef9896 --- /dev/null +++ b/modules/mogo-module-check/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/modules/mogo-module-check/src/main/java/com/mogo/module/check/CheckProvider.java b/modules/mogo-module-check/src/main/java/com/mogo/module/check/CheckProvider.java new file mode 100644 index 0000000000..85b4651d3e --- /dev/null +++ b/modules/mogo-module-check/src/main/java/com/mogo/module/check/CheckProvider.java @@ -0,0 +1,27 @@ +package com.mogo.module.check; + +import android.content.Context; + +import com.alibaba.android.arouter.facade.annotation.Route; +import com.alibaba.android.arouter.facade.template.IProvider; +import com.mogo.service.MogoServicePaths; +import com.mogo.utils.logger.Logger; + + +/** + * 鹰眼系统、自动驾驶系统 检测模块 + * + * @date 4/21/21 3:39 PM + * 需求地址 + * wiki:http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=58204952 + */ +@Route(path = MogoServicePaths.PATH_CHECK) +public class CheckProvider implements IProvider { + private static final String TAG = "CheckProvider"; + + @Override + public void init(Context context) { + Logger.d(TAG, "初始化 CheckProvider 模块"); + } + +} diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java b/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java index 70ddff1453..a326988f48 100644 --- a/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java +++ b/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java @@ -316,8 +316,14 @@ public class MogoServicePaths { */ public static final String PATH_ADAS = "/adas/api"; - /* - *前方碰撞预警 未碰撞 - * */ + /** + * 前方碰撞预警 未碰撞 + */ public static final String PATH_V2X_FRONT_CRASH_WARNING = "/front/crashwarning"; + + /** + * ADAS 模块 + */ + public static final String PATH_CHECK = "/check/api"; + } diff --git a/services/mogo-service/build.gradle b/services/mogo-service/build.gradle index 6c0a4d07b8..ed8d601ffa 100644 --- a/services/mogo-service/build.gradle +++ b/services/mogo-service/build.gradle @@ -42,19 +42,22 @@ dependencies { annotationProcessor rootProject.ext.dependencies.aroutercompiler implementation rootProject.ext.dependencies.adasapi implementation rootProject.ext.dependencies.adasconfigapi - implementation project(':modules:mogo-module-adas') if (Boolean.valueOf(RELEASE)) { api rootProject.ext.dependencies.mogomap implementation rootProject.ext.dependencies.mogomapapi implementation rootProject.ext.dependencies.mogoutils implementation rootProject.ext.dependencies.mogocommons implementation rootProject.ext.dependencies.mogoserviceapi + implementation rootProject.ext.dependencies.moduleADAS + implementation rootProject.ext.dependencies.mogomodulecheck } else { api project(":libraries:mogo-map") implementation project(":libraries:mogo-map-api") implementation project(":foudations:mogo-utils") implementation project(":foudations:mogo-commons") implementation project(":services:mogo-service-api") + implementation project(':modules:mogo-module-adas') + implementation project(':modules:mogo-module-check') } } diff --git a/settings.gradle b/settings.gradle index 9a79d7e08c..b840c9221f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,5 @@ include ':modules:mogo-module-adas' +include ':modules:mogo-module-check' include ':foudations:mogo-aicloud-services-sdk' include ':foudations:mogo-aicloud-services-apk' include ':foudations:httpdns-mogo'