From 04d46be14ce5816824cf52e455f04809ae05613d Mon Sep 17 00:00:00 2001 From: weizhihong Date: Fri, 31 Mar 2023 15:10:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=A2=84=E9=80=89=E6=A8=A1=E5=BC=8F=E3=80=81=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=E9=A9=BE=E9=A9=B6=E4=BB=A3=E7=A0=81=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/onboard/ATP/ATPService.java | 7 ++++--- .../rtss/simulation/cbtc/robot/SimulationRobotService.java | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java index 7d39633f7..853e5961e 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java @@ -573,10 +573,11 @@ public class ATPService { if (!train.isAtpOn()) { this.openAtp(train); } + if ((train.isSignalEB() || preselectionMode.isMatchTheDriveMode(DriveMode.RM) ) + && !train.isInTheGear(VirtualRealityTrain.Handwheel.MANUAL)) { //确保当前在手动档位 + changeGear(train, VirtualRealityTrain.Handwheel.MANUAL); + } if (train.isSignalEB()) { - if (!train.isInTheGear(VirtualRealityTrain.Handwheel.MANUAL)) { - changeGear(train, VirtualRealityTrain.Handwheel.MANUAL); - } if (!train.isStop() || !train.isLeverNotInTractionGear()) { changeTrainForce(train, -2F); // 改变列车的牵引/ } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java index f10dc31e8..41483acfd 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java @@ -314,8 +314,9 @@ public class SimulationRobotService { */ private void robotDrive(Simulation simulation, SimulationMember driver, VirtualRealityTrain train, SectionPosition targetPosition) { if (!train.isInTheGear(VirtualRealityTrain.Handwheel.MANUAL)) { //确保当前在手动档位 - CommandBO.Step step = CommandBO.buildGearChangeStep(train.getGroupNumber(), VirtualRealityTrain.Handwheel.MANUAL); - atsOperationDispatcher.execute(simulation, driver, step.getOperationType().name(), step.getOperationParams()); + return; +// CommandBO.Step step = CommandBO.buildGearChangeStep(train.getGroupNumber(), VirtualRealityTrain.Handwheel.MANUAL); +// atsOperationDispatcher.execute(simulation, driver, step.getOperationType().name(), step.getOperationParams()); } if (train.isEB()) { if (train.getRobotDriveParam().isReleaseEB()) {