Merge branch 'dev_minibus-d_230425_3.2.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_minibus-d_230425_3.2.0

This commit is contained in:
xinfengkun
2023-05-19 14:57:50 +08:00
7 changed files with 49 additions and 9 deletions

View File

@@ -29,6 +29,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
@@ -59,7 +60,6 @@ import com.mogo.och.bus.passenger.network.BusPassengerServiceManager;
import com.mogo.och.common.module.bean.dpmsg.AppConnectMsg;
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg;
import com.mogo.och.common.module.bean.dpmsg.DPMsgType;
import com.mogo.och.common.module.bean.dpmsg.LoginCacheStatus;
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager;
import com.mogo.och.common.module.biz.constant.OchCommonConst;
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
@@ -189,13 +189,16 @@ public class BusPassengerModel {
if (routesResult != null) {
routesResult = null;
mNextStationIndex = 0;
startOrStopCalculateRouteInfo(false);
}
startOrStopCalculateRouteInfo(false);
if (mRouteLineInfoCallback != null){
mRouteLineInfoCallback.showNoTaskView();
}
mRoutePoints.clear();
return;
}
if (routesResult != null && data.getResult().equals(routesResult)){
@@ -464,6 +467,9 @@ public class BusPassengerModel {
int state = autopilotStatusInfo.getState();
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
//2022.7.20 自动驾驶更换成带档位的
if(state != mPreAutoStatus && null != routesResult){
CallerAutoPilotControlManager.INSTANCE.getGlobalPath();
}
if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
if(state != mPreAutoStatus){

View File

@@ -21,6 +21,7 @@ import com.mogo.commons.module.intent.IntentManager;
import com.mogo.commons.module.status.IMogoStatusChangedListener;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager;
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
@@ -262,7 +263,7 @@ public class BusPassengerModel {
}
mNextStationIndex = 0;
startOrStopCalculateRouteInfo(false);
mRoutePoints.clear();
if (mRouteLineInfoCallback != null){
mRouteLineInfoCallback.showNoTaskView();
}
@@ -473,6 +474,9 @@ public class BusPassengerModel {
int state = autopilotStatusInfo.getState();
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
//2022.7.20 自动驾驶更换成带档位的
if(state != mPreAutoStatus && null != routesResult){
CallerAutoPilotControlManager.INSTANCE.getGlobalPath();
}
if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
if(state != mPreAutoStatus){

View File

@@ -531,6 +531,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
// 当高频返回autopilot 2时不重复调用订单状态变更
mPrevAPStatus = state; // 每个状态单独赋值解决无订单时已经是2的状态导致的新订单来时无法进入此逻辑更新状态
startServicePilotDone();
CallerAutoPilotControlManager.INSTANCE.getGlobalPath();
}
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
mPrevAPStatus = state;

View File

@@ -28,7 +28,7 @@ ext {
amapsearch : "com.amap.api:search:9.5.0",
amaplocation : "com.amap.api:location:6.2.0",
downloader : "com.mogo.core.net:downloader:1.0.5_stable",
downloader : "com.mogo.core.net:downloader:1.0.6.1",
// json 转换
gson : "com.google.code.gson:gson:2.8.4",

View File

@@ -166,6 +166,8 @@ class AiCloudIdentifyDataManager : IMogoMapListener,
super.onAutopilotRouteLineId(lineId)
if (lineId == 0L) {
updateRomaStyle(true)
}else{
CallerAutoPilotControlManager.getGlobalPath()
}
}

View File

@@ -1,13 +1,19 @@
package com.mogo.eagle.core.function.business.identify;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA;
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_WEB_SOCKET_DATA_TRACKED;
import static com.mogo.eagle.core.function.business.identify.TrackManager.LIMIT_SPEED;
import android.annotation.SuppressLint;
import com.mogo.eagle.core.data.enums.TrafficTypeEnum;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.utilcode.geometry.S2CellId;
import com.mogo.eagle.core.utilcode.geometry.S2LatLng;
import com.mogo.eagle.core.utilcode.util.CoordinateUtils;
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils;
import com.zhjt.service.chain.ChainLog;
import java.util.Arrays;
import java.util.Comparator;
@@ -45,9 +51,30 @@ public class TrackObj {
private void correct() {
calAverageSpeedAndType();
String dockerVersion = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getDockVersion();
if (dockerVersion != null && !dockerVersion.isEmpty()) {
try {
int version = ParseVersionUtils.parseVersion(true, dockerVersion);
if (version >= 310) {
return;
}
} catch (Exception e) {
logErrorOfVersion(dockerVersion);
}
}
calLoc();
}
@ChainLog(linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
linkCode = CHAIN_LINK_ADAS,
endpoint = 4,
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
paramIndexes = {0},
clientPkFileName = "sn")
private void logErrorOfVersion(String version) {
}
@SuppressLint("NewApi")
private void calAverageSpeedAndType() {
if (circleQueue.size() >= 3) {
@@ -68,7 +95,7 @@ public class TrackObj {
}
speedAverage = cal / objQueueList.size();
}
if(typeArray.length > 0){
if (typeArray.length > 0) {
typeArray = Arrays.stream(typeArray).sorted().toArray();
typeWeight = typeArray[typeArray.length / 2] == 0 ? cacheData.getType() : typeArray[typeArray.length / 2];
}
@@ -166,7 +193,7 @@ public class TrackObj {
return d;
}
public void clear(){
public void clear() {
circleQueue.clear();
s2CellId = null;
s2LatLng = null;

View File

@@ -41,15 +41,14 @@ public abstract class AbsMogoApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
AutoSize.checkAndInit(this);
ScreenHelper.setScreenConfig(this);
if (!shouldInit()) {
return;
}
AppStateManager.INSTANCE.init(this);
initRxJavaErrorHandler();
FinalizeCrashFixer.fix();
AutoSize.checkAndInit(this);
ScreenHelper.setScreenConfig(this);
Utils.init(this);
MogoServices.getInstance().init(this);
}