From f5a1acbce8af0efb42d0118e416bac8e2cf71043 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 13 Oct 2022 15:55:46 +0800 Subject: [PATCH] =?UTF-8?q?[2.11.0=20fix]=201=E3=80=81bus=E5=8F=B8?= =?UTF-8?q?=E6=9C=BA=E7=AB=AF=20=E4=B8=AD=E9=97=B4=E7=AB=99=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=87=AA=E5=8A=A8=E9=A9=BE=E9=A9=B6=E5=8A=A8=E7=94=BB?= =?UTF-8?q?bug=202=E3=80=81=E5=90=AF=E5=8A=A8=E8=87=AA=E9=A9=BE=E6=A1=A3?= =?UTF-8?q?=E4=BD=8D=E5=BC=82=E5=B8=B8=E5=8C=BA=E5=88=86taxi=E5=92=8Cbus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/bus/presenter/BusPresenter.java | 8 +++----- .../common/module/manager/OCHAdasAbilityManager.java | 11 ++++++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index 03e14b23d9..a2a710c9dd 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -184,9 +184,7 @@ public class BusPresenter extends Presenter switch (state) { case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE: if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) { - if (currentAutopilotStatus == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {//2-->1语音提示 -// AIAssist.getInstance( getContext() ).speakTTSVoice( "已进入人工驾驶模式" ); - } + currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE; // 设置UI【自动驾驶】按钮是否展示 runOnUIThread(() -> mView.onAutopilotEnableChange(true)); @@ -212,11 +210,11 @@ public class BusPresenter extends Presenter case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING: if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING; - // 改变UI自动驾驶状态 - runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus)); BusOrderModel.getInstance().triggerStartServiceEvent( BusOrderModel.getInstance().isRestartAutopilot(), true); } + // 改变UI自动驾驶状态 + runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus)); break; case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE: if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) { diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/OCHAdasAbilityManager.java b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/OCHAdasAbilityManager.java index 93ad0039a6..0804a47687 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/OCHAdasAbilityManager.java +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/OCHAdasAbilityManager.java @@ -4,6 +4,7 @@ import android.content.Context; import androidx.annotation.Nullable; +import com.mogo.commons.debug.DebugConfig; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; @@ -57,10 +58,18 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener { public void onAutopilotAbility(@Nullable AutopilotAbility ability) { isAutopilotAbility = true; autopilotAbilityReason = null; - if (ability.gear == null || ability.gear == Chassis.GearPosition.GEAR_P || ability.gear == Chassis.GearPosition.GEAR_R) { + if (ability.gear == null || ability.gear == Chassis.GearPosition.GEAR_P || + ability.gear == Chassis.GearPosition.GEAR_R) { isAutopilotAbility = false; autopilotAbilityReason = "挡位不正常"; } + + if (DebugConfig.getProductFlavor() == "fPadLenovoOchBus" && + ability.gear == Chassis.GearPosition.GEAR_N){ //bus档位不正常 + isAutopilotAbility = false; + autopilotAbilityReason = "挡位不正常"; + } + if (isAutopilotAbility) if (ability.brake > 0) { isAutopilotAbility = false;