【增加移动授权非空判断】

This commit is contained in:
weizhihong 2023-11-30 14:08:20 +08:00
parent 44e9bd5ec2
commit 441ec71627
1 changed files with 6 additions and 3 deletions

View File

@ -208,9 +208,12 @@ public class SimulationRobotService {
} else if (train.isCMMode() && !atpService.canOpenATO(train)
&& (!train.isParkingAt() || train.isStandReadyStart())) { //CM模式要防止能升AM时不升或者停站前瞎移动导致无法运行
ensureTrainInTheGear(train, VirtualRealityTrain.Handwheel.MANUAL);
SpeedCurve speedCurve = train.getMa2().getAtoStopCurve();
atoService.doControlBySpeedCurve(train, speedCurve, speedCurve.getTotalDistance(),
train.getAtoSpeed());
if (train.getMa2() != null) {
SpeedCurve speedCurve = train.getMa2().getAtoStopCurve();
atoService.doControlBySpeedCurve(train, speedCurve, speedCurve.getTotalDistance(),
train.getAtoSpeed());
}
}
}
}