rebase
This commit is contained in:
@@ -78,6 +78,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class AMapViewWrapper implements IMogoMapView,
|
||||
IMogoMapUIController,
|
||||
LocationListener,
|
||||
@@ -906,32 +908,48 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
double speed = data.optDouble("speed", -1);
|
||||
long systemTime = data.optLong("systemTime");
|
||||
long satelliteTime = data.optLong("satelliteTime");
|
||||
long receiverDataTime = data.optLong("receiverDataTime");
|
||||
long adasSatelliteTime = data.optLong("adasSatelliteTime");
|
||||
int gpsProvider = data.optInt("gpsProvider", 1);
|
||||
|
||||
// 使用与渠道配置一样的gps提供者提供的数据,app/productFlavors/fPadLenovo.gradle GPS_PROVIDER 0-Android系统,1-工控机,2-OBU
|
||||
if (gpsProvider == FunctionBuildConfig.gpsProvider) {
|
||||
if (lon == -1) {
|
||||
return;
|
||||
}
|
||||
RTKAutopilotLocationBean bean = new RTKAutopilotLocationBean();
|
||||
bean.setYaw_rate(yawRate);
|
||||
bean.setHeading(heading);
|
||||
bean.setAcceleration(acceleration);
|
||||
bean.setAlt(alt);
|
||||
bean.setSystemTime(systemTime);
|
||||
bean.setSatelliteTime(satelliteTime);
|
||||
bean.setReceiverDataTime(receiverDataTime);
|
||||
bean.setAdasSatelliteTime(adasSatelliteTime);
|
||||
bean.setLon(lon);
|
||||
bean.setGnss_speed(((float) speed));
|
||||
bean.setLat(lat);
|
||||
// 使用外部定位数据修改自车位置
|
||||
mMapView.getLocationClient().updateRTKAutoPilotLocation(bean);
|
||||
CallerLocationUpdaterManager.INSTANCE.updateLocation(bean);
|
||||
CallerMapDataCollectorManager.INSTANCE.setIsInit();
|
||||
if (lon == -1) {
|
||||
return;
|
||||
}
|
||||
RTKAutopilotLocationBean bean = new RTKAutopilotLocationBean();
|
||||
bean.setYaw_rate(yawRate);
|
||||
bean.setHeading(heading);
|
||||
bean.setAcceleration(acceleration);
|
||||
bean.setAlt(alt);
|
||||
bean.setSystemTime(systemTime);
|
||||
bean.setSatelliteTime(satelliteTime);
|
||||
bean.setLon(lon);
|
||||
bean.setGnss_speed(((float) speed));
|
||||
bean.setLat(lat);
|
||||
// 使用外部定位数据修改自车位置
|
||||
mMapView.getLocationClient().updateRTKAutoPilotLocation(bean);
|
||||
CallerLocationUpdaterManager.INSTANCE.updateLocation(bean);
|
||||
CallerMapDataCollectorManager.INSTANCE.setIsInit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncLocation2Map(MessagePad.GnssInfo gnssInfo) {
|
||||
if (!checkAMapView()) {
|
||||
return;
|
||||
}
|
||||
if (gnssInfo.getLongitude() == -1) {
|
||||
return;
|
||||
}
|
||||
RTKAutopilotLocationBean bean = new RTKAutopilotLocationBean();
|
||||
bean.setYaw_rate(gnssInfo.getYawRate());
|
||||
bean.setHeading(gnssInfo.getHeading());
|
||||
bean.setAcceleration(gnssInfo.getAcceleration());
|
||||
bean.setAlt(gnssInfo.getAltitude());
|
||||
bean.setSystemTime(Double.valueOf(gnssInfo.getSystemTime()).longValue());
|
||||
bean.setSatelliteTime(Double.valueOf(gnssInfo.getSatelliteTime()).longValue());
|
||||
bean.setLon(gnssInfo.getLongitude());
|
||||
bean.setLat(gnssInfo.getLatitude());
|
||||
bean.setGnss_speed(((float) gnssInfo.getGnssSpeed()));
|
||||
// 使用外部定位数据修改自车位置
|
||||
mMapView.getLocationClient().updateRTKAutoPilotLocation(bean);
|
||||
CallerLocationUpdaterManager.INSTANCE.updateLocation(bean);
|
||||
CallerMapDataCollectorManager.INSTANCE.setIsInit();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,6 +36,8 @@ import com.zhidaoauto.map.sdk.open.view.MapAutoViewHelper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
@@ -102,12 +104,12 @@ public class AMapWrapper implements IMogoMap {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBatchMarkerPositon(ArrayList<TrafficData> optionsArrayList) {
|
||||
public void updateBatchMarkerPosition(ArrayList<MessagePad.TrackedObject> optionsArrayList) {
|
||||
if (!checkAMap()) {
|
||||
return;
|
||||
}
|
||||
ArrayList<MarkerSimpleData> markerOptionsArrayList = new ArrayList<>();
|
||||
for (TrafficData mogoMarkerOptions : optionsArrayList) {
|
||||
for (MessagePad.TrackedObject mogoMarkerOptions : optionsArrayList) {
|
||||
MarkerSimpleData markerOptions = ObjectUtils.fromTrafficData(mogoMarkerOptions);
|
||||
if (markerOptions == null) {
|
||||
Logger.e(TAG, "marker参数为空");
|
||||
|
||||
@@ -18,6 +18,8 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
@@ -337,6 +339,13 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncLocation2Map(MessagePad.GnssInfo gnssInfo) {
|
||||
if (mClient != null) {
|
||||
mClient.syncLocation2Map(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openVrMode(boolean zoomGestureEnable) {
|
||||
if (mClient != null) {
|
||||
|
||||
@@ -47,6 +47,8 @@ import com.zhidaoauto.map.sdk.open.query.Tip;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
@@ -116,18 +118,18 @@ public class ObjectUtils {
|
||||
return markerOptions;
|
||||
}
|
||||
|
||||
public static MarkerSimpleData fromTrafficData(TrafficData trafficData) {
|
||||
public static MarkerSimpleData fromTrafficData(MessagePad.TrackedObject trafficData) {
|
||||
if (trafficData == null) {
|
||||
return null;
|
||||
}
|
||||
MarkerSimpleData markerOptions = null;
|
||||
try {
|
||||
markerOptions = new MarkerSimpleData();
|
||||
markerOptions.setId(Long.parseLong(trafficData.getUuid()));
|
||||
markerOptions.setMarkerType(trafficData.getType().getType());
|
||||
markerOptions.setId(trafficData.getUuid());
|
||||
markerOptions.setMarkerType(trafficData.getType());
|
||||
markerOptions.setRotateAngle((float) trafficData.getHeading());
|
||||
markerOptions.setLat(trafficData.getLat());
|
||||
markerOptions.setLon(trafficData.getLon());
|
||||
markerOptions.setLat(trafficData.getLatitude());
|
||||
markerOptions.setLon(trafficData.getLongitude());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
63
libraries/mogo-adas-data/build.gradle
Normal file
63
libraries/mogo-adas-data/build.gradle
Normal file
@@ -0,0 +1,63 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'com.google.protobuf'
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
proto {
|
||||
srcDir 'src/main/proto'
|
||||
include '**/*.proto'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = rootProject.ext.dependencies.protoc
|
||||
}
|
||||
|
||||
generateProtoTasks {
|
||||
all().each { task ->
|
||||
task.builtins {
|
||||
remove java
|
||||
}
|
||||
task.builtins {
|
||||
java {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api rootProject.ext.dependencies.protobuf_java
|
||||
api rootProject.ext.dependencies.protobuf_java_util
|
||||
}
|
||||
3
libraries/mogo-adas-data/gradle.properties
Normal file
3
libraries/mogo-adas-data/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.adas
|
||||
POM_ARTIFACT_ID=mogo-adas-data
|
||||
VERSION_CODE=1
|
||||
1
libraries/mogo-adas-data/src/main/AndroidManifest.xml
Normal file
1
libraries/mogo-adas-data/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1 @@
|
||||
<manifest package="com.zhjt.mogo.adas.data"></manifest>
|
||||
@@ -11,17 +11,13 @@ 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)
|
||||
def name = getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
versionName name
|
||||
// buildConfigField "String", "VERSION_NAME", "\"${name}\""
|
||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
|
||||
buildConfigField "String", "AP_VERSION", "\"${AP_VERSION}\""
|
||||
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
}
|
||||
@@ -84,9 +80,9 @@ dependencies {
|
||||
api "com.zhidao.support.recorder:recorder:1.0.0.3"
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
|
||||
} else {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':libraries:mogo-adas-data')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zhidao.support.adas.high;
|
||||
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_UDP_CONNECT_ADDRESS;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_ADAS;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.zhidao.support.adas.high.common.ActionTypeReceive.ACTION_WS_AUTOPILOT_CONTROL;
|
||||
import static com.zhidao.support.adas.high.udp.CupidUdpConstract.VIDEO_RENDER_IMAGE_UDP;
|
||||
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_ALIAS_CODE_CONNECT_ADDRESS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_ALIAS_CODE_INIT;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_LINK_ADAS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -170,6 +170,12 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
ipcFixationIPHelper.start(ips);
|
||||
}
|
||||
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_INIT,
|
||||
paramIndexes = {-1},
|
||||
clientPkFileName = "sn")
|
||||
private void initSocket() {
|
||||
mSocket = new FpgaSocket();
|
||||
mSocket.setWebSocketListener(this);
|
||||
@@ -185,7 +191,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_UDP_CONNECT_ADDRESS,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_CONNECT_ADDRESS,
|
||||
paramIndexes = {0},
|
||||
clientPkFileName = "sn")
|
||||
private void connectSocket(String address, int port) {
|
||||
@@ -194,7 +200,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendIPCCmd(final String cmd) {
|
||||
if (ssh == null) {
|
||||
if (TextUtils.isEmpty(ipcConnectedIp)) {
|
||||
@@ -242,7 +247,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
sendIPCCmd("docker restart autocar_default_1");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getIpcConnectedIp() {
|
||||
return ipcConnectedIp;
|
||||
@@ -253,7 +257,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return ipcConnectedPort;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送ws消息
|
||||
*
|
||||
@@ -263,13 +266,12 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return mSocket != null && mSocket.sendDataWebSocket(msg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送PB数据
|
||||
*
|
||||
* @param msgType 数据类型
|
||||
* @param data 数据
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
private boolean sendWsMessage(MessagePad.MessageType msgType, byte[] data) {
|
||||
if (mSocket != null && rawPack != null) {
|
||||
@@ -282,9 +284,9 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理webSocket text数据
|
||||
* 处理webSocket
|
||||
*
|
||||
* @param text
|
||||
* @param text text数据
|
||||
*/
|
||||
private void handlerWSMsg(String text) {
|
||||
try {
|
||||
@@ -306,7 +308,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
temp[0] = 0x01;
|
||||
onMultiDeviceListener.onForwardingIPCMessage(temp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -423,7 +424,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onConnecting() {
|
||||
ipcConnectionStatus = Constants.IPC_CONNECTION_STATUS.CONNECTING;
|
||||
@@ -473,7 +473,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
/**
|
||||
* 根据IP和端口进行连接
|
||||
*
|
||||
* @param address
|
||||
* @param address 连接地址
|
||||
*/
|
||||
private void onConnectionAddress(String address) {
|
||||
CupidLogUtils.e(TAG, "要连接的工控机地址=" + address);
|
||||
@@ -522,7 +522,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
mAdasListener = adasListener;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getIpcConnectionStatus() {
|
||||
return ipcConnectionStatus;
|
||||
@@ -535,12 +534,10 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
// return sendWsMessage(Constants.QUERY_ROUTES);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 接管原因
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* log是否显示
|
||||
*
|
||||
@@ -550,11 +547,10 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
CupidLogUtils.setEnableLog(isEnableLog);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 向工控机发送数据
|
||||
*
|
||||
* @param info
|
||||
* @param info 基础信息
|
||||
*/
|
||||
@Override
|
||||
public void sendBaseInfo(BaseInfo info) {
|
||||
@@ -571,7 +567,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
*
|
||||
* @param sn SN
|
||||
* @param environment 1: 研发环境, 2:测试环境, 3:生产环境 4:演示环境
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendBasicInfoResp(@NonNull String sn, int environment) {
|
||||
@@ -592,7 +588,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* @param mode 1: enter autopilot mode, 0: quit autopilot mode
|
||||
* @param source 命令来源: 0: pad模拟(模拟时routeInfo传null), 1: AICloud业务
|
||||
* @param routeInfo 自动驾驶路径信息
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo) {
|
||||
@@ -609,7 +605,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* 设置演示模式
|
||||
*
|
||||
* @param enable 1: enable, 0: disable
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendDemoModeReq(int enable) {
|
||||
@@ -623,7 +619,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
/**
|
||||
* 车机基础信息请求
|
||||
*
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendCarConfigReq() {
|
||||
@@ -640,13 +636,10 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* @param filename 文件路径
|
||||
* @param reasonID 接管原因id
|
||||
* @param reason 接管原因
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRecordCause(long key, @NonNull String filename, @NonNull String reasonID, @NonNull String reason) {
|
||||
if (filename == null) {
|
||||
filename = "";
|
||||
}
|
||||
if (filename == null) {
|
||||
filename = "";
|
||||
}
|
||||
@@ -687,10 +680,9 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
*
|
||||
* @param id 采集id
|
||||
* @param duration 采集时间长
|
||||
* @param type 采集类型, 1:badcase, 2: map; 3: rests
|
||||
* @param type 采集类型, 1:badCase, 2: map; 3: rests
|
||||
* @param isRecord 采集指令, true: 采集, false: 停止采集
|
||||
* @param sustain 是否持续采集
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRecordData(int id, int duration, int type, boolean isRecord) {
|
||||
@@ -716,7 +708,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* 设置自动驾驶最大速度
|
||||
*
|
||||
* @param speedLimit 最大车辆速度 m/s
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendAutopilotSpeedReq(double speedLimit) {
|
||||
@@ -730,7 +722,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
/**
|
||||
* 自动驾驶路径请求
|
||||
*
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendGlobalPathReq() {
|
||||
@@ -744,8 +736,8 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* 发送红绿灯数据到工控机
|
||||
*
|
||||
* @param crossID roadID
|
||||
* @param latitude
|
||||
* @param longitude
|
||||
* @param latitude 纬度
|
||||
* @param longitude 经度
|
||||
* @param heading 红绿灯方向
|
||||
* @param direction 路的航向角
|
||||
* @param lightId 红绿灯ID
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface IAdasNetCommApi {
|
||||
*
|
||||
* @param sn SN
|
||||
* @param environment 1: 研发环境, 2:测试环境, 3:生产环境 4:演示环境
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendBasicInfoResp(@NonNull String sn, int environment);
|
||||
|
||||
@@ -68,7 +68,7 @@ public interface IAdasNetCommApi {
|
||||
* @param mode 1: enter autopilot mode, 0: quit autopilot mode
|
||||
* @param source 命令来源: 0: pad模拟(模拟时routeInfo传null), 1: AICloud业务
|
||||
* @param routeInfo 自动驾驶路径信息
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo);
|
||||
|
||||
@@ -76,14 +76,14 @@ public interface IAdasNetCommApi {
|
||||
* 设置演示模式
|
||||
*
|
||||
* @param enable 1: enable, 0: disable
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendDemoModeReq(int enable);
|
||||
|
||||
/**
|
||||
* 车机基础信息请求
|
||||
*
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendCarConfigReq();
|
||||
|
||||
@@ -94,7 +94,7 @@ public interface IAdasNetCommApi {
|
||||
* @param filename 文件路径
|
||||
* @param reasonID 接管原因id
|
||||
* @param reason 接管原因
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRecordCause(long key, @NonNull String filename, @NonNull String reasonID, @NonNull String reason);
|
||||
|
||||
@@ -103,7 +103,7 @@ public interface IAdasNetCommApi {
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean startRecordPackage(int id, int type);
|
||||
|
||||
@@ -112,7 +112,7 @@ public interface IAdasNetCommApi {
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean startRecordPackage(int id, int duration, int type);
|
||||
|
||||
@@ -121,7 +121,7 @@ public interface IAdasNetCommApi {
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean stopRecordPackage(int id, int type);
|
||||
|
||||
@@ -132,8 +132,7 @@ public interface IAdasNetCommApi {
|
||||
* @param duration 采集时间长
|
||||
* @param type 采集类型, 1:badcase, 2: map; 3: rests
|
||||
* @param isRecord 采集指令, true: 采集, false: 停止采集
|
||||
* @param sustain 是否持续采集
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRecordData(int id, int duration, int type, boolean isRecord);
|
||||
|
||||
@@ -141,7 +140,7 @@ public interface IAdasNetCommApi {
|
||||
* 设置自动驾驶最大速度
|
||||
*
|
||||
* @param speedLimit 最大车辆速度 m/s
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendAutopilotSpeedReq(double speedLimit);
|
||||
|
||||
@@ -149,8 +148,8 @@ public interface IAdasNetCommApi {
|
||||
* 发送红绿灯数据到工控机
|
||||
*
|
||||
* @param crossID roadID
|
||||
* @param latitude
|
||||
* @param longitude
|
||||
* @param latitude 纬度
|
||||
* @param longitude 经度
|
||||
* @param heading 红绿灯方向
|
||||
* @param direction 路的航向角
|
||||
* @param lightId 红绿灯ID
|
||||
@@ -158,7 +157,7 @@ public interface IAdasNetCommApi {
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude,
|
||||
@NonNull String heading, @NonNull String direction, int lightId, int laneNo,
|
||||
@@ -167,7 +166,7 @@ public interface IAdasNetCommApi {
|
||||
/**
|
||||
* 自动驾驶路径请求
|
||||
*
|
||||
* @return
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendGlobalPathReq();
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zhidao.support.adas.high.chain;
|
||||
|
||||
public class AdasChain {
|
||||
|
||||
public static final int CHAIN_LINK_ADAS = 1;
|
||||
|
||||
public static final int CHAIN_LINK_LOG_CONNECT_STATUS = 0;
|
||||
public static final int CHAIN_LINK_LOG_WEB_SOCKET_DATA = 1;
|
||||
|
||||
public static final String CHAIN_ALIAS_CODE_INIT = "PAD_ADAS_INIT";
|
||||
public static final String CHAIN_ALIAS_CODE_CONNECT_ADDRESS = "PAD_ADAS_CONNECT_ADDRESS";
|
||||
public static final String CHAIN_ALIAS_CODE_WEB_SOCKET_OPEN = "PAD_ADAS_WEB_SOCKET_OPEN";
|
||||
public static final String CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_JSON = "PAD_ADAS_WEB_SOCKET_MESSAGE_JSON";
|
||||
public static final String CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_BYTE = "PAD_ADAS_WEB_SOCKET_MESSAGE_BYTE";
|
||||
}
|
||||
@@ -13,10 +13,6 @@ public class CupidLogUtils {
|
||||
*/
|
||||
// private static boolean mIsEnableLog = BuildConfig.DEBUG;
|
||||
private static boolean mIsEnableLog = true;
|
||||
/**
|
||||
* 是否写日志
|
||||
*/
|
||||
private static boolean isWriteLog = true;
|
||||
|
||||
/**
|
||||
* @param isEnableLog true开启 false关闭
|
||||
@@ -25,15 +21,6 @@ public class CupidLogUtils {
|
||||
mIsEnableLog = isEnableLog;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isIsWriteLog() {
|
||||
return isWriteLog;
|
||||
}
|
||||
|
||||
public static void setIsWriteLog(boolean isWriteLog) {
|
||||
CupidLogUtils.isWriteLog = isWriteLog;
|
||||
}
|
||||
|
||||
public static void i(String tag, String msg) {
|
||||
if (!mIsEnableLog) {
|
||||
return;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.zhidao.support.adas.high.socket;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_BYTE;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_JSON;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_WEB_SOCKET_OPEN;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_ADAS;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA;
|
||||
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_BYTE;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_JSON;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_ALIAS_CODE_WEB_SOCKET_OPEN;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_LINK_ADAS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_LINK_LOG_WEB_SOCKET_DATA;
|
||||
import static com.zhidao.support.adas.high.common.Constants.RESOURCE_PATH;
|
||||
import static com.zhidao.support.adas.high.common.Constants.WS_IP_HOST_HEAD;
|
||||
|
||||
import android.text.TextUtils;
|
||||
@@ -242,7 +244,6 @@ public class FpgaSocket implements IWebSocket {
|
||||
@Override
|
||||
public void onMessage(@NonNull WebSocket webSocket, @NonNull ByteString bytes) {
|
||||
super.onMessage(webSocket, bytes);
|
||||
// CupidLogUtils.i(TAG, "WebSocket onMessage bytes= " + bytes.hex());
|
||||
if (AdasChannel.isUseQueue) {
|
||||
WSByteQueueManager.getInstance().addQueueData(bytes);
|
||||
} else {
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
@@ -46,7 +48,7 @@ public interface IMogoMap {
|
||||
*
|
||||
* @param optionsArrayList 锚点集合
|
||||
*/
|
||||
void updateBatchMarkerPositon(ArrayList<TrafficData> optionsArrayList);
|
||||
void updateBatchMarkerPosition(ArrayList<MessagePad.TrackedObject> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 添加感知使用到的3d模型
|
||||
|
||||
@@ -9,6 +9,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-25
|
||||
@@ -39,7 +41,7 @@ public interface IMogoMarkerManager {
|
||||
* 批量更新锚点位置
|
||||
* @param optionsArrayList 锚点集合
|
||||
*/
|
||||
void updateBatchMarkerPosition(ArrayList<TrafficData> optionsArrayList);
|
||||
void updateBatchMarkerPosition(ArrayList<MessagePad.TrackedObject> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 添加感知使用到的3d模型
|
||||
|
||||
@@ -14,6 +14,8 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
@@ -298,6 +300,10 @@ public interface IMogoMapUIController {
|
||||
|
||||
}
|
||||
|
||||
default void syncLocation2Map(MessagePad.GnssInfo gnssInfo) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开鹰眼模式
|
||||
*
|
||||
|
||||
@@ -18,6 +18,8 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
@@ -385,6 +387,14 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncLocation2Map(MessagePad.GnssInfo gnssInfo) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.syncLocation2Map(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
mDelegate = null;
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.map;
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
@@ -13,6 +12,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-20
|
||||
@@ -68,9 +69,9 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBatchMarkerPosition(ArrayList<TrafficData> optionsArrayList) {
|
||||
public void updateBatchMarkerPosition(ArrayList<MessagePad.TrackedObject> optionsArrayList) {
|
||||
try {
|
||||
MogoMap.getInstance().getMogoMap().updateBatchMarkerPositon(optionsArrayList);
|
||||
MogoMap.getInstance().getMogoMap().updateBatchMarkerPosition(optionsArrayList);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user