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