@@ -59,7 +59,9 @@ dependencies {
|
||||
api project(":foudations:mogo-commons")
|
||||
api project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
}
|
||||
}
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.mogo.module.adas;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.mogo.module.adas.entity.WarnMessageModel;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.module.adas.model.AdasServiceModel;
|
||||
import com.mogo.module.adas.network.IAdasApiService;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotArriveModel;
|
||||
@@ -20,7 +19,6 @@ import com.zhidao.support.adas.high.bean.LightStatueInfo;
|
||||
import com.zhidao.support.adas.high.bean.ObstaclesInfo;
|
||||
import com.zhidao.support.adas.high.bean.RectInfo;
|
||||
import com.zhidao.support.adas.high.bean.WarnMessageInfo;
|
||||
import com.zhidao.support.adas.high.common.MsgActionType;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -31,8 +29,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static com.mogo.module.adas.AdasConstant.getBaseUrl;
|
||||
|
||||
/**
|
||||
* Created by XuYong on 2021/4/25 14:43
|
||||
*/
|
||||
@@ -187,6 +183,18 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
||||
Logger.d(TAG, "autopilotStatus " + autopilotStatus);
|
||||
AutopilotStatus.ValuesBean autopilotStatusValues = autopilotStatus.getValues();
|
||||
if (autopilotStatusValues != null) {
|
||||
// 初始化自动驾驶状态信息
|
||||
AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo();
|
||||
autopilotStatusInfo.setAutopilotStatus(autopilotStatusValues.getState());
|
||||
autopilotStatusInfo.setAutoDriveStatus(autopilotStatusValues.getPilotmode());
|
||||
autopilotStatusInfo.setErrorReason(autopilotStatusValues.getReason());
|
||||
autopilotStatusInfo.setCamera(autopilotStatusValues.getCamera());
|
||||
autopilotStatusInfo.setRtk(autopilotStatusValues.getRtk());
|
||||
autopilotStatusInfo.setRadar(autopilotStatusValues.getRadar());
|
||||
autopilotStatusInfo.setSpeed(autopilotStatusValues.getSpeed());
|
||||
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
||||
|
||||
int state = autopilotStatusValues.getState();
|
||||
float speed = autopilotStatusValues.getSpeed();
|
||||
mCurrentAutopilotStatus = state;
|
||||
@@ -252,6 +260,8 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
||||
@Override
|
||||
public void onWebSocketConnectSuccess() {
|
||||
Logger.d(TAG, "webSocket 连接成功");
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectStatus(true);
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
||||
for (IAdasStatusListener listener : iAdasStatusListeners) {
|
||||
listener.onServiceConnected();
|
||||
}
|
||||
@@ -261,6 +271,8 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
||||
@Override
|
||||
public void onWebSocketConnectFailed() {
|
||||
Logger.d(TAG, "webSocket 连接失败");
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().setConnectStatus(false);
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
||||
for (IAdasStatusListener listener : iAdasStatusListeners) {
|
||||
listener.onServiceDisconnected();
|
||||
}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
package com.mogo.module.adas;
|
||||
|
||||
import com.mogo.module.adas.entity.WarnMessageModel;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotArriveModel;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLOwnerCarRectModel;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLOwnerCarStateModel;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotRoute;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatus;
|
||||
import com.zhidao.support.adas.high.bean.RectInfo;
|
||||
import com.zhidao.support.adas.high.bean.WarnMessageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IAdasDataListener {
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ dependencies {
|
||||
api project(':services:mogo-service-api')
|
||||
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
}
|
||||
|
||||
annotationProcessor 'com.elegant.spi:compiler:1.0.3'
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.module.common.datacenter;
|
||||
|
||||
import com.mogo.commons.FunctionBuildConfig;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.cloud.location.CloudLocationInfo;
|
||||
|
||||
@@ -87,11 +89,16 @@ public class SnapshotLocationDataCenter {
|
||||
double speed = data.optDouble("speed", -1);
|
||||
long satelliteTime = data.optLong("satelliteTime");
|
||||
long systemTime = data.optLong("systemTime");
|
||||
int gpsProvider = data.optInt("gpsProvider",1);
|
||||
int gpsProvider = data.optInt("gpsProvider", 1);
|
||||
|
||||
// 使用与渠道配置一样的gps提供者提供的数据
|
||||
if (gpsProvider == FunctionBuildConfig.gpsProvider) {
|
||||
//测试面板状态同步
|
||||
AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo();
|
||||
autopilotStatusInfo.setLocationLat(lat);
|
||||
autopilotStatusInfo.setLocationLon(lon);
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
|
||||
|
||||
DebugConfig.setStatusData(DebugConfig.sLon, lon);
|
||||
DebugConfig.setStatusData(DebugConfig.sLat, lat);
|
||||
|
||||
@@ -168,7 +175,7 @@ public class SnapshotLocationDataCenter {
|
||||
return mCurLat;
|
||||
}
|
||||
|
||||
public long getSatelliteTime(){
|
||||
public long getSatelliteTime() {
|
||||
return mSatelliteTime;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user