[6.4.0]
[启动自驾 拦截顺序整理]
This commit is contained in:
@@ -533,7 +533,6 @@ public class OrderModel {
|
||||
CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot();
|
||||
// 取消自驾
|
||||
setTrajectoryStation(null,null,-1L);
|
||||
// startOrStopQueryPassengerWriteOff(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +620,7 @@ public class OrderModel {
|
||||
// 非自驾状态---->预写日志----> 启动自驾 ---> 自驾启动成功 ----> 上报日志
|
||||
// 自驾状态---->启动自驾 ---> 自驾启动成功
|
||||
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
//1、判断轨迹url是否可用
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
&& TextUtils.isEmpty(busRoutesResult.csvFileUrl)
|
||||
&& TextUtils.isEmpty(busRoutesResult.csvFileUrlDPQP)
|
||||
@@ -633,7 +632,7 @@ public class OrderModel {
|
||||
+ "busRoutesResult.csvFileUrlDPQP = "+busRoutesResult.csvFileUrlDPQP);
|
||||
return;
|
||||
}
|
||||
|
||||
//2、6个条件判断
|
||||
if (!CallerAutoPilotControlManager.INSTANCE.isCanStartAutopilot(true)) {
|
||||
return;
|
||||
}
|
||||
@@ -641,14 +640,7 @@ public class OrderModel {
|
||||
CallerLogger.e(M_BUS + TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand);
|
||||
|
||||
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
|
||||
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
|
||||
", 请稍候重试");
|
||||
triggerUnableStartAPReasonEvent();
|
||||
return;
|
||||
}
|
||||
|
||||
//3、距离轨迹15m计算
|
||||
String resion = TrajectoryAndDistanceManager.INSTANCE.canStartAutopilot((long)busRoutesResult.getLineId());
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
MogoLocation nextStationPoint = new MogoLocation();
|
||||
@@ -661,7 +653,7 @@ public class OrderModel {
|
||||
MogoLocation currentStationPoint = new MogoLocation();
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long) currentLineId);
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long)busRoutesResult.getLineId());
|
||||
resion = TrajectoryAndDistanceManager.INSTANCE.canStartAutopilot((long)busRoutesResult.getLineId());
|
||||
}
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
@@ -669,6 +661,16 @@ public class OrderModel {
|
||||
return;
|
||||
}
|
||||
|
||||
//4、ssm 给出数据
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
|
||||
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
|
||||
", 请稍候重试");
|
||||
triggerUnableStartAPReasonEvent();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
firstStartAutopilot++;
|
||||
|
||||
if(CallerAutoPilotStatusListenerManager.INSTANCE.getState() != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
@@ -1282,26 +1284,6 @@ public class OrderModel {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void setStation(){
|
||||
BusStationBean busStationBean = stationList.get(backgroundCurrentStationIndex);
|
||||
String nextStationName = "";
|
||||
String nextStationNameKr = "";
|
||||
MogoLocation nextStationPoint = new MogoLocation();
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
nextStationName = nextStation.getName();
|
||||
nextStationNameKr = nextStation.getNameKr();
|
||||
nextStationPoint.setLongitude(nextStation.getGcjLon());
|
||||
nextStationPoint.setLatitude(nextStation.getGcjLat());
|
||||
}
|
||||
final String currentStationName = busStationBean.getName();
|
||||
String finalNextStationName = nextStationName;
|
||||
String finalNextStationNameKr = nextStationNameKr;
|
||||
MogoLocation currentStationPoint = new MogoLocation();
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
}
|
||||
|
||||
public void setTrajectoryStation(MogoLocation startStation,MogoLocation endStation,Long lineId){
|
||||
TrajectoryAndDistanceManager.INSTANCE.setStationPoint(startStation,endStation,lineId);
|
||||
}
|
||||
|
||||
@@ -37,16 +37,9 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.pushAppOperationalMsgBox
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.registerSocketMessageListener
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.releaseSocketMessageListener
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback
|
||||
import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager.startLoopAbnormalFactors
|
||||
import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager.stopLoopAbnormalFactors
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.ARRIVE_STATION
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.END_TRIP
|
||||
@@ -55,6 +48,12 @@ import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager
|
||||
import com.mogo.och.common.module.manager.device.LightAirconditionDoorManager
|
||||
import com.mogo.och.common.module.manager.device.LightAirconditionDoorStatusManager
|
||||
import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager.startLoopAbnormalFactors
|
||||
import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager.stopLoopAbnormalFactors
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.pushAppOperationalMsgBox
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.registerSocketMessageListener
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.releaseSocketMessageListener
|
||||
import com.mogo.och.common.module.manager.socket.cloud.data.OperateDoorMsg
|
||||
import com.mogo.och.common.module.manager.socket.cloud.data.OrderCloseMsg
|
||||
import com.mogo.och.common.module.manager.socket.cloud.data.SystemMsg
|
||||
@@ -65,6 +64,7 @@ import com.mogo.och.common.module.manager.socket.lan.bean.ChangeDestMsg
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.DPOrderClosedMsg
|
||||
import com.mogo.och.common.module.manager.stopside.StopSideManager
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.utils.*
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.data.bean.*
|
||||
@@ -479,14 +479,7 @@ class DriverM1Model {
|
||||
* @param isRestart
|
||||
*/
|
||||
private fun startAutopilot() {
|
||||
if (!OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
|
||||
ToastUtils.showLong(
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +
|
||||
", 请稍候重试"
|
||||
)
|
||||
triggerUnableStartAPReasonEvent()
|
||||
return
|
||||
}
|
||||
//判断轨迹Id是否可用
|
||||
mCurrentRoute?.let {
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
@@ -502,9 +495,20 @@ class DriverM1Model {
|
||||
return
|
||||
}
|
||||
}
|
||||
// 6个条件判断
|
||||
if (!CallerAutoPilotControlManager.isCanStartAutopilot(true)) {
|
||||
return
|
||||
}
|
||||
// ssm 给出数据
|
||||
if (!OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
|
||||
ToastUtils.showLong(
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +
|
||||
", 请稍候重试"
|
||||
)
|
||||
triggerUnableStartAPReasonEvent()
|
||||
return
|
||||
}
|
||||
|
||||
triggerStartServiceEvent(false, false)
|
||||
val parameters = initAutopilotControlParameters()
|
||||
if (null == parameters) {
|
||||
|
||||
@@ -50,6 +50,7 @@ import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatu
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
||||
import com.mogo.och.common.module.manager.beautifymode.BeautifyManager
|
||||
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil
|
||||
@@ -1120,18 +1121,12 @@ object CharterPassengerModel {
|
||||
* 开启自动驾驶
|
||||
*/
|
||||
fun startAutopilot() {
|
||||
if (!OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
|
||||
ToastCharterUtils.showToastLong(
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +
|
||||
", 请稍候重试"
|
||||
)
|
||||
return
|
||||
}
|
||||
orderInfo?.let {
|
||||
if (it.arriveStatus == OrderInfoResponse.ARRIVED) {
|
||||
ToastCharterUtils.showToastLong("已到达目的地请重新选择线路")
|
||||
return
|
||||
}
|
||||
//1、判断轨迹Id是否可用
|
||||
locusInfo?.let {
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
@@ -1147,9 +1142,18 @@ object CharterPassengerModel {
|
||||
return
|
||||
}
|
||||
}
|
||||
// 2、6个条件判断
|
||||
if (!CallerAutoPilotControlManager.isCanStartAutopilot(true)) {
|
||||
return
|
||||
}
|
||||
// 4、ssm 给出数据
|
||||
if (!OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
|
||||
ToastCharterUtils.showToastLong(
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +
|
||||
", 请稍候重试"
|
||||
)
|
||||
return
|
||||
}
|
||||
val parameters = initAutopilotControlParameters()
|
||||
if (null == parameters) {
|
||||
ToastCharterUtils.showToastShort("请选择站点")
|
||||
@@ -1265,4 +1269,12 @@ object CharterPassengerModel {
|
||||
updateAutopilotControlParameters(null)
|
||||
}
|
||||
|
||||
fun setTrajectoryStation(
|
||||
startStation: MogoLocation?,
|
||||
endStation: MogoLocation?,
|
||||
lineId: Long?
|
||||
) {
|
||||
TrajectoryAndDistanceManager.setStationPoint(startStation, endStation, lineId)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,7 +21,9 @@ import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
|
||||
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager;
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager;
|
||||
import com.mogo.och.shuttle.bean.BusRoutesResponse;
|
||||
import com.mogo.och.shuttle.util.ShuttleVoiceManager;
|
||||
@@ -501,6 +503,7 @@ public class OrderModel {
|
||||
removeTipRunnables();
|
||||
// 取消自驾
|
||||
CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot();
|
||||
setTrajectoryStation(null,null,-1L);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -618,7 +621,7 @@ public class OrderModel {
|
||||
* @param isRestart
|
||||
*/
|
||||
private void startAutopilot(boolean isRestart, int leaveIndex) {
|
||||
|
||||
//1、判断轨迹url是否可用
|
||||
if(busRoutesResult!=null){
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
@@ -634,7 +637,32 @@ public class OrderModel {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//2、6个条件判断
|
||||
if (!CallerAutoPilotControlManager.INSTANCE.isCanStartAutopilot(true)) {
|
||||
return;
|
||||
}
|
||||
// 3、距离轨迹15m计算
|
||||
//3、距离轨迹15m计算
|
||||
String resion = TrajectoryAndDistanceManager.INSTANCE.canStartAutopilot((long)busRoutesResult.getLineId());
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
MogoLocation nextStationPoint = new MogoLocation();
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
nextStationPoint.setLongitude(nextStation.getGcjLon());
|
||||
nextStationPoint.setLatitude(nextStation.getGcjLat());
|
||||
}
|
||||
BusStationBean busStationBean = stationList.get(backgroundCurrentStationIndex);
|
||||
MogoLocation currentStationPoint = new MogoLocation();
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long) busRoutesResult.getLineId());
|
||||
resion = TrajectoryAndDistanceManager.INSTANCE.canStartAutopilot((long)busRoutesResult.getLineId());
|
||||
}
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
ToastUtils.showShort(resion);
|
||||
return;
|
||||
}
|
||||
//4、ssm 给出数据
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
|
||||
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
|
||||
", 请稍候重试");
|
||||
@@ -642,10 +670,6 @@ public class OrderModel {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CallerAutoPilotControlManager.INSTANCE.isCanStartAutopilot(true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
firstStartAutopilot++;
|
||||
|
||||
triggerStartServiceEvent(isRestart, false);
|
||||
@@ -792,9 +816,13 @@ public class OrderModel {
|
||||
CallerLogger.d(M_BUS + TAG, "leaveStation-backgroundCurrentStationIndex = " + backgroundCurrentStationIndex);
|
||||
String nextStationName = "";
|
||||
String nextStationNameKr = "";
|
||||
MogoLocation nextStationPoint = new MogoLocation();
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
nextStationName = stationList.get(backgroundCurrentStationIndex + 1).getName();
|
||||
nextStationNameKr = stationList.get(backgroundCurrentStationIndex + 1).getNameKr();
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
nextStationName = nextStation.getName();
|
||||
nextStationNameKr = nextStation.getNameKr();
|
||||
nextStationPoint.setLongitude(nextStation.getGcjLon());
|
||||
nextStationPoint.setLatitude(nextStation.getGcjLat());
|
||||
}
|
||||
final String currentStationName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
String finalNextStationName = nextStationName;
|
||||
@@ -806,6 +834,13 @@ public class OrderModel {
|
||||
long writeVersion = DateTimeUtil.getCurrentTimeStamp();
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName,
|
||||
finalNextStationName,finalNextStationNameKr,writeVersion);
|
||||
|
||||
BusStationBean busStationBean = stationList.get(backgroundCurrentStationIndex);
|
||||
MogoLocation currentStationPoint = new MogoLocation();
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long) busRoutesResult.getLineId());
|
||||
|
||||
String changeInfo = "taskId:" + busRoutesResult.getTaskId() + "--lineId:" + busRoutesResult.getLineId() +
|
||||
"--currentStationName:"+currentStationName+"--finalNextStationName:"+finalNextStationName;
|
||||
OchChainLogManager.writeChainLog("滑动出发", changeInfo,
|
||||
@@ -1053,7 +1088,7 @@ public class OrderModel {
|
||||
}
|
||||
CallerLogger.d(M_BUS + TAG, "单程结束====");
|
||||
CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot();
|
||||
|
||||
setTrajectoryStation(null,null,-1L);
|
||||
endTask();
|
||||
}
|
||||
|
||||
@@ -1244,4 +1279,8 @@ public class OrderModel {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void setTrajectoryStation(MogoLocation startStation,MogoLocation endStation,Long lineId){
|
||||
TrajectoryAndDistanceManager.INSTANCE.setStationPoint(startStation,endStation,lineId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -925,7 +925,7 @@ public class TaxiModel {
|
||||
return;
|
||||
}
|
||||
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
//1、判断轨迹url是否可用
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
&& TextUtils.isEmpty(mCurrentOCHOrder.csvFileUrl)
|
||||
&& TextUtils.isEmpty(mCurrentOCHOrder.csvFileUrlDPQP)
|
||||
@@ -937,18 +937,12 @@ public class TaxiModel {
|
||||
+ "busRoutesResult.csvFileUrlDPQP = " + mCurrentOCHOrder.csvFileUrlDPQP);
|
||||
return;
|
||||
}
|
||||
|
||||
//2、6个条件判断
|
||||
if (!CallerAutoPilotControlManager.INSTANCE.isCanStartAutopilot(true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(CallerAutoPilotStatusListenerManager.INSTANCE.getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
ToastUtils.showShort("自驾中、请勿重复启动");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//3、距离轨迹15m计算
|
||||
String resion = TrajectoryAndDistanceManager.INSTANCE.canStartAutopilot(mCurrentOCHOrder.lineId);
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
setStation();
|
||||
@@ -961,7 +955,7 @@ public class TaxiModel {
|
||||
|
||||
CallerLogger.e(M_TAXI + TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand);
|
||||
|
||||
//4、ssm 给出数据
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
|
||||
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
|
||||
", 请稍候重试");
|
||||
@@ -970,6 +964,11 @@ public class TaxiModel {
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
return;
|
||||
}
|
||||
if(CallerAutoPilotStatusListenerManager.INSTANCE.getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
ToastUtils.showShort("自驾中、请勿重复启动");
|
||||
return;
|
||||
}
|
||||
|
||||
//点击开始自动驾驶按钮订单状态去流转, 不再与自动驾驶是否启动成功挂钩
|
||||
if (mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.UserArriveAtStart.getCode()) {
|
||||
|
||||
@@ -55,9 +55,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
if (TaxiPassengerModel.currentOCHOrder!!.orderStatus == TaxiPassengerOrderStatusEnum.UserArriveAtStart.code) {
|
||||
startServicePilotDone()
|
||||
}
|
||||
if (!CallerAutoPilotControlManager.isCanStartAutopilot(false)) {
|
||||
return "启动自动驾驶不满足条件"
|
||||
}
|
||||
//1、判断轨迹Id是否可用
|
||||
TaxiPassengerModel.currentOCHOrder?.let {
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
@@ -73,11 +71,11 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
return "无发布轨迹, 请发布后重试"
|
||||
}
|
||||
}
|
||||
if(CallerAutoPilotStatusListenerManager.getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
ToastUtils.showShort("自驾中、请勿重复启动");
|
||||
return "自驾中、请勿重复启动";
|
||||
//2、6个条件判断
|
||||
if (!CallerAutoPilotControlManager.isCanStartAutopilot(false)) {
|
||||
return "启动自动驾驶不满足条件"
|
||||
}
|
||||
//3、距离轨迹15m计算
|
||||
var resion = TrajectoryAndDistanceManager.canStartAutopilot(TaxiPassengerModel.currentOCHOrder!!.lineId)
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
TaxiPassengerModel.setStation();
|
||||
@@ -87,7 +85,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
ToastUtils.showShort(resion)
|
||||
return resion
|
||||
}
|
||||
|
||||
// 4、ssm 给出数据
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
|
||||
ToastUtils.showLong(
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +
|
||||
@@ -101,6 +99,12 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
)
|
||||
return OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason + ", 请稍候重试"
|
||||
}
|
||||
if(CallerAutoPilotStatusListenerManager.getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
ToastUtils.showShort("自驾中、请勿重复启动");
|
||||
return "自驾中、请勿重复启动";
|
||||
}
|
||||
|
||||
val parameters = initAutopilotControlParameters()
|
||||
if (parameters == null) {
|
||||
CallerLogger.d(
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager
|
||||
@@ -1219,7 +1220,7 @@ object TaxiTaskModel {
|
||||
return
|
||||
}
|
||||
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
//1、判断轨迹url是否可用 根据开关和后台是否发布轨迹启动自驾
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand && mCurrentTaskTrajectory != null
|
||||
&& TextUtils.isEmpty(mCurrentTaskTrajectory!!.csvFileUrl)
|
||||
&& TextUtils.isEmpty(mCurrentTaskTrajectory!!.csvFileUrlDPQP)
|
||||
@@ -1238,9 +1239,19 @@ object TaxiTaskModel {
|
||||
TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand
|
||||
)
|
||||
//2、6个条件判断
|
||||
if (!CallerAutoPilotControlManager.isCanStartAutopilot(true)) {
|
||||
return
|
||||
}
|
||||
// 3、距离轨迹15m计算
|
||||
mCurrentTaskWithOrder?.let {
|
||||
val resion = TrajectoryAndDistanceManager.canStartAutopilot(it.lineId)
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
ToastUtils.showShort(resion);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 4、ssm 给出数据
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
|
||||
ToastUtils.showLong(
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +
|
||||
|
||||
Reference in New Issue
Block a user