配置了ADAS模块,用来将ADAS App中的数据链路融合进来

This commit is contained in:
董宏宇
2021-04-21 15:54:29 +08:00
parent 9c38981e87
commit 78fc224455
17 changed files with 202 additions and 0 deletions

1
.idea/gradle.xml generated
View File

@@ -41,6 +41,7 @@
<option value="$PROJECT_DIR$/main-extensions/mogo-module-main-independent" />
<option value="$PROJECT_DIR$/main-extensions/mogo-module-main-launcher" />
<option value="$PROJECT_DIR$/modules" />
<option value="$PROJECT_DIR$/modules/mogo-module-adas" />
<option value="$PROJECT_DIR$/modules/mogo-module-apps" />
<option value="$PROJECT_DIR$/modules/mogo-module-authorize" />
<option value="$PROJECT_DIR$/modules/mogo-module-back" />

View File

@@ -612,6 +612,7 @@ dependencies {
implementation project(':modules:mogo-module-extensions')
implementation project(':modules:mogo-module-map')
implementation project(':modules:mogo-module-smp')
implementation project(':modules:mogo-module-adas')
implementation project(':foudations:httpdns-mogo')
}

View File

@@ -102,6 +102,8 @@ public class MogoApplication extends AbsMogoApplication {
// 小地图模块
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"));

View File

@@ -113,6 +113,7 @@ ext {
// V2X
moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}",
moduleSmallMap : "com.mogo.module:module-small-map:${MOGO_MODULES_SMALL_MAP}",
moduleADAS : "com.mogo.module:mogo-module-adas:${MOGO_MODULES_ADAS}",
modulemedia : "com.mogo.module:module-media:${MOGO_MODULE_MEDIA_VERSION}",
modulesearch : "com.mogo.module:module-search:${MOGO_MODULE_SEARCH_VERSION}",
// push

View File

@@ -131,6 +131,7 @@ TTS_NOOP_VERSION=2.0.12
MAP_CUSTOM_VERSION=2.0.12
#MOGO_MODULES_MVISION_VERSION=2.0.12
MOGO_MODULES_SMALL_MAP=1.0.0
MOGO_MODULES_ADAS=1.0.0
# httpdns
HTTPDNS_TENCENT_VERSION = 2.0.12
HTTPDNS_MOGO_VERSION=2.0.12

1
modules/mogo-module-adas/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,62 @@
apply plugin: 'com.android.library'
apply plugin: 'com.alibaba.arouter'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
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 rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
// 现有的ADAS的通讯SDK需要将里面的东西融合到我们项目中
compileOnly rootProject.ext.dependencies.adasapi
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {
api rootProject.ext.dependencies.mogoutils
api rootProject.ext.dependencies.mogocommons
api rootProject.ext.dependencies.mogoserviceapi
implementation rootProject.ext.dependencies.modulecommon
} else {
api project(":foudations:mogo-utils")
api project(":foudations:mogo-commons")
api project(':services:mogo-service-api')
implementation project(':modules:mogo-module-common')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -0,0 +1,3 @@
GROUP=com.mogo.module
POM_ARTIFACT_ID=mogo-module-adas
VERSION_CODE=1

View File

@@ -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

View File

@@ -0,0 +1,26 @@
package com.amap.navi.mogo_module_adas;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.amap.navi.mogo_module_adas.test", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.module.adas">
</manifest>

View File

@@ -0,0 +1,25 @@
package com.mogo.module.adas;
import android.content.Context;
import android.util.Log;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.service.MogoServicePaths;
/**
* ADAS 模块
*
* @author
* @date 4/21/21 3:39 PM
*/
@Route(path = MogoServicePaths.PATH_ADAS)
public class AdasProvider implements IProvider {
private final String TAG = "AdasProvider";
@Override
public void init(Context context) {
Log.d(TAG, "初始化 ADAS 模块");
}
}

View File

@@ -0,0 +1,30 @@
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
*/
}

View File

@@ -0,0 +1,17 @@
package com.amap.navi.mogo_module_adas;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

View File

@@ -311,6 +311,11 @@ public class MogoServicePaths {
*/
public static final String PATH_SMALL_MAP = "/small_map/api";
/**
* ADAS 模块
*/
public static final String PATH_ADAS = "/adas/api";
/*
*前方碰撞预警 未碰撞
* */

View File

@@ -1,3 +1,4 @@
include ':modules:mogo-module-adas'
include ':foudations:mogo-aicloud-services-sdk'
include ':foudations:mogo-aicloud-services-apk'
include ':foudations:httpdns-mogo'