[3.2.0] bus/taxi司机端增加 后台未发布轨迹不可启动自驾开关

This commit is contained in:
wangmingjun
2023-05-17 19:24:20 +08:00
parent ff31290f45
commit 26e70f41e6
5 changed files with 57 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import static com.mogo.och.bus.constant.BusConst.STATION_STATUS_STOPPED;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -620,6 +621,18 @@ public class OrderModel {
*/
private void startAutopilot(boolean isRestart, int leaveIndex) {
//根据开关和后台是否发布轨迹启动自驾
if (FunctionBuildConfig.isPassStartAutopilotCommand && (TextUtils.isEmpty(busRoutesResult.csvFileUrl)
|| TextUtils.isEmpty(busRoutesResult.csvFileUrlDPQP))){
ToastUtils.showLong("无发布轨迹, 请发布后重试");
CallerLogger.INSTANCE.e(M_BUS + TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand);
return;
}
CallerLogger.INSTANCE.e(M_BUS + TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand);
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
", 请稍候重试");

View File

@@ -3,6 +3,7 @@ package com.mogo.och.taxi.model;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -898,12 +899,25 @@ public class TaxiModel {
clientPkFileName = "sn"
)
public void startAutoPilot() {
if (!checkCurrentOCHOrder()) {
CallerLogger.INSTANCE.e(M_TAXI + TAG, "no order or order is empty.");
ToastUtils.showShort("当前订单不存在或异常!");
return;
}
//根据开关和后台是否发布轨迹启动自驾
if (FunctionBuildConfig.isPassStartAutopilotCommand && (TextUtils.isEmpty(mCurrentOCHOrder.csvFileUrl)
|| TextUtils.isEmpty(mCurrentOCHOrder.csvFileUrlDPQP))){
ToastUtils.showLong("无发布轨迹, 请发布后重试");
CallerLogger.INSTANCE.e(M_TAXI + TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand);
return;
}
CallerLogger.INSTANCE.e(M_TAXI + TAG, "isPassStartAutopilotCommand = " +
FunctionBuildConfig.isPassStartAutopilotCommand);
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()){
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
", 请稍候重试");