Merge branch 'dev_robotaxi-p-app_110_220304_1.1.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-p-app_110_220304_1.1.0

This commit is contained in:
wangmingjun
2022-03-08 15:17:29 +08:00
5 changed files with 46 additions and 20 deletions

View File

@@ -142,10 +142,6 @@ class MoGoAutopilotProvider :
// 司机端监听
if (FunctionBuildConfig.appIdentityMode == 0) {
AdasManager.getInstance().setOnMultiDeviceListener { bytes ->
Logger.d(
TAG,
"司机端接收到工控机吐出来的数据为:${Arrays.toString(bytes)}"
)
// 发送数据给乘客端
if (NSDNettyManager.getInstance().isServerStart) {
Logger.d(

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.module.common.drawer.IdentifyDataDrawer;
import com.zhidao.support.adas.high.bean.CarStateInfo;
import com.zhidao.support.obu.ami.AmiClientManager;
import java.util.ArrayList;
@@ -50,9 +51,11 @@ public class MoGoHandAdasMsgManager implements
if (autoPilotCarStateInfo != null) {
//can数据转发
AutopilotCarStateInfo.ValuesBean bean = autoPilotCarStateInfo.getValues();
if (bean != null) {
//转向灯状态 0是正常 1是左转 2是右转
int turnLight = bean.getTurn_light();
//turnLightOften 是sdk适配的字段后期建议CarStateInfo和AutopilotCarStateInfo统一成一个
int turnLight = bean.getTurnLightOften();
AmiClientManager.getInstance().setTurnLightState(turnLight);
int brakeLight = bean.getBrake_light();
// Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight);

View File

@@ -81,6 +81,22 @@ public class AutopilotCarStateInfo implements Serializable {
private int brake_light; //刹车灯状态
private int frame_num;//统计发包个数
/**
* 常开 常关 转向灯
* 0 --关
* 1 --左转
* 2 --右转
*/
private int turnLightOften = 0;
public int getTurnLightOften() {
return turnLightOften;
}
public void setTurnLightOften(int turnLightOften) {
this.turnLightOften = turnLightOften;
}
public int getFrame_num() {
return frame_num;
}

View File

@@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.3.31
MOGO_TELEMATIC_VERSION=1.3.31
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.0.5.1
MAP_SDK_VERSION=2.0.5.2
MAP_SDK_OPERATION_VERSION=1.0.12
# websocket
WEBSOCKET_VERSION=1.1.7

View File

@@ -1,6 +1,7 @@
package com.mogo.module.service.routeoverlay;
import android.content.Context;
import android.util.Log;
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
@@ -17,7 +18,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.eagle.core.utilcode.util.GsonUtils;
import com.mogo.module.common.utils.DrivingDirectionUtils;
import org.jetbrains.annotations.NotNull;
@@ -45,7 +46,7 @@ public class MogoRouteOverlayManager implements
public void init() {
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this);
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,this);
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this);
// intiDrawer();
}
@@ -60,7 +61,7 @@ public class MogoRouteOverlayManager implements
return sInstance;
}
private void intiDrawer(){
private void intiDrawer() {
RouteOverlayDrawer.getInstance(mContext).initdraw();
}
@@ -97,7 +98,7 @@ public class MogoRouteOverlayManager implements
mTrajectoryList = mogoLatLngs;
builder.append("}");
//Log.d(TAG,builder.toString());
Log.d(TAG, builder.toString());
}
@Override
@@ -110,13 +111,13 @@ public class MogoRouteOverlayManager implements
latLngList.add(new MogoLatLng(routeModel.getLat(), routeModel.getLon()));
}
int listSize = latLngList.size();
mEnding = latLngList.get(listSize-1);
mEnding = latLngList.get(listSize - 1);
// RouteOverlayDrawer.getInstance(mContext).addEndingMarker(latLngList.get(listSize - 1).lat,latLngList.get(listSize - 1).lon);
}
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData ){
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData) {
return;
}
this.STATUS_AUTOPILOT = autoPilotStatusInfo.getControl_pilotmode();
@@ -128,7 +129,7 @@ public class MogoRouteOverlayManager implements
// }else {
//
// }我
if ( STATUS_AUTOPILOT != 1){
if (STATUS_AUTOPILOT != 1) {
RouteOverlayDrawer.getInstance(mContext).clearEndingMarker();
RouteOverlayDrawer.getInstance(mContext).clearMogoRouteOverlay();
}
@@ -137,7 +138,7 @@ public class MogoRouteOverlayManager implements
@Override
public void onAutopilotArriveAtStation(@Nullable AutopilotStationInfo autopilotWayArrive) {
if(autopilotWayArrive == null){
if (autopilotWayArrive == null) {
return;
}
Logger.d(TAG, "onArriveAt data : " + autopilotWayArrive.toString());
@@ -156,18 +157,28 @@ public class MogoRouteOverlayManager implements
}
@Override
public void onLocationChanged(@Nullable MogoLocation location) {
public void onLocationChanged(@Nullable MogoLocation location) { //todo 拖尾
mLocation = location;
if (mTrajectoryList.isEmpty()){
if (mTrajectoryList.isEmpty()) {
return;
}
ArrayList list = new ArrayList();
for (MogoLatLng latLng:mTrajectoryList) {
if(!isPointOnCarFront(mLocation,latLng)){
Log.d(TAG, "onLocationChanged : " + mTrajectoryList.size());
ArrayList list = new ArrayList();
for (MogoLatLng latLng : mTrajectoryList) {
if (!isPointOnCarFront(mLocation, latLng)) {
list.add(latLng);
}
}
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData || STATUS_AUTOPILOT == 1){
StringBuilder builder = new StringBuilder();
for (int i = 0; i < list.size(); i++) {
MogoLatLng latLng = (MogoLatLng) list.get(i);
builder.append(latLng.getLon()).append(",");
builder.append(latLng.getLat()).append(",");
}
Log.d(TAG, "onLocationChanged : " + GsonUtils.toJson(builder.toString()));
Log.d(TAG,"onLocationChanged size = " + list.size() + "---TrajectoryData = " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + "----" + STATUS_AUTOPILOT);
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData || STATUS_AUTOPILOT == 1) {
RouteOverlayDrawer.getInstance(mContext).drawTrajectoryList(list);
}
}